Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

WM9 Reader doesn't read from IStream!

4 views
Skip to first unread message

Steve Rencontre

unread,
Feb 12, 2003, 7:37:05 AM2/12/03
to
I've got a media file (.WMA) created by capturing the output of the Writer
in a strictly sequential format, so that the header can't be updated at the
end of the encoding. The initial header is appropriate for a broadcast, thus
it has the packet count as -1, broadcast flag set, seekable flag clear, etc.
I can write it to a file or deliver it through a web server and Media Player
9 will play it. If I call IWMReader::Open(), I can play it in my own code.

However, if I wrap the data in code which presents it through an IStream,
and call IWMReader::OpenStream(), it fails in an obscure way. I receive a
callback with a successful WMT_OPENED status, but then before any samples
are decoded I get a WMT_ERROR status with the HRESULT 0x80070006 ("The
handle is invalid"). What handle? The data value for the callback is zero,
which would certainly be an invalid handle, but that doesn't help much.

This happens both with my own IStream object and with the ReadFromStream app
in the SDK samples directory (after fixing the bugs in that!), so I don't
think it's a bug in my code.

It didn't happen with WM7/8 :-(((

It also doesn't happen if the WMA file has a finalised header. In some cases
I can frig the header as it's created, but in the general case I want to be
able to handle live audio, where I won't be able to work out the correct
values in advance.

I've tried implementing the poorly-documented IWMIStreamProps interface, but
that hasn't made any difference. I wonder about the QueryInterface call for
the undocumented {94BC0598...} interface, but a Google search has found
nothing except a couple of other people also wondering about it.

--
Steve Rencontre
(From: address is junk but Reply-To: is valid)


0 new messages