multimediacommscontroller/mmccfilesourcesink/src/mccfilevideo.cpp
branchRCL_3
changeset 12 91f50911ea81
parent 0 1bce908db942
child 15 f40c1a748eb9
equal deleted inserted replaced
11:a5ac35ca6d81 12:91f50911ea81
   400         ( mp4_u32* ) &iFrameSize, ( mp4_u32* ) &iPosition,
   400         ( mp4_u32* ) &iFrameSize, ( mp4_u32* ) &iPosition,
   401         ( mp4_bool* ) &keyFrame, NULL ) != MP4_OK )
   401         ( mp4_bool* ) &keyFrame, NULL ) != MP4_OK )
   402 		{
   402 		{
   403 		__FILESOURCE_CONTROLL( "CMccFileVideo::ReadFrameL, reading frame, NOT OK" )
   403 		__FILESOURCE_CONTROLL( "CMccFileVideo::ReadFrameL, reading frame, NOT OK" )
   404 		CleanupStack::PopAndDestroy( mediaBuffer );
   404 		CleanupStack::PopAndDestroy( mediaBuffer );
       
   405 	  	if( !iSendReadFrameFailEvent )
       
   406 	  	    {
       
   407 	  	    iReadFrameFailCount++;
       
   408 	  	    if( iReadFrameFailCount >= KMccReadFrameFailCountMax )
       
   409 	  	    	{
       
   410 	  	    	iSendReadFrameFailEvent = ETrue;
       
   411 	  	    	iSource.InvalidVideoFrame( ETrue );
       
   412 	  	    	}
       
   413 	  	    }
   405         }
   414         }
   406     else
   415     else
   407     	{
   416     	{
   408  		__FILESOURCE_CONTROLL_INT1( "CMccFileVideo::ReadFrameL, reading frame, OK, position", 
   417  		__FILESOURCE_CONTROLL_INT1( "CMccFileVideo::ReadFrameL, reading frame, OK, position", 
   409  		                            iPosition )   		
   418  		                            iPosition )   		
       
   419  		                            
       
   420 	    if( iSendReadFrameFailEvent )
       
   421 		    {
       
   422 		    iSendReadFrameFailEvent = EFalse;
       
   423 		    iReadFrameFailCount = 0;
       
   424 		    iSource.InvalidVideoFrame( EFalse );
       
   425 		    }
   410 
   426 
   411         DoTimingCorrection( iPosition );
   427         DoTimingCorrection( iPosition );
   412                
   428                
   413         // Update read interval (how much position changes on each frame read)
   429         // Update read interval (how much position changes on each frame read)
   414         iReadInterval = iPosition - oldPosition;
   430         iReadInterval = iPosition - oldPosition;