summaryrefslogtreecommitdiffstats
path: root/libvideoeditor
diff options
context:
space:
mode:
Diffstat (limited to 'libvideoeditor')
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPlayer.cpp7
-rwxr-xr-xlibvideoeditor/lvpp/VideoEditorPlayer.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/libvideoeditor/lvpp/VideoEditorPlayer.cpp b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
index 5aeba4f..8d656c4 100755
--- a/libvideoeditor/lvpp/VideoEditorPlayer.cpp
+++ b/libvideoeditor/lvpp/VideoEditorPlayer.cpp
@@ -585,4 +585,11 @@ int VideoEditorPlayer::VeAudioOutput::getSessionId() const {
return mSessionId;
}
+uint32_t VideoEditorPlayer::VeAudioOutput::getSampleRate() const {
+ if (mMsecsPerFrame == 0) {
+ return 0;
+ }
+ return (uint32_t)(1.e3 / mMsecsPerFrame);
+}
+
} // namespace android
diff --git a/libvideoeditor/lvpp/VideoEditorPlayer.h b/libvideoeditor/lvpp/VideoEditorPlayer.h
index 5862c08..b8c1254 100755
--- a/libvideoeditor/lvpp/VideoEditorPlayer.h
+++ b/libvideoeditor/lvpp/VideoEditorPlayer.h
@@ -48,6 +48,7 @@ class VideoEditorPlayer : public MediaPlayerInterface {
virtual status_t getPosition(uint32_t *position) const;
virtual status_t getFramesWritten(uint32_t*) const;
virtual int getSessionId() const;
+ virtual uint32_t getSampleRate() const;
virtual status_t open(
uint32_t sampleRate, int channelCount, audio_channel_mask_t channelMask,