Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Missing stream data reader example in UMC

Ari_L_
Beginner
277 Views
Hi.

I am developing a mpeg2/mpeg4/h.264 video decoder library for Java using JNI/IPP. The most common use for the library will be to decode live video streams from various IP camera models.

IPP version used: w_ipp_ia32_p_5.3.2.073
Samples version: w_ipp-samples_p_5.3.095

In the IPP samples you have given three different types of data readers; UMC::FileReader, UMC::FIOReader and UMC::VobReader. Each of these samples deal with files whereas i deal with streams. Handling streams is obviously quite different since you cannot do any seeking inside streams. I have managed to make a semi functional stream data reader by reading the UMC documentation as well as some trial and error. I would, however, really appreciate to have a working sample stream data reader to make sure that i manage all data reader method calls correctly. I said that the reader i made was "semi functional" because it worked fine with w_ipp_ia32_p_5.2.057/w_ipp-samples_p_5.2.049 but not at all with the new version.

I have noticed in another post that there is a UMC::DataReaderHttp class in existence (i also found it defined in umc_readers.h). Why is the source for this reader not included in the IPP samples package? Can i get it from somewhere? Are there any other stream data readers that you can direct me to for working examples?

In case it is of any relevance, here is a rough description what i do:
I use the AVSynch class to set up the decoding pipeline. I initialize my custom data reader and video renderer through the AVSync::ExternalInfo.m_pDataReader/m_pVideoRender members. The AVSynch.Init() call gets blocked. It clearly uses my custom data reader to try and parse the stream but apparently it fails to identify the stream type or something since the Init() call never returns. As i mentioned, in an earlier IPP version that i used, the exact same code worked just fine.

Thank you in advance for any assistance!
0 Kudos
2 Replies
Vladimir_Dudnik
Employee
277 Views

Hello,

unfortunately we do not provide stream reader example in UMC. Please take a look on UMC documentation to see what was changed in base classes to find how you need to modify your code to adopt to new version. And please also submit your issue report through Intel Premier Support channel.

Regards,
Vladimir

0 Kudos
Ari_L_
Beginner
277 Views
Hello,

Thank you for your reply.

I figured out the reason for the problem. By debugging i noticed that the ThreadedDemuxer::ThreadRoutine() initialization phase never finished. It got stuck in the while loop. In my opinion this loop does not work properly. If i am reading it correctly then as long as m_pDemuxer->CheckNextData(&data, &uiTrack) returns UMC_OK the loop will never exit. Is this not incorrect behaviour?

I modified the ThreadedDemuxer::ThreadRoutine() by replacing the 'else if' clause with just 'if' in:

...
...
else if (UMC_ERR_NOT_ENOUGH_BUFFER == umcRes || UMC_ERR_END_OF_STREAM == umcRes ||
m_pRulesState->m_iMatchedTracks >= m_pRulesState->m_iMaxTracks)
...
...

... and recompiled the UMC libs and it started working.

This applies for 'w_ipp-samples_p_5.3.095'

The reason it works with the file data reader included in the sample is that the file data reader eventually returns UMC_ERR_END_OF_STREAM, which exits the loop "accidentaly".

Is this a bug in the samples or am i reading it wrong?

I would still hope that you can include some stream data reader example in a future release. ;-)

Rgs. Mikael
0 Kudos
Reply