The problem when using h264 decoder in TopoEdit

The problem when using h264 decoder in TopoEdit

 

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

             

7 posts / novo 0
Último post
Para obter mais informações sobre otimizações de compiladores, consulte Aviso sobre otimizações.

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

 

 

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

Citação:

Petter Larsson (Intel) escreveu:

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

The MFTrace information.

Anexos: 

AnexoTamanho
Download playtopause.bmp699.01 KB
Download playtostop.bmp482.16 KB

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

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.

Hi Lily,

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

Regards,
Petter

Faça login para deixar um comentário.