Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

The problem when using h264 decoder in TopoEdit

Lily_D_
Beginner
879 Views

 

Hi Everyone:

                 I have registered the mfx_mft_h264vd_32.dll to my computer.

                 By using TopoEdit, I add the Intel Media SDK H.264 Decoder MFT to playback the .mp4(H264 internal). The problem will appear if you do as follows:

                 1.  Click the play button on the TopoEdit. It can succeed to playback;

                  2. Click the stop button on the TopoEdit or close the playback window;

                  3.  Click the play button on the TopoEdit again. It cannot  playback.

                 According to my trace information, I find that when stop the session, the MFT(MFPluginVDec::ProcessMessage(...)) will send the MFT_MESSAGE_COMMAND_FLUSH and MFT_MESSAGE_NOTIFY_END_STREAMING messge.

                  I have write a MFT that make the video to gray, the trace information show that when stop the session, the MFT(ProcessMessage(...)) will send the MFT_MESSAGE_COMMAND_FLUSH  message twice without MFT_MESSAGE_NOTIFY_END_STREAMING messge. And it can succeed to preview again and again.

                 The problem is also appeared when the computer resumed from hibernate(S4), that is,  the playback or preview will stop and not play again only if restart the TopoEdit.

Beg the help from somebody!

Thank you

             

0 Kudos
6 Replies
Petter_L_Intel
Employee
879 Views
Hi Lily, Can you please tell us what version of Media SDK you are using? Are you using the default MFT sample or have made modifications to it? If you can, please also provide mftrace log and Media SDK trace log. Regards, Petter
0 Kudos
Lily_D_
Beginner
879 Views

 

 

Hi Petter:

The SDK  I used is Media SDK 2012 R3.

I did not modify the source code except adding same trace information

The mftrace information is as follows.

Lily

Petter Larsson (Intel) wrote:

Hi Lily,

Can you please tell us what version of Media SDK you are using?

Are you using the default MFT sample or have made modifications to it?

If you can, please also provide mftrace log and Media SDK trace log.

Regards,
Petter

0 Kudos
Lily_D_
Beginner
879 Views

The MFTrace information.

0 Kudos
Petter_L_Intel
Employee
879 Views

Hi Lily,

sorry for the delayed answer. We are studying the MFT sample code to see if there is something that can be done to resolve the issue. We will provide an update shortly.

Regards,
Petter

0 Kudos
Lily_D_
Beginner
879 Views

I have resolve the stop to play bug.
When stop the media session, the decoder receive the message as follows:
    MFT_MESSAGE_COMMAND_FLUSH: ResetCodec();
    MFT_MESSAGE_NOTIFY_END_STREAMING.
And then play the media session. The decoder receive the message MFT_MEDDAGE_NOTIFY_START_OF_STREAM(set somep parameters)


I change the code as follows:
HRESULT MFPluginVDec::ProcessMessage(MFT_MESSAGE_TYPE eMessage,
                                     ULONG_PTR ulParam)
{
      ...
   switch (eMessage)
   {
    case MFT_MESSAGE_COMMAND_FLUSH:
        DBG_TRACE("MFT_MESSAGE_COMMAND_FLUSH");
        if (MFX_ERR_NONE != ResetCodec(lock)) hr = hr;//E_FAIL;
        m_bNotifyStartOfStream = false;
    m_NeedInputEventInfo.m_requested = 0;
        break;

    case MFT_MESSAGE_NOTIFY_END_STREAMING:
        DBG_TRACE("MFT_MESSAGE_NOTIFY_END_STREAMING");
        break;

    case MFT_MESSAGE_NOTIFY_START_OF_STREAM:
        if (!m_bNotifyStartOfStream)
        {
            if (!m_pAsyncThread)
            {
                SAFE_NEW(m_pAsyncThread, MyThread(hr, thAsyncThreadFunc, this));
                if (SUCCEEDED(hr) && !m_pAsyncThread) hr = E_FAIL;
            }
 // else if (MFX_ERR_NONE != ResetCodec(lock)) hr = E_FAIL;
            m_bStreamingStarted = true;
            m_bDoNotRequestInput = false;
            m_bNotifyStartOfStream = true;
            if (SUCCEEDED(hr)) hr = RequestInput();
            DBG_TRACE("MFT_MESSAGE_NOTIFY_START_OF_STREAM");
        }
        break;

        ...
   }
}
When stop to play, it can suceed to preview again.

0 Kudos
Petter_L_Intel
Employee
879 Views

Hi Lily,

thanks for sharing a solution. We are also working on resolving this for future releases of Intel Media SDK samples.

Regards,
Petter

0 Kudos
Reply