wxMediaCtrl.SetPlaybackRate() appears to be broken for wxMEDIABACKEND_WMP10

I use wxMediaCtrl for video playback on both Windows and Mac.

In wxPython 2.6.x, I had the ability change the playback speed with both
wxMEDIABACKEND_DIRECTSHOW and wxMEDIABACKEND_QUICKTIME, though it took a bit
of work because the media players use different models. (Obviously, I use
different backends depending on platform and video format as necessary.)

In wxPython 2.8.x, I switched from wxMEDIABACKEND_DIRECTSHOW to
wxMEDIABACKEND_WMP10 for non-QuickTime formats on Windows. It supports more
formats, including WMV and WMA files produced in the past two years, which I
need to support. Unfortunately, SetPlaybackRate() doesn't appear to work
with wxMEDIABACKEND_WMP10.

If you'd like a sample program to play with these issues with, you can
download http://transanadev.wceruw.org/download/Files/video_player.py. You
can alter the version of Windows Media Player used by editing lines 52-55.
(You'll also need qtmlClient.dll if you want to use it with QuickTime video
on Windows.) You'll see that with MPEG-1 video, for example, the Rate
button has no effect with wxMEDIABACKEND_WMP10, while it works fine with
wxMEDIABACKEND_DIRECTSHOW and well enough with wxMEDIABACKEND_QUICKTIME.
(You have to stop QuickTime video for the playback speed to change.)

Am I missing something, or is that a bug?

David K. Woods, Ph.D.
Transana Lead Developer
Wisconsin Center for Education Research
University of Wisconsin, Madison
http://www.transana.org

David Woods wrote:

I use wxMediaCtrl for video playback on both Windows and Mac.

In wxPython 2.6.x, I had the ability change the playback speed with both
wxMEDIABACKEND_DIRECTSHOW and wxMEDIABACKEND_QUICKTIME, though it took a bit
of work because the media players use different models. (Obviously, I use
different backends depending on platform and video format as necessary.)

In wxPython 2.8.x, I switched from wxMEDIABACKEND_DIRECTSHOW to
wxMEDIABACKEND_WMP10 for non-QuickTime formats on Windows. It supports more
formats, including WMV and WMA files produced in the past two years, which I
need to support. Unfortunately, SetPlaybackRate() doesn't appear to work
with wxMEDIABACKEND_WMP10.

If you'd like a sample program to play with these issues with, you can
download http://transanadev.wceruw.org/download/Files/video_player.py. You
can alter the version of Windows Media Player used by editing lines 52-55.
(You'll also need qtmlClient.dll if you want to use it with QuickTime video
on Windows.) You'll see that with MPEG-1 video, for example, the Rate
button has no effect with wxMEDIABACKEND_WMP10, while it works fine with
wxMEDIABACKEND_DIRECTSHOW and well enough with wxMEDIABACKEND_QUICKTIME.
(You have to stop QuickTime video for the playback speed to change.)

Am I missing something, or is that a bug?

It could be a bug. The SetPlaybackRate method is implemented, and it simply calls a method in the ActiveX object, so I would expect it to work. But I don't know enough about the workings of the WMP10 object to know if my expectations are valid or not. Do you get a True or False return value?

bool wxWMP10MediaBackend::SetPlaybackRate(double dRate)
{
     HRESULT hr = m_pWMPSettings->put_rate(dRate);
     if(FAILED(hr))
     {
         wxWMP10LOG(hr);
         return false;
     }

     return true;
}

Please enter a bug report about it.

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

David Woods wrote:
> I use wxMediaCtrl for video playback on both Windows and Mac.
>
> In wxPython 2.6.x, I had the ability change the playback speed with
> both wxMEDIABACKEND_DIRECTSHOW and
wxMEDIABACKEND_QUICKTIME, though it
> took a bit of work because the media players use different models.
> (Obviously, I use different backends depending on platform
and video
> format as necessary.)
>
> In wxPython 2.8.x, I switched from wxMEDIABACKEND_DIRECTSHOW to
> wxMEDIABACKEND_WMP10 for non-QuickTime formats on Windows. It
> supports more formats, including WMV and WMA files produced in the
> past two years, which I need to support. Unfortunately,
> SetPlaybackRate() doesn't appear to work with wxMEDIABACKEND_WMP10.
>
> If you'd like a sample program to play with these issues
with, you can
> download
http://transanadev.wceruw.org/download/Files/video_player.py.
> You can alter the version of Windows Media Player used by editing
> lines 52-55. (You'll also need qtmlClient.dll if you want to use it
> with QuickTime video on Windows.) You'll see that with
MPEG-1 video,
> for example, the Rate button has no effect with
wxMEDIABACKEND_WMP10,
> while it works fine with wxMEDIABACKEND_DIRECTSHOW and well enough
> with wxMEDIABACKEND_QUICKTIME. (You have to stop QuickTime
video for
> the playback speed to change.)
>
> Am I missing something, or is that a bug?

It could be a bug. The SetPlaybackRate method is implemented, and it
simply calls a method in the ActiveX object, so I would expect it to
work. But I don't know enough about the workings of the
WMP10 object to
know if my expectations are valid or not. Do you get a True or False
return value?

bool wxWMP10MediaBackend::SetPlaybackRate(double dRate)
{
     HRESULT hr = m_pWMPSettings->put_rate(dRate);
     if(FAILED(hr))
     {
         wxWMP10LOG(hr);
         return false;
     }

     return true;
}

Please enter a bug report about it.

The return value is True, so it thinks it has changed the speed.

I submitted a bug report, Request ID 1663870.

Thanks,
David