When reading a WMV file, I call IMediaPosition.put_rate(2.0), and get a
return value of CO_E_SERVER_PAUSED, which I can't find any decent
documentation for. I've also tried the same thing with IMediaSeeking and get
the same error. Generally speaking, I seem to have lost my ability to set the
frame rate of the WMVs. I have different code that uses the WMSDK and it also
fails (although I'm not sure of the exact error yet). Any suggestions?
thanks
kel
You should provide the hresult in Hex and look it up in the nserrs.h file.
The error text you report is from another module (they are shared).
Iain
--
Iain Downs (DirectShow MVP)
Commercial Software Therapist
www.idcl.co.uk
I'm still failing on what should be a relatively straightforward call. I'm
using a video file that fast forwards correctly in Media Player, and I'm
using 2.0 as my parameter to put_rate. Any suggestions on what could be
wrong? Everything appears to be valid - put_CurrentPosition works fine, and
2.0 seems like a reasonable value. Is there something else I should be
looking into?
> Strange - yesterday, I was getting (0x80004025) as an error this different
> WMV files under different circumstances. Today, I still fail, but with
> E_INVALIDARG. In between, I ran graphedit and a couple of other things, but I
> have no idea why I was getting the other error before and not now. In any
> case...
>
> I'm still failing on what should be a relatively straightforward call. I'm
> using a video file that fast forwards correctly in Media Player, and I'm
> using 2.0 as my parameter to put_rate. Any suggestions on what could be
> wrong? Everything appears to be valid - put_CurrentPosition works fine, and
> 2.0 seems like a reasonable value. Is there something else I should be
> looking into?
I believe that the WM ASF reader filters do not support SetRate (see the
docs for WM ASF Reader Filter), so E_FAIL seems reasonable.
Geraint has a WM Parser filter (www.gdcl.co.uk) which does support SetRate
if this is critical.
> Hmmm.... Ok, thanks. One final question: Since Media Player is able to
> change the rate, am I correct in assuming that they are adjusting a
> user-provided clock (using the WMSDK and not DirectShow), or are they doing
> something else? My DirectShow code might not be salvageable, but I've
> reimplemented my class using the WMSDK and I'm trying to figure out if this
> problem is worth tackling in the new code. Thanks for all your help.
>
The lack of SetRate from the filters is a deliberate omission. Though I
don't know why.
Geraint's (WMFSDK based) code fixes that if you want to continue to use DS
- or roll your own.
I will generally use WMFSDK in preference to DS for Windows Media stuff
unless I absolutely HAVE to have filters in.
You get substantial added complexity and reduced controlability by adding
DS to the mix.