Hi,
I've already written in other section of forum with no response. Now, I retry here...maybe I will be more lucky.
I'm working on a video-conference client...but I've a problem with video decoding from a h.263 stream : my decoded picture is completely wrong (like a tv with no signal). I'm working with CMMFDevVideoPlay class, realesed with S60 FP2 API plugin .
I've tested my code with emulator and device (N78) with same result.
If someone has experience with CMMFDevVideoPlay, can help me, pleaseeeeee!

An extract of code :

Code:
// Decoder initialization
void CVideoOutputStreamEngine::OpenL(TDConCodec aCodec,TVideoSizeFormat aSizeFormat)
	{
	if (iDevVideo)
		{
		delete iDevVideo;
		iDevVideo = NULL;
		}
	iIframeCount = 0;
	iPictureCount = 0;
	iCodec = aCodec;
	
	
	//create client interface to DevVideo subsystem
	iDevVideo = CMMFDevVideoPlay::NewL(*this);
	CleanupStack::PushL(iDevVideo);
		
	
	//create compressed video format
	CCompressedVideoFormat* inputFormat = CCompressedVideoFormat::NewL(_L8("video/h263-2000;profile=0;level=10"));										
	CleanupStack::PushL(inputFormat);
	
	if ( !inputFormat)
		User::Leave(KErrNotSupported);
	
	//locate decoder
	RArray<TUid> foundDecoders;
	CleanupClosePushL(foundDecoders);
	foundDecoders.Reset();	
	iDevVideo->FindDecodersL(_L8("video/h263-2000"), 0, foundDecoders, EFalse);

	TBool found = EFalse;
	TInt numDecoders = foundDecoders.Count();	
	
	if (numDecoders == 0)
		User::Leave(KErrNotSupported);
	
	TInt j = 0;
	RArray<TUncompressedVideoFormat> decodeFormats;
	TUid theDecoderUid;	
	while(!found && j < numDecoders) 
		{
		theDecoderUid = foundDecoders[j];	  
		TRAPD(err,iDevice = iDevVideo->SelectDecoderL(theDecoderUid));
				
		if ( err == KErrNone )
			{			
		    TRAP(err,iDevVideo->SetInputFormatL(iDevice,
		                               *inputFormat,
		                               EDuSeveralSegments,
		                               EDuElementaryStream,
		                               ETrue));
		    if ( err == KErrNone )
		    	{
		    	decodeFormats.Reset();
				iDevVideo->GetOutputFormatListL(iDevice, decodeFormats);
			    
				TInt i = 0;
				while(!found && i < decodeFormats.Count() )
					{	
					iUncompressedData = (TUncompressedVideoFormat)decodeFormats[i];
					//iUncompressedData.iDataFormat = ERgbFbsBitmap;
					//iUncompressedData.iRgbFormat = EFbsBitmapColor16M;

					TRAP(err,iDevVideo->SetOutputFormatL(iDevice, decodeFormats[i]));
					found = (err == KErrNone);					
					i++;
					}		
			      	      
				decodeFormats.Reset();
				decodeFormats.Close();	
		    	}
			}
		j++;
		}
	
	//Destroying foundDecoders 	
	CleanupStack::PopAndDestroy(1); 
	
	
	if ( found )
		{
		//reports on video decoder
		VideoDecoderReportL(theDecoderUid);
		
		//report on uncompressed format
		UncompressedFormatReport(iUncompressedData);

		
		//Set header
		TVideoPictureHeader header ={0};
		header.iProfile = 0; 
		header.iLevel = 10; 
		//header.iVersion = -1;

		//SQCIF 128 × 96 
		//QCIF 176 × 144 
		//CIF 352 × 288 
		TInt x = 176,y = 144;
		switch (aSizeFormat)
			{
			case ESQCIF : x = 128; y = 96; break;
			case EQCIF : x = 176; y = 144; break;
			case ECIF : x = 352; y = 288; break;
			}
		iVideoSizeFormat = aSizeFormat;
		header.iSizeInMemory.iWidth = x; 
		header.iSizeInMemory.iHeight = y;
		header.iDisplayedRect.SetRect(TPoint(0,0),TSize(x,y));
		header.iOptions = TVideoPictureHeader::EDecodingTimestamp;
		
		//configure decoder with header
		iDevVideo->ConfigureDecoderL(header);
				
		
		//inizialize decoder
		iDevVideo->Initialize();
		
#ifdef VIDEOOUTPUTSTREAMENGINE_FILE
		//open debug file
		OpenRawFile(_L("C:\\Data\\data.raw"));
#endif
		}
	else
		User::Leave(KErrNotSupported);
	
	
	CleanupStack::PopAndDestroy(inputFormat);
	CleanupStack::Pop(iDevVideo);
	}



// frame ready from rtp engine are passed to decoder from this method (decoder must be open and start first)
void CVideoOutputStreamEngine::WriteL(TTimeIntervalMicroSeconds aTimestamp,TBool aMark,const TDesC8 &aFrame)
	{
	TInt size = 0;
	TPtrC8 ptr;
	
	if ( iCodec == EVIDEO_CODEC_H263 )
		{
		//H263 1996 version
		TH263FrameType type = FrameType(aFrame);
		
		if ( type==EPSC_INTRA_FRAME)
			iIframeCount++;	
		
		if (iIframeCount == 0 || type == EUNDEFINED_FRAME)
			return;
		
		size = aFrame.Size() - 4;
		ptr.Set( aFrame.Right(size) );
						
		}
	else if ( iCodec == EVIDEO_CODEC_H263v2 )
		{		
		//H263 1998 version
		
		//TODO : find first intra frame for H263 v2
		size = aFrame.Size();
		ptr.Set( aFrame.Right(size) ) ;
		
		}
	else if ( iCodec == EVIDEO_CODEC_H263v3 )
		{
		//not implemented
		return;
		}
		
		
	TVideoInputBuffer* buffer = iDevVideo->GetBufferL(size);	
	if ( buffer )
		{		
		buffer->iOptions = TVideoInputBuffer::EDecodingTimestamp;
		buffer->iDecodingTimestamp = aTimestamp;
		buffer->iData.Copy(ptr);
		
		
		if ( iCodec == EVIDEO_CODEC_H263v2 )
			{
			buffer->iData[0] = 0;
			buffer->iData[1] = 0;
			}
		
		
#ifdef VIDEOOUTPUTSTREAMENGINE_FILE
		SaveRaw(buffer->iData);
#endif
		iDevVideo->WriteCodedDataL(buffer);		
		}
	else
		{
		iObserver->VideoInfoMessage(_L("Error to get buffer"));
		}

	}



//when a picture is ready from decoder this method is called
void CVideoOutputStreamEngine::MdvpoNewPictures()
	{
	TVideoPicture* picture;
	TRAPD(err, picture = iDevVideo->NextPictureL());
		
	if ( err == KErrNone && picture)
		{		
		iPictureCount++;
		switch (iUncompressedData.iDataFormat)
			{
			case ERgbRawData :
				break;
			
			case ERgbFbsBitmap :
				CFbsBitmap* bitmap = picture->iData.iRgbBitmap;
				if (bitmap)
					iObserver->VideoOutputPictureReady(bitmap);
				break;
								
			case EYuvRawData :
				//declare the bitmap
				CFbsBitmap* bmp = new(ELeave)CFbsBitmap();
				 
				//init the bitmap of (exactly) required size
				TSize size(176,144) ;//= picture->iData.iDataSize;
				switch (iVideoSizeFormat)
					{
					case ESQCIF : size.SetSize(128,96); break;
					case EQCIF : size.SetSize(176,144); break;
					case ECIF : size.SetSize(352,288); break;
					}
				
				
				if(bmp->Create(size, EColor16M)==KErrNone)
					{
					
					/*
					if ( iPictureCount == 10)
						{
						TPtrC8 data;
						TInt s = picture->iData.iRawData->Size();
						data.Set((TUint8*)picture->iData.iRawData,s);
						
						SaveRawL(_L("C:\\Data\\data.yuv"),data);						
						}
					*/
					
					if (Yuv420PlanarToRgb24(picture->iData.iRawData,bmp))
						iObserver->VideoOutputPictureReady(bmp);
					}

															
				if(bmp)
					{
					delete bmp;
					bmp = NULL;
					}
					
				break;
			}
		
		//return picture for reuse
		iDevVideo->ReturnPicture(picture);
		}
	}