OSDN Git Service

Incorporate aah changes to AudioBufferProvider into VideoEditor
authorMike J. Chen <mjchen@google.com>
Mon, 15 Aug 2011 19:06:45 +0000 (12:06 -0700)
committerJohn Grossman <johngro@google.com>
Fri, 26 Aug 2011 22:17:45 +0000 (15:17 -0700)
This is a squashed merge from master-tungsten of the following change:

commit e1bec6e10c8d7462a0970568153a2d9db1463e6e
Author: Jason Simmons <jsimmons@google.com>
Date:   Thu Jun 16 14:22:57 2011 -0700

    Change the interface of the AudioMixer and AudioBufferProvider to accept a presentation timestamp

    Change-Id: I565b48450f98089767bf92b435826c9f4baeb01c

Change-Id: I76021f5de9aad92381678e299c8e8b5a77d577bf
Signed-off-by: Mike J. Chen <mjchen@google.com>
Signed-off-by: John Grossman <johngro@google.com>
Signed-off-by: Jason Simmons <jsimmons@google.com>
libvideoeditor/lvpp/VideoEditorSRC.cpp
libvideoeditor/lvpp/VideoEditorSRC.h
libvideoeditor/vss/src/VideoEditorResampler.cpp

index 71411ab..b8de7c0 100755 (executable)
@@ -238,7 +238,8 @@ status_t VideoEditorSRC::read (
     return OK;
 }
 
-status_t VideoEditorSRC::getNextBuffer(AudioBufferProvider::Buffer *pBuffer) {
+status_t VideoEditorSRC::getNextBuffer(AudioBufferProvider::Buffer *pBuffer,
+                                       int64_t pts) {
     LOGV("Requesting        %d", pBuffer->frameCount);
     uint32_t availableFrames;
     bool lastBuffer = false;
index 20313e3..7a2d1b9 100755 (executable)
@@ -40,7 +40,7 @@ class VideoEditorSRC : public MediaSource , public AudioBufferProvider {
         virtual status_t read (
             MediaBuffer **buffer, const ReadOptions *options = NULL);
 
-        virtual status_t getNextBuffer(Buffer* buffer);
+        virtual status_t getNextBuffer(Buffer* buffer, int64_t pts);
         virtual void releaseBuffer(Buffer* buffer);
 
         void setResampling(int32_t sampleRate=kFreq32000Hz);
@@ -97,4 +97,3 @@ class VideoEditorSRC : public MediaSource , public AudioBufferProvider {
 };
 
 } //namespce android
-
index 6064baf..cd752ce 100755 (executable)
@@ -25,7 +25,7 @@ struct VideoEditorResampler : public AudioBufferProvider {
 
     public:
 
-        virtual status_t getNextBuffer(Buffer* buffer);
+        virtual status_t getNextBuffer(Buffer* buffer, int64_t pts);
         virtual void releaseBuffer(Buffer* buffer);
 
     enum { //Sampling freq
@@ -52,7 +52,8 @@ struct VideoEditorResampler : public AudioBufferProvider {
 
 #define MAX_SAMPLEDURATION_FOR_CONVERTION 40 //ms
 
-status_t VideoEditorResampler::getNextBuffer(AudioBufferProvider::Buffer *pBuffer) {
+status_t VideoEditorResampler::getNextBuffer(AudioBufferProvider::Buffer *pBuffer,
+                                             int64_t pts) {
 
     uint32_t dataSize = pBuffer->frameCount * this->nbChannels * sizeof(int16_t);
     mTmpInBuffer = (int16_t*)malloc(dataSize);