Lines Matching refs:pC
48 *pC );
50 *pC, M4OSA_UInt8 uiClipNumber );
52 *pC, M4OSA_UInt8 uiClip1orClip2,
56 *pC, M4OSA_Int16 *pPCMdata1,
65 * @param pC (IN/OUT) Internal edit context
68 M4OSA_ERR M4VSS3GPP_intEditJumpMP3( M4VSS3GPP_InternalEditContext *pC )
71 M4VSS3GPP_ClipContext *pClip = pC->pC1; /**< shortcut */
88 pC->State = M4VSS3GPP_kEditState_MP3;
105 * @param pC (IN/OUT) Internal edit context
108 M4OSA_ERR M4VSS3GPP_intEditStepMP3( M4VSS3GPP_InternalEditContext *pC )
111 M4VSS3GPP_ClipContext *pClip = pC->pC1; /**< shortcut */
115 err = pC->pOsaFileWritPtr->writeData(pC->ewc.p3gpWriterContext,
133 pC->ewc.dATo =
144 err = pC->pOsaFileWritPtr->writeData(pC->ewc.p3gpWriterContext,
168 err = pC->pOsaFileWritPtr->writeData(pC->ewc.p3gpWriterContext,
189 err = M4VSS3GPP_intReachedEndOfAudio(pC);
201 == pC->bSupportSilence) ) /**< Reached end of clip */
204 pC); /**< Clip done, do the next one */
226 * @param pC (IN/OUT) Internal edit context
229 M4OSA_ERR M4VSS3GPP_intEditStepAudio( M4VSS3GPP_InternalEditContext *pC )
242 if( ( pC->ewc.dATo - pC->pC1->iAoffset / pC->pC1->scale_audio + 0.5)
243 >= pC->pC1->iEndTime )
247 err = M4VSS3GPP_intReachedEndOfAudio(pC);
263 pC); /**< This function change the pC->Astate variable! */
274 pC->ewc.dATo, pC->Astate, pC->pC1->iAoffset);
278 switch( pC->Astate )
291 err = pC->ShellAPI.pWriterDataFcts->pStartAU(
292 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
293 &pC->ewc.WriterAudioAU);
306 pC->ewc.WriterAudioAU.CTS =
307 pC->pC1->iAudioFrameCts + pC->pC1->iAoffset;
318 if( ( M4OSA_FALSE == pC->pC1->bFirstAuWritten)
319 && (0 != pC->uiCurrentClip) && (pC->pC1->iAudioFrameCts
320 < (pC->ewc.iSilenceFrameDuration + 1)) )
324 pC->ewc.WriterAudioAU.size = pC->ewc.uiSilenceFrameSize;
325 memcpy((void *)pC->ewc.WriterAudioAU.dataAddress,
326 (void *)pC->ewc.pSilenceFrameData, pC->ewc.uiSilenceFrameSize);
329 else if( (M4OSA_UInt32)pC->pC1->uiAudioFrameSize
330 < pC->ewc.uiAudioMaxAuSize )
334 pC->ewc.WriterAudioAU.size =
335 (M4OSA_UInt32)pC->pC1->uiAudioFrameSize;
336 memcpy((void *)pC->ewc.WriterAudioAU.dataAddress,
337 (void *)pC->pC1->pAudioFramePtr, pC->ewc.WriterAudioAU.size);
344 pC->pC1->uiAudioFrameSize, pC->ewc.uiAudioMaxAuSize);
350 pC->pC1->bFirstAuWritten = M4OSA_TRUE;
353 (M4OSA_Int32)(pC->ewc.WriterAudioAU.CTS / pC->ewc.scale_audio),
354 pC->ewc.WriterAudioAU.size);
358 err = pC->ShellAPI.pWriterDataFcts->pProcessAU(
359 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
360 &pC->ewc.WriterAudioAU);
388 pC->pC1->Astatus = M4VSS3GPP_kClipStatus_READ;
392 err = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC1);
395 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
396 pC->pC1->iAoffset / pC->pC1->scale_audio,
397 pC->pC1->uiAudioFrameSize);
411 pC->ewc.dATo = ( pC->pC1->iAudioFrameCts + pC->pC1->iAoffset)
412 / pC->pC1->scale_audio;
415 && (M4OSA_FALSE == pC->bSupportSilence) )
438 err = pC->ShellAPI.pWriterDataFcts->pStartAU(
439 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
440 &pC->ewc.WriterAudioAU);
454 if( M4VSS3GPP_kClipStatus_READ == pC->pC1->Astatus )
459 != pC->pC1->
464 iCurrentCts = pC->pC1->iAudioFrameCts;
466 * pC->ewc.iSilenceFrameDuration;
473 err = M4VSS3GPP_intClipJumpAudioAt(pC->pC1, &iTargetCts);
485 pC->pC1); /**< read AU where we jumped */
488 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
489 pC->pC1->iAoffset / pC->pC1->scale_audio,
490 pC->pC1->uiAudioFrameSize);
503 while( pC->pC1->iAudioFrameCts < iCurrentCts )
505 err = M4VSS3GPP_intClipDecodeCurrentAudioFrame(pC->pC1);
518 pC->pC1->AudioDecBufferOut.m_dataAddress;
520 pC->pC1->AudioDecBufferOut.m_bufferSize;
527 / pC->ewc.uiNbChannels;
532 (M4OSA_MemAddr8)pC->ewc.WriterAudioAU.dataAddress;
549 pC->ShellAPI.pAudioEncoderGlobalFcts->pFctStep(
550 pC->ewc.pAudioEncCtxt,
567 pC->pC1->pAudioFramePtr = M4OSA_NULL;
570 pC->pC1->ShellAPI.m_pAudioDecoder->m_pFctGetOptionAudioDec(
571 pC->pC1->pAudioDecCtxt, M4AD_kOptionID_AuCTS,
580 pC->pC1->iAudioFrameCts = auTimeStamp;
587 pC->pC1->Astatus = M4VSS3GPP_kClipStatus_DECODE;
592 err = M4VSS3GPP_intClipDecodeCurrentAudioFrame(pC->pC1);
603 pC->pC1->pAudioFramePtr = M4OSA_NULL;
606 pC->pC1->ShellAPI.m_pAudioDecoder->m_pFctGetOptionAudioDec(
607 pC->pC1->pAudioDecCtxt, M4AD_kOptionID_AuCTS,
616 pC->pC1->iAudioFrameCts = auTimeStamp;
620 if( pC->iClip1ActiveEffect >= 0 )
622 err = M4VSS3GPP_intApplyAudioEffect(pC, 1, (M4OSA_Int16
623 *)pC->pC1->AudioDecBufferOut.m_dataAddress,
624 pC->pC1->AudioDecBufferOut.m_bufferSize);
638 pC->ewc.WriterAudioAU.CTS =
639 pC->pC1->iAudioFrameCts + pC->pC1->iAoffset;
643 if( pC->ewc.WriterAudioAU.CTS < 0 )
645 pC->ewc.WriterAudioAU.CTS = 0;
659 if( ( M4OSA_FALSE == pC->pC1->bFirstAuWritten)
660 && (0 != pC->uiCurrentClip) && (pC->pC1->iAudioFrameCts
661 < (pC->ewc.iSilenceFrameDuration + 1)) )
665 pC->ewc.WriterAudioAU.size = pC->ewc.uiSilenceFrameSize;
666 memcpy((void *)pC->ewc.WriterAudioAU.dataAddress,
667 (void *)pC->ewc.pSilenceFrameData, pC->ewc.uiSilenceFrameSize);
677 pC->pC1->AudioDecBufferOut.m_dataAddress;
679 pC->pC1->AudioDecBufferOut.m_bufferSize;
686 / pC->ewc.uiNbChannels;
691 (M4OSA_MemAddr8)pC->ewc.WriterAudioAU.dataAddress;
710 err = pC->ShellAPI.pAudioEncoderGlobalFcts->pFctStep(
711 pC->ewc.pAudioEncCtxt,
731 pC->ewc.WriterAudioAU.size = pEncOutBuffer.pTableBufferSize[
737 pC->pC1->bFirstAuWritten = M4OSA_TRUE;
740 (M4OSA_Int32)(pC->ewc.WriterAudioAU.CTS / pC->ewc.scale_audio),
741 pC->ewc.WriterAudioAU.size);
745 err = pC->ShellAPI.pWriterDataFcts->pProcessAU(
746 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
747 &pC->ewc.WriterAudioAU);
774 err = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC1);
777 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
778 pC->pC1->iAoffset / pC->pC1->scale_audio,
779 pC->pC1->uiAudioFrameSize);
793 pC->ewc.dATo = ( pC->pC1->iAudioFrameCts + pC->pC1->iAoffset)
794 / pC->pC1->scale_audio;
797 && (M4OSA_FALSE == pC->bSupportSilence) )
820 err = pC->ShellAPI.pWriterDataFcts->pStartAU(
821 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
822 &pC->ewc.WriterAudioAU);
836 if( M4VSS3GPP_kClipStatus_READ == pC->pC1->Astatus )
841 != pC->pC1->
846 iCurrentCts = pC->pC1->iAudioFrameCts;
848 * pC->ewc.iSilenceFrameDuration;
855 err = M4VSS3GPP_intClipJumpAudioAt(pC->pC1, &iTargetCts);
867 pC->pC1); /**< read AU where we jumped */
870 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
871 pC->pC1->iAoffset / pC->pC1->scale_audio,
872 pC->pC1->uiAudioFrameSize);
885 while( pC->pC1->iAudioFrameCts < iCurrentCts )
887 err = M4VSS3GPP_intClipDecodeCurrentAudioFrame(pC->pC1);
900 pC->pC1->AudioDecBufferOut.m_dataAddress;
902 pC->pC1->AudioDecBufferOut.m_bufferSize;
909 / pC->ewc.uiNbChannels;
914 (M4OSA_MemAddr8)pC->ewc.WriterAudioAU.dataAddress;
932 pC->ShellAPI.pAudioEncoderGlobalFcts->pFctStep(
933 pC->ewc.pAudioEncCtxt,
951 err = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC1);
955 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
956 pC->pC1->iAoffset / pC->pC1->scale_audio,
957 pC->pC1->uiAudioFrameSize);
972 pC->pC1->Astatus = M4VSS3GPP_kClipStatus_DECODE;
977 err = M4VSS3GPP_intClipDecodeCurrentAudioFrame(pC->pC1);
990 err = M4VSS3GPP_intClipDecodeCurrentAudioFrame(pC->pC2);
1003 if( pC->pC1->AudioDecBufferOut.m_bufferSize
1004 != pC->pC2->AudioDecBufferOut.m_bufferSize )
1009 pC->pC1->AudioDecBufferOut.m_bufferSize,
1010 pC->pC2->AudioDecBufferOut.m_bufferSize);
1021 pC->pC1->AudioDecBufferOut.m_bufferSize,
1022 pC->pC2->AudioDecBufferOut.m_bufferSize);
1034 if( pC->iClip1ActiveEffect >= 0 )
1036 err = M4VSS3GPP_intApplyAudioEffect(pC, 1, (M4OSA_Int16
1037 *)pC->pC1->AudioDecBufferOut.m_dataAddress,
1038 pC->pC1->AudioDecBufferOut.m_bufferSize);
1052 if( pC->iClip2ActiveEffect >= 0 )
1054 err = M4VSS3GPP_intApplyAudioEffect(pC, 2, (M4OSA_Int16
1055 *)pC->pC2->AudioDecBufferOut.m_dataAddress,
1056 pC->pC2->AudioDecBufferOut.m_bufferSize);
1070 err = M4VSS3GPP_intAudioTransition(pC,
1071 (M4OSA_Int16 *)pC->pC1->AudioDecBufferOut.m_dataAddress,
1072 (M4OSA_Int16 *)pC->pC2->AudioDecBufferOut.m_dataAddress,
1073 pC->pC1->AudioDecBufferOut.m_bufferSize);
1086 pC->pC1->AudioDecBufferOut.m_dataAddress;
1088 pC->pC1->AudioDecBufferOut.m_bufferSize;
1094 / pC->ewc.uiNbChannels;
1099 (M4OSA_MemAddr8)pC->ewc.WriterAudioAU.dataAddress;
1118 err = pC->ShellAPI.pAudioEncoderGlobalFcts->pFctStep(
1119 pC->ewc.pAudioEncCtxt, &pEncInBuffer, &pEncOutBuffer);
1138 pC->ewc.WriterAudioAU.size = pEncOutBuffer.pTableBufferSize[
1140 pC->ewc.WriterAudioAU.CTS += frameTimeDelta;
1143 (M4OSA_Int32)(pC->ewc.WriterAudioAU.CTS / pC->ewc.scale_audio),
1144 pC->ewc.WriterAudioAU.size);
1148 err = pC->ShellAPI.pWriterDataFcts->pProcessAU(
1149 pC->ewc.p3gpWriterContext, M4VSS3GPP_WRITER_AUDIO_STREAM_ID,
1150 &pC->ewc.WriterAudioAU);
1177 err = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC1);
1180 pC->pC1->iAudioFrameCts / pC->pC1->scale_audio,
1181 pC->pC1->iAoffset / pC->pC1->scale_audio,
1182 pC->pC1->uiAudioFrameSize);
1198 pC->ewc.dATo = ( pC->pC1->iAudioFrameCts + pC->pC1->iAoffset)
1199 / pC
1203 secondaryError = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC2);
1206 pC->pC2->iAudioFrameCts / pC->pC2->scale_audio,
1207 pC->pC2->iAoffset / pC->pC2->scale_audio,
1208 pC->pC2->uiAudioFrameSize);
1221 && (M4OSA_FALSE == pC->bSupportSilence) )
1243 pC->Astate);
1253 err = M4VSS3GPP_intReachedEndOfAudio(pC);
1274 * @param pC (IN/OUT) Internal edit context
1278 *pC )
1281 const M4OSA_Int32 TD = pC->pTransitionList[pC->
1284 const M4VSS3GPP_EditAudioState previousAstate = pC->Astate;
1288 M4VSS3GPP_intCheckAudioEffects(pC, 1);
1292 if( ( TD > 0) && ((M4OSA_Int32)(pC->ewc.dATo - pC->pC1->iAoffset
1293 / pC->pC1->scale_audio + 0.5) >= (pC->pC1->iEndTime - TD)) )
1297 pC->Astate = M4VSS3GPP_kEditAudioState_TRANSITION;
1298 pC->bTransitionEffect = M4OSA_TRUE;
1306 if( M4OSA_NULL == pC->pC2 )
1308 err = M4VSS3GPP_intOpenClip(pC, &pC->pC2,
1309 &pC->pClipList[pC->uiCurrentClip + 1]);
1325 pC->pC2->iVoffset += (M4OSA_UInt32)pC->ewc.dInputVidCts;
1331 pC->pC2->iAoffset +=
1332 (M4OSA_UInt32)(pC->ewc.dATo * pC->ewc.scale_audio + 0.5);
1341 if( ( pC->pC2->iAoffset
1342 - (M4OSA_Int32)(pC->pC2->iVoffset *pC->pC2->scale_audio + 0.5))
1343 > pC->ewc.iSilenceFrameDuration )
1347 err = M4VSS3GPP_intClipReadNextAudioFrame(pC->pC2);
1350 pC->pC2->iAudioFrameCts / pC->pC2->scale_audio,
1351 pC->pC2->iAoffset / pC->pC2->scale_audio,
1352 pC->pC2->uiAudioFrameSize);
1364 pC->pC2->iAoffset -= pC->ewc.iSilenceFrameDuration;
1370 M4VSS3GPP_intCheckAudioEffects(pC, 2);
1376 pC->bTransitionEffect = M4OSA_FALSE;
1380 if( pC->iClip1ActiveEffect >= 0 )
1382 pC->Astate = M4VSS3GPP_kEditAudioState_DECODE_ENCODE;
1386 pC->Astate = M4VSS3GPP_kEditAudioState_READ_WRITE;
1394 (M4VSS3GPP_kEditAudioState_READ_WRITE != pC->Astate) ) /**< encode mode */
1399 if( pC->Astate == M4VSS3GPP_kEditAudioState_TRANSITION )
1402 if( pC->pC1->pSettings->ClipProperties.uiAudioBitrate
1403 > pC->pC2->pSettings->ClipProperties.uiAudioBitrate )
1405 pC->pC1->pSettings->ClipProperties.uiAudioBitrate;
1408 pC->pC2->pSettings->ClipProperties.uiAudioBitrate;
1413 uiAudioBitrate = pC->pC1->pSettings->ClipProperties.uiAudioBitrate;
1418 err = M4VSS3GPP_intCreateAudioEncoder(&pC->ewc, &pC->ShellAPI,
1443 *pC, M4OSA_UInt8 uiClipNumber )
1455 uiClipIndex = pC->uiCurrentClip;
1456 pClip = pC->pC1;
1457 piClipActiveEffect = &(pC->iClip1ActiveEffect);
1461 uiClipIndex = pC->uiCurrentClip + 1;
1462 pClip = pC->pC2;
1463 piClipActiveEffect = &(pC->iClip2ActiveEffect);
1473 RC t = (M4OSA_Int32)(pC->ewc.dATo - pClip->iAoffset/pClip->scale_audio + 0.5);
1475 t = (M4OSA_Int32)(pC->ewc.dATo/*- pClip->iAoffset/pClip->scale_audio*/
1485 // RC for (uiFxIndex=0; uiFxIndex<pC->pClipList[uiClipIndex].nbEffects; uiFxIndex++)
1486 for ( uiFxIndex = 0; uiFxIndex < pC->nbEffects; uiFxIndex++ )
1490 pFx = &(pC->pEffectsList[pC->nbEffects - 1 - uiFxIndex]);
1503 *piClipActiveEffect = pC->nbEffects - 1 - uiFxIndex;
1509 uiFxIndex = pC->nbEffects; /** get out of the for loop */
1528 * @param pC (IN/OUT) Internal edit context
1536 *pC, M4OSA_UInt8 uiClip1orClip2,
1554 pClip = pC->pC1;
1555 pClipSettings = &(pC->pClipList[pC->
1557 // RC pFx = &(pClipSettings->Effects[pC->iClip1ActiveEffect]);/**< Get a shortcut
1559 pFx = &(pC->
1560 pEffectsList[pC->
1562 M4OSA_DEBUG_IF2(( pC->iClip1ActiveEffect < 0)
1563 || (pC->iClip1ActiveEffect > 2), M4ERR_PARAMETER,
1568 pClip = pC->pC2;
1569 pClipSettings = &(pC->pClipList[pC->uiCurrentClip
1571 // RC pFx = &(pClipSettings->Effects[pC->iClip2ActiveEffect]);/**< Get a shortcut
1573 pFx = &(pC->
1574 pEffectsList[pC->
1576 M4OSA_DEBUG_IF2(( pC->iClip2ActiveEffect < 0)
1577 || (pC->iClip2ActiveEffect > 2), M4ERR_PARAMETER,
1587 (M4OSA_Int32)(pC->ewc.dATo + 0.5 - pClip->iAoffset / pClip->scale_audio)
1692 * @param pC (IN/OUT) Internal edit context
1700 *pC, M4OSA_Int16 *pPCMdata1,
1707 M4OSA_Int32 iDur = (M4OSA_Int32)pC->
1708 pTransitionList[pC->uiCurrentClip].uiTransitionDuration;
1713 iPos1 = pC->pC1->iEndTime - (M4OSA_Int32)(pC->ewc.dATo
1714 + 0.5 - pC->pC1->iAoffset / pC->pC1->scale_audio);
1734 switch( pC->pTransitionList[pC->uiCurrentClip].AudioTransitionType )
1797 pC->pTransitionList[pC->uiCurrentClip].AudioTransitionType);
1856 // err = M4VSS3GPP_setCurrentAudioEncoder(&pC->ShellAPI,