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>
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;
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);
};
} //namespce android
-
public:
- virtual status_t getNextBuffer(Buffer* buffer);
+ virtual status_t getNextBuffer(Buffer* buffer, int64_t pts);
virtual void releaseBuffer(Buffer* buffer);
enum { //Sampling freq
#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);