Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6815 Discussions

After exactly 6 frames captured from a video file VideoRender::LockInputBuffer() always returns UMC::UMC_ERR_TIMEOUT?

9ine
Beginner
672 Views

Following simple_player example I connected video file with null renderer.
That is the frame capture loop. After exactly 6 frames extracted VideoRender::LockInputBuffer() always return time out. What is wrong?

do {
//! lock buffer
do {
sts = pVideoRender->LockInputBuffer(&out);
} while (sts == UMC::UMC_ERR_NOT_ENOUGH_BUFFER || sts == UMC::UMC_ERR_TIMEOUT);

//! capture frame
do {
if (4 >= in.GetDataSize() || sts == UMC::UMC_ERR_NOT_ENOUGH_DATA) {
while ((sts = pSplitter->GetNextData(&in, videoTrack)) == UMC::UMC_ERR_NOT_ENOUGH_DATA)vm_time_sleep(5);
}
out.SetTime(in.GetTime());
out.SetFrameType(in.GetFrameType());
sts = pVideoDecoder->GetFrame(&in, &out);
} while (sts == UMC::UMC_ERR_NOT_ENOUGH_DATA || sts == UMC::UMC_ERR_SYNC);

//! save frame
if (sts == UMC::UMC_OK) {
//....
}

//! unlock buffer
sts = pVideoRender->UnLockInputBuffer(&out);
} while (quit == FALSE);

0 Kudos
5 Replies
Ying_H_Intel
Moderator
672 Views
Hello 9ine,

What codec type do you test? could yousend me thevideo file and your system info, like the cpu, RAM etc.
In general, the UMC_ERR_TIMEOUT indicated that no enough data space or no enough time for processdata.there isdefault wait syn time in LockInputBuffer operation: 320msecumcRes = m_hFreeBufSema.Wait(MAX_FRAME_BUFFERS * 40); in the sample, could it the cause?

Kind Regards,
Ying
0 Kudos
9ine
Beginner
672 Views

I'm not sure the problem is with video file. I used the same select functions codec_pipeline.cpp to create components.
simple_player processes that file without problems, though I never stepped thruframe grabbing thread inthe code in debug mode.
The reson of delay is exactly that 320msec wait function.
The code I used results in the same 6 frames capture fromallvideofiles I tested.

0 Kudos
9ine
Beginner
672 Views
You can see from the code that render is not used. I presume that is the reason of the error.
I used that code after unlock but it never returned from GetRenderFrame() loop????

Ipp64f time = -1;
// never returns from while loop
while (UMC::UMC_ERR_TIMEOUT == pVideoRender->GetRenderFrame(&time))
vm_time_sleep(5);
sts = pVideoRender->RenderFrame();

0 Kudos
Chao_Y_Intel
Moderator
672 Views

Hi,

What is the size of the output buffer? You maybe can check one sample here:
http://software.intel.com/en-us/articles/getting-started-with-intel-ipp-unified-media-classes-sample/

For H.264 decoder sample code, it does not use the render, and the output data is set as the following?


if (status == UMC::UMC_OK){

cYUVData += (frameSize);
DataOut.SetBufferPointer(frameSize);
frameNumber++;

}

thanks,
Chao

0 Kudos
9ine
Beginner
672 Views
Hello

I'm using sample_player and pdf documentation as examples.
I never found external buffer usage in decoding samples. I do not provide it, shoule I?

After Iremoved UMC::FLAG_VREN_REORDER everything worked.

I need generic alg to grab a frame as in sample_player. Is there in documentation such an example?

Thanks
0 Kudos
Reply