Lines Matching refs:pC
386 VideoEditor3gpReader_Context* pC = NULL;
393 SAFE_MALLOC(pC, VideoEditor3gpReader_Context, 1, "VideoEditor3gpReader");
395 memset(pC, sizeof(VideoEditor3gpReader_Context), 0);
397 pC->mAudioStreamHandler = M4OSA_NULL;
398 pC->mAudioAu.dataAddress = M4OSA_NULL;
399 pC->mVideoStreamHandler = M4OSA_NULL;
400 pC->mVideoAu.dataAddress = M4OSA_NULL;
402 pC->mAudioSeeking = M4OSA_FALSE;
403 pC->mAudioSeekTime = 0;
405 pC->mVideoSeeking = M4OSA_FALSE;
406 pC->mVideoSeekTime = 0;
408 pC->mMaxDuration = 0;
410 *pContext=pC;
434 VideoEditor3gpReader_Context* pC = M4OSA_NULL;
439 pC = (VideoEditor3gpReader_Context*)pContext;
441 SAFE_FREE(pC->mAudioAu.dataAddress);
442 pC->mAudioAu.dataAddress = M4OSA_NULL;
443 SAFE_FREE(pC->mVideoAu.dataAddress);
444 pC->mVideoAu.dataAddress = M4OSA_NULL;
445 SAFE_FREE(pC);
477 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)pContext;
481 M4OSA_DEBUG_IF1((M4OSA_NULL == pC), M4ERR_PARAMETER,
488 //pC->mDataSource = DataSource::CreateFromURI((char*)pFileDescriptor);
489 pC->mDataSource = new FileSource ((char*)pFileDescriptor);
491 if (pC->mDataSource == NULL) {
496 pC->mExtractor = MediaExtractor::Create(pC->mDataSource,
499 if (pC->mExtractor == NULL) {
505 sp<MetaData> meta = pC->mExtractor->getMetaData();
527 VideoEditor3gpReader_Context *pC = (VideoEditor3gpReader_Context*)context;
534 M4OSA_DEBUG_IF1((M4OSA_NULL == pC), M4ERR_PARAMETER,
537 if (pC->mAudioStreamHandler) {
540 if (M4OSA_NULL != pC->mAudioStreamHandler->m_pDecoderSpecificInfo) {
541 free(pC->mAudioStreamHandler->\
543 pC->mAudioStreamHandler->m_decoderSpecificInfoSize = 0;
544 pC->mAudioStreamHandler->m_pDecoderSpecificInfo = M4OSA_NULL;
547 if ((M4DA_StreamTypeAudioAac == pC->mAudioStreamHandler->m_streamType)
548 && (M4OSA_NULL != pC->mAudioStreamHandler->m_pUserData)) {
550 pC->mAudioStreamHandler->m_pUserData);
562 pC->mAudioStreamHandler->m_pUserData = M4OSA_NULL;
565 if (pC->mAudioStreamHandler->m_pESDSInfo != M4OSA_NULL) {
566 free(pC->mAudioStreamHandler->m_pESDSInfo);
567 pC->mAudioStreamHandler->m_pESDSInfo = M4OSA_NULL;
568 pC->mAudioStreamHandler->m_ESDSInfoSize = 0;
571 free(pC->mAudioStreamHandler);
572 pC->mAudioStreamHandler = M4OSA_NULL;
574 pC->mAudioSource->stop();
575 pC->mAudioSource.clear();
577 if (pC->mVideoStreamHandler) {
580 if(M4OSA_NULL != pC->mVideoStreamHandler->m_pDecoderSpecificInfo) {
581 free(pC->mVideoStreamHandler->\
583 pC->mVideoStreamHandler->m_decoderSpecificInfoSize = 0;
584 pC->mVideoStreamHandler->m_pDecoderSpecificInfo = M4OSA_NULL;
587 if(M4OSA_NULL != pC->mVideoStreamHandler->m_pH264DecoderSpecificInfo) {
588 free(pC->mVideoStreamHandler->\
590 pC->mVideoStreamHandler->m_H264decoderSpecificInfoSize = 0;
591 pC->mVideoStreamHandler->m_pH264DecoderSpecificInfo = M4OSA_NULL;
594 if(pC->mVideoStreamHandler->m_pESDSInfo != M4OSA_NULL) {
595 free(pC->mVideoStreamHandler->m_pESDSInfo);
596 pC->mVideoStreamHandler->m_pESDSInfo = M4OSA_NULL;
597 pC->mVideoStreamHandler->m_ESDSInfoSize = 0;
601 free(pC->mVideoStreamHandler);
602 pC->mVideoStreamHandler = M4OSA_NULL;
604 pC->mVideoSource->stop();
605 pC->mVideoSource.clear();
607 pC->mExtractor.clear();
608 pC->mDataSource.clear();
635 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)context;
640 M4OSA_DEBUG_IF1((M4OSA_NULL == pC), M4ERR_PARAMETER,
648 ALOGV("VideoEditor3gpReader_getOption duration %d",pC->mMaxDuration);
649 *(M4OSA_Time*)pValue = pC->mMaxDuration;
671 if (pC->mMaxDuration != 0) {
672 M4OSA_UInt32 ui32Tmp = (M4OSA_UInt32)pC->mMaxDuration;
673 *pBitrate = (M4OSA_UInt32)(pC->mFileSize * 8000.0 / pC->mMaxDuration);
680 if(M4OSA_NULL == pC->mVideoStreamHandler) {
686 if((M4DA_StreamTypeVideoH263 != pC->mVideoStreamHandler->\
687 m_streamType) || (pC->mVideoStreamHandler->\
690 pC->mVideoStreamHandler->m_decoderSpecificInfoSize);
699 pC->mVideoStreamHandler->m_pDecoderSpecificInfo[6];
701 pC->mVideoStreamHandler->m_pDecoderSpecificInfo[5];
764 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)context;
768 M4OSA_DEBUG_IF1((M4OSA_NULL == pC), M4ERR_PARAMETER,
815 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)context;
818 M4OSA_DEBUG_IF1((pC == 0), M4ERR_PARAMETER,
855 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)context;
860 M4OSA_DEBUG_IF1((pC == 0), M4ERR_PARAMETER,
876 if ((pC->mAudioStreamHandler != M4OSA_NULL) &&
877 (pStreamHandler->m_streamId == pC->mAudioStreamHandler->m_streamId))
879 pAu = &pC->mAudioAu;
884 pC->mAudioSeeking = M4OSA_TRUE;
885 pC->mAudioSeekTime = time64;
887 } else if ((pC->mVideoStreamHandler != M4OSA_NULL) &&
888 (pStreamHandler->m_streamId == pC->mVideoStreamHandler->m_streamId))
890 pAu = &pC->mVideoAu;
895 pC->mVideoSeeking = M4OSA_TRUE;
896 pC->mVideoSeekTime = time64;
923 VideoEditor3gpReader_Context* pC = (VideoEditor3gpReader_Context*)context;
929 M4OSA_DEBUG_IF1((pC == 0), M4ERR_PARAMETER,
936 if (pStreamHandler == (M4_StreamHandler*)pC->mAudioStreamHandler) {
937 pAu = &pC->mAudioAu;
938 } else if (pStreamHandler == (M4_StreamHandler*)pC->mVideoStreamHandler) {
939 pAu = &pC->mVideoAu;
968 VideoEditor3gpReader_Context* pC=(VideoEditor3gpReader_Context*)context;
978 M4OSA_DEBUG_IF1(( pC== 0), M4ERR_PARAMETER,
987 if (pStreamHandler == (M4_StreamHandler*)pC->mAudioStreamHandler) {
989 pAu = &pC->mAudioAu;
990 if (pC->mAudioSeeking == M4OSA_TRUE) {
992 pC->mAudioSeekTime);
993 options.setSeekTo(pC->mAudioSeekTime);
994 pC->mAudioSource->read(&mMediaBuffer, &options);
999 pC->mAudioSeeking = M4OSA_FALSE;
1003 pC->mAudioSource->read(&mMediaBuffer, &options);
1009 } else if (pStreamHandler == (M4_StreamHandler*)pC->mVideoStreamHandler) {
1011 pAu = &pC->mVideoAu;
1012 if(pC->mVideoSeeking == M4OSA_TRUE) {
1014 ALOGV("VideoEditor3gpReader_getNextAu seek: %ld",pC->mVideoSeekTime);
1015 options.setSeekTo(pC->mVideoSeekTime,
1023 error = pC->mVideoSource->read(&mMediaBuffer, &options);
1042 } while(tempTime64 < pC->mVideoSeekTime);
1046 pC->mVideoSeeking = M4OSA_FALSE;
1049 pC->mVideoSource->read(&mMediaBuffer, &options);
1097 if( (pStreamHandler == (M4_StreamHandler*)pC->mVideoStreamHandler) &&
1117 if (pStreamHandler == (M4_StreamHandler*)pC->mAudioStreamHandler) {
1404 VideoEditor3gpReader_Context* pC=(VideoEditor3gpReader_Context*)context;
1430 M4OSA_DEBUG_IF1((pC == 0), M4ERR_PARAMETER,
1437 trackCount = pC->mExtractor->countTracks();
1438 temp = pC->mCurrTrack;
1446 meta = pC->mExtractor->getTrackMetaData(temp);
1450 pC->mVideoSource = pC->mExtractor->getTrack(temp);
1451 pC->mVideoSource->start();
1469 pC->mStreamType = streamType;
1470 pC->mStreamId = pC->mCurrTrack;
1488 pC->mMaxDuration = ((*pStreamHandler)->m_duration);
1489 if (pC->mMaxDuration == 0) {
1499 pC->mDataSource->getSize(&fileSize);
1500 pC->mFileSize = fileSize;
1503 pC->mFileSize);
1514 (pC->mFileSize * 8000)/pC->mMaxDuration;
1535 pC->mVideoStreamHandler =
1664 pC->mAudioSource = pC->mExtractor->getTrack(pC->mCurrTrack);
1665 pC->mAudioSource->start();
1679 pC->mStreamType = streamType;
1680 pC->mStreamId = pC->mCurrTrack;
1682 ALOGV("VE streamtype %d ,id %d", streamType, pC->mCurrTrack);
1697 pC->mAudioStreamHandler =
1701 pC->mAudioStreamHandler=(M4_StreamHandler*)pAudioStreamHandler;
1702 pC->mAudioStreamHandler->m_pESDSInfo = M4OSA_NULL;
1703 pC->mAudioStreamHandler->m_ESDSInfoSize = 0;
1812 ALOGV("VE noaudio-video stream:pC->mCurrTrack = %d ",pC->mCurrTrack);
1813 pC->mCurrTrack++; //Increment current track to get the next track
1818 (*pStreamHandler)->m_streamId = pC->mStreamId;
1828 pC->mMaxDuration = ((*pStreamHandler)->m_duration);
1867 err = VideoEditor3gpReader_fillAuStruct(pC, (*pStreamHandler),
1872 err = VideoEditor3gpReader_getNextAu(pC, (*pStreamHandler),
1886 * 2. "trackCount > pC->mCurrTrack" indicates that there are other
1892 if (M4WAR_NO_MORE_AU == err && trackCount > pC->mCurrTrack) {
1899 err = VideoEditor3gpReader_reset(pC, (*pStreamHandler));
1905 pC->mCurrTrack++; //Increment the current track to get next track
1906 ALOGV("pC->mCurrTrack = %d",pC->mCurrTrack);
1920 VideoEditor3gpReader_Context *pC = (VideoEditor3gpReader_Context*)context;
1930 M4OSA_DEBUG_IF1((pC == 0), M4ERR_PARAMETER,
1944 error = pC->mVideoSource->read(&mMediaBuffer, &options);