Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: Connect WMReader to WMWriter

HTVi
TV Discussion Newsgroups

Connect WMReader to WMWriter
jdelafon[ at ]gmail.com 5/24/2007 4:15:12 PM
Hi,

I'm using IWMWriter and a custom sink to write the compressed data to
a remote file.
(header + compressed samples)

Afterwards I'm using a IWMReader to read the file.
The Open command passes, but it fails on the Start with a WMT_ERROR,
hr = E_HANDLE.

Also when I read the file using media player, he doesn't want to open
the file.

At the other hand, when I'm waiting until the file is fully written,
(the header is rewritten twice)
I can open the file in media player.

Who has an idea how I can use IWMReader before the file is completly
written.
And so with only the partial header information.

Best Regards,
jdelafon

Re: Connect WMReader to WMWriter
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 5/24/2007 4:25:24 PM
From: "jdelafon[ at ]gmail.com"

[Quoted Text]
> I'm using IWMWriter and a custom sink to write the
> compressed data to a remote file.
> (header + compressed samples)
>
> Afterwards I'm using a IWMReader to read the file.
> The Open command passes, but it fails on the Start with a
> WMT_ERROR, hr = E_HANDLE.
>
> Also when I read the file using media player, he doesn't
> want to open the file.
>
> At the other hand, when I'm waiting until the file is
> fully written, (the header is rewritten twice)
> I can open the file in media player.
>
> Who has an idea how I can use IWMReader before the file
> is completly written.
> And so with only the partial header information.

The problem is not the partial header, which should be
enough (just try skipping the header rewrite and the file
should play back anyway). Most likely the problem is the
sharing mode you are using or the missing index: you can fix
the former but there is no solution for the latter (well,
maybe opening a custom IStream in the WMReader).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: Connect WMReader to WMWriter
jdelafon[ at ]gmail.com 5/29/2007 12:10:22 PM
On 24 mei, 18:25, "Alessandro Angeli" <nob...[ at ]nowhere.in.the.net>
wrote:
[Quoted Text]
> From: "jdela...[ at ]gmail.com"
>
>
>
>
>
> > I'm using IWMWriter and a custom sink to write the
> > compressed data to a remote file.
> > (header + compressed samples)
>
> > Afterwards I'm using a IWMReader to read the file.
> > The Open command passes, but it fails on the Start with a
> > WMT_ERROR, hr = E_HANDLE.
>
> > Also when I read the file using media player, he doesn't
> > want to open the file.
>
> > At the other hand, when I'm waiting until the file is
> > fully written, (the header is rewritten twice)
> > I can open the file in media player.
>
> > Who has an idea how I can use IWMReader before the file
> > is completly written.
> > And so with only the partial header information.
>
> The problem is not the partial header, which should be
> enough (just try skipping the header rewrite and the file
> should play back anyway). Most likely the problem is the
> sharing mode you are using or the missing index: you can fix
> the former but there is no solution for the latter (well,
> maybe opening a custom IStream in the WMReader).
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> //http://www.riseoftheants.com/mmx/faq.htm- Tekst uit oorspronkelijk bericht niet weergeven -
>
> - Tekst uit oorspronkelijk bericht weergeven -

Thank you for answering my message.

Some clarifications :
When I skip the header rewrite the file seems corrupted. It doesn't
open anymore in media player.

And in my code project:
I'm using a custom IStream in the WMReader, which reads the header
during Open, but than the program fails on the Start with a
WMT_ERROR,
hr = E_HANDLE.

I was thinking that maybe a attribute is not yet stored in the header,
which is needed for playback. But I don't know how to find out which
one.



Re: Connect WMReader to WMWriter
Andrey Somsikov <andrey.somsikov[ at ]gmail.com> 5/30/2007 11:30:16 AM
jdela...[ at ]gmail.com wrote:
[Quoted Text]
> On 24 mei, 18:25, "Alessandro Angeli" <nob...[ at ]nowhere.in.the.net>
> wrote:
> > From: "jdela...[ at ]gmail.com"
> >
> >
> >
> >
> >
> > > I'm using IWMWriter and a custom sink to write the
> > > compressed data to a remote file.
> > > (header + compressed samples)
> >
> > > Afterwards I'm using a IWMReader to read the file.
> > > The Open command passes, but it fails on the Start with a
> > > WMT_ERROR, hr = E_HANDLE.
> >
> > > Also when I read the file using media player, he doesn't
> > > want to open the file.
> >
> > > At the other hand, when I'm waiting until the file is
> > > fully written, (the header is rewritten twice)
> > > I can open the file in media player.
> >
> > > Who has an idea how I can use IWMReader before the file
> > > is completly written.
> > > And so with only the partial header information.
> >
> > The problem is not the partial header, which should be
> > enough (just try skipping the header rewrite and the file
> > should play back anyway). Most likely the problem is the
> > sharing mode you are using or the missing index: you can fix
> > the former but there is no solution for the latter (well,
> > maybe opening a custom IStream in the WMReader).
> >
> > --
> > // Alessandro Angeli
> > // MVP :: DirectShow / MediaFoundation
> > // mvpnews at riseoftheants dot com
> > //http://www.riseoftheants.com/mmx/faq.htm- Tekst uit oorspronkelijk bericht niet weergeven -
> >
> > - Tekst uit oorspronkelijk bericht weergeven -
>
> Thank you for answering my message.
>
> Some clarifications :
> When I skip the header rewrite the file seems corrupted. It doesn't
> open anymore in media player.
>
> And in my code project:
> I'm using a custom IStream in the WMReader, which reads the header
> during Open, but than the program fails on the Start with a
> WMT_ERROR,
> hr = E_HANDLE.
>
> I was thinking that maybe a attribute is not yet stored in the header,
> which is needed for playback. But I don't know how to find out which
> one.

WMP should be able to play file with "incomplette" header. I only
noticed problems when using custom stream plugin mechanism for WMP.

Anyway you could try to set right values for the following fields in
first header you writing (in OnHeader data):
1. File Properties Object: File Size, Data Packets Count, Play
Duration,
2. Data Object: Total Data Packets

You can read those fields from original file. You could try to set
approximate values because you will rewrite them.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen