summaryrefslogtreecommitdiff
path: root/omx
diff options
context:
space:
mode:
authorMasaki Sato <masaki.sato@motorola.com>2009-09-01 18:22:12 -0500
committerJames Dong <jdong@google.com>2009-09-04 14:41:50 -0700
commit0120456697baf4549ecc361497da7f5ba0ea6834 (patch)
tree3aa6b1642c295b4f346afc4cda9739ab8422ab78 /omx
parent90fd4892bfdc76a542a6be0ad446aadaad1e6565 (diff)
downloadomap3-0120456697baf4549ecc361497da7f5ba0ea6834.tar.gz
MP3 playcomplete call eventbufferflag first
bug 2055532 Originally from: https://partner.source.android.com/g/#change,932 Added change to use MP3D_OUTPUT_PORT and MP3D_INPUT_PORT, instead of OMX_DirOuptut and NULL, based on review suggestions.
Diffstat (limited to 'omx')
-rw-r--r--omx/audio/src/openmax_il/mp3_dec/src/OMX_Mp3Dec_Utils.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/omx/audio/src/openmax_il/mp3_dec/src/OMX_Mp3Dec_Utils.c b/omx/audio/src/openmax_il/mp3_dec/src/OMX_Mp3Dec_Utils.c
index f045828..d1655d1 100644
--- a/omx/audio/src/openmax_il/mp3_dec/src/OMX_Mp3Dec_Utils.c
+++ b/omx/audio/src/openmax_il/mp3_dec/src/OMX_Mp3Dec_Utils.c
@@ -2624,6 +2624,32 @@ OMX_ERRORTYPE MP3DEC_LCML_Callback (TUsnCodecEvent event,void * args [10])
OMX_ERROR2(pComponentPrivate->dbg, ":: --------- EMMCodecDspError Here\n");
if(((int)args[4] == USN_ERR_WARNING) && ((int)args[5] == IUALG_WARN_PLAYCOMPLETED)) {
OMX_ERROR4(pComponentPrivate->dbg, "IUALG_WARN_PLAYCOMPLETED!\n");
+#ifndef UNDER_CE
+ pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
+ pComponentPrivate->pHandle->pApplicationPrivate,
+ OMX_EventBufferFlag,
+ MP3D_OUTPUT_PORT,
+ OMX_BUFFERFLAG_EOS,
+ NULL);
+ if(pComponentPrivate->dasfmode){
+ pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
+ pComponentPrivate->pHandle->pApplicationPrivate,
+ OMX_EventBufferFlag,
+ MP3D_INPUT_PORT,
+ OMX_BUFFERFLAG_EOS,
+ NULL);
+ }
+ pComponentPrivate->pLcmlBufHeader[0]->pIpParam->bLastBuffer = 0;
+
+#else
+ /* add callback to application to indicate SN/USN has completed playing of current set of data */
+ pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
+ pComponentPrivate->pHandle->pApplicationPrivate,
+ OMX_EventBufferFlag,
+ MP3D_INPUT_PORT,
+ OMX_BUFFERFLAG_EOS,
+ NULL);
+#endif
///incase any pending output buffers, clear them
for (i=0; i < pComponentPrivate->pOutputBufferList->numBuffers; i++) {
if (MP3DEC_IsPending(pComponentPrivate,pComponentPrivate->pOutputBufferList->pBufHdr[i],OMX_DirOutput)) {
@@ -2651,32 +2677,6 @@ OMX_ERRORTYPE MP3DEC_LCML_Callback (TUsnCodecEvent event,void * args [10])
}
}
//
-#ifndef UNDER_CE
- pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
- pComponentPrivate->pHandle->pApplicationPrivate,
- OMX_EventBufferFlag,
- OMX_DirOutput,
- OMX_BUFFERFLAG_EOS,
- NULL);
- if(pComponentPrivate->dasfmode){
- pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
- pComponentPrivate->pHandle->pApplicationPrivate,
- OMX_EventBufferFlag,
- (OMX_U32)NULL,
- OMX_BUFFERFLAG_EOS,
- NULL);
- }
- pComponentPrivate->pLcmlBufHeader[0]->pIpParam->bLastBuffer = 0;
-
-#else
- /* add callback to application to indicate SN/USN has completed playing of current set of date */
- pComponentPrivate->cbInfo.EventHandler(pComponentPrivate->pHandle,
- pComponentPrivate->pHandle->pApplicationPrivate,
- OMX_EventBufferFlag,
- (OMX_U32)NULL,
- OMX_BUFFERFLAG_EOS,
- NULL);
-#endif
}
if((int)args[5] == IUALG_WARN_CONCEALED) {