DxVideoRender presentation time

DxVideoRender presentation time

I have two problems with rendering video from rtsp stream. I'm using live555 rtsp client with IPP H264Decoder and DxVideoRender.

a) First problem is that every time I render video with DxVideoRender in windows 7 aero automaticly turns off, is this normal behavior? Can I fix that?

b) Second problem is bigger issue for me, I'm filling H264Decoder with H264 frames that I recieve via RTSP butI often get some old frame and so the video is jumping to past. Is there any way to reorder surfaces in VideoRender (with some caching delay)? Can I remove old surface from renderer display list?

Thank you very much for your help.

Best regards Ivan Roubicek

7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.


For the questions a): The DX render code are writing with the old Window release, we noticed one problem with the Aero is on in the Windows 7. So aero is disabled in the sample code.

For b), is this the rendering problem, or decoding problem? Does the decoder provide the video stream in the correct display order? I the


Do you plan to fix windows 7 aero problem?

Best regards Ivan

so I've tried to implement ffmpeg and SDL video render on my current rtsp implementation and it works perfectly. I believe I don't use H264VideoDecoder with DxVideoRender correctly. According to documentation I'm quite confused because I should:

1) LockInputBuffer
2) GetFrame
3) RenderFrame
4) UnlockInputBuffer

I also don't see anywhere specified when should I call decoder GetFrame and how to react on NOT_ENOUGH_DATA status with render.

So when I call methods in this order (all in the same thread):
1) render.LockInputBuffer
2) decoder.GetFrame
3) render.GetRenderFrame
4) render.RenderFrame
5) render.UnlockInputBuffer

Every h264 stream that I play got flashbacks (*)alot. So I've tried to mix order a little and when I call methods in this order:

1) render.LockInputBuffer
2) render.UnlockInputBuffer
3) render.GetRenderFrame
4) render.RenderFrame
5) decoder.GetFrame

Some of my h264 stream (even full hd video) plays correctly. But the cameras that I'm implementing RTSP for (BASLER BIP-1300c and BOSCH NBC-265-P) got flashbacks(*) or is not displayed correctly at all.

SPS header of correctly played video (full hd 264 video streamed through Live555 MediaServer):

SPSheader of not correctly played video (BOSCH NBC-265-P):

*Video framesare not played in correct order by this I mean that I see old frames in video a lot.

Thank you for your help.
Best regardsIvan

Nobody? :(

I forget to say that decoder gives me frames in correct order if I'm not using VideoRender.

Good day.

You can see example of render usage in smiple_player sample.

>I also don't see anywhere specified when should I call decoder GetFrame and how to react on NOT_ENOUGH_DATA status with render.

Render returns NOT_ENOUGH_DATA if it have not any frame in internal memory. So you need to call rendering after surface unlocking or wait for decoder in case of separate thread.

Generally use should have something like this for each complete frame:

    pRender->LockInputBuffer(pDataOut); // lock internal render memory for complete frame


        if(!pDataIn && pDataIn->GetDataSize() < 4) // check for eos




                status = pSplitter->GetNextData(pDataIn, 0); // get input data from splitter

            } while(status == UMC_ERR_NOT_ENOUGH_DATA);

            if(status == UMC_ERR_END_OF_STREAM)

                pDataIn = NULL; // pass null to decoder on eos to get buffered frames

            else if(status != UMC_OK) // exit on error


        status = pDecoder->GetFrame(pDataIn, pDataOut); // try to decode frame
    } while(pDataIn && status == UMC_ERR_NOT_ENOUGH_DATA); // loop until we have complete frame or eos or error
    pRender->UnLockInputBuffer(pDataOut); // unlock internal render memory

    pRender->GetRenderFrame(&fFrameTime); // check frame availability and time stamp, use this for synchronization if you have multiple threads

    pRender->RenderFrame(); // actual rendering

Leave a Comment

Please sign in to add a comment. Not a member? Join today