frame_size=(frame_size*144000)/(sample_rate<<lsf);
frame_size=frame_size+padding;
}
+ //Log::getInstance()->log("Audio", Log::DEBUG, "FRAME: %d %d %d %d %d %d",lsf,layer,bitrate_index,sample_rate,padding,framesize);
*framesize=frame_size;
return test; // probably FrameSync
return workpts;
}
+bool AudioOMX::DrainTargetBufferFull()
+{
+ //Check, if we have OMX output buffers
+ bool full;
+ input_bufs_omx_mutex.Lock();
+ full=(input_bufs_omx_free.size()==0);
+ input_bufs_omx_mutex.Unlock();
+ return full;
+
+}
UINT AudioOMX::DeliverMediaPacket(MediaPacket packet, const UCHAR* buffer,
virtual void ResetTimeOffsets();
virtual bool DrainTargetReady() {return omx_running;};
+ virtual bool DrainTargetBufferFull();
UCHAR getLastAType() {return lastAType;}
virtual void ResetTimeOffsets()=0;
virtual bool DrainTargetReady() {return false;}; //if the draintarget is blocking in paused state, this tells that it is ready to rumble
+ virtual bool DrainTargetBufferFull() { return false;};
virtual bool dtsTimefix(){return false;} //determines if the draintargets needs a mixure of pts and dts or not
{
bool ret = false;
if (dataavail) *dataavail=false;
+ if (draintarget->DrainTargetBufferFull()) return false; //We are full, no need to do something else
lock();
UINT listlength = mediapackets.size();
if (listlength != 0)
-
-
int VideoOMX::PrepareInputBufsOMX() //needs to be called with locked mutex
{
OMX_ERRORTYPE error;
return false; // no frame found
}
+
+
+bool VideoOMX::DrainTargetBufferFull()
+{
+ //Check, if we have OMX output buffers
+ bool full;
+ input_bufs_omx_mutex.Lock();
+ full=(input_bufs_omx_free.size()==0);
+ input_bufs_omx_mutex.Unlock();
+ return full;
+
+}
+
void VideoOMX::PrepareMediaSample(const MediaPacketList& mplist,UINT samplepos)
{
bool iframemode;
bool InIframemode() {return iframemode;};
+ virtual bool DrainTargetBufferFull();
+
UINT DeliverMediaPacket(MediaPacket packet,const UCHAR* bulibaver,UINT *samplepos);
#define VPE_DECODER_OMX 1