Re: end_of_stream event in render AVStream mini-drivers by Arnaud
Arnaud
Tue Aug 05 22:30:08 CDT 2003
There is something strange about your driver. Setting the pin flags as I
mentioned will trigger the KSEVENT_CONNECTION_ENDOFSTREAM event when a
buffer with the KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM flag is completed (when
the last stream pointer reference to it is released). I have done this many
times and this works. If it does not work for you this means that something
is not right. I have not tried this with DirectX 8.0, but this works fine
with the version of AVStream coming with DirectX 8.1 and above.
What Max mentions is exactly what the AVStream framework does internally
when it the conditions above are met. So of course this works, but you
should not need it!
Just thought I would point this out,
Arnaud.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arnaud Glatron
ZMagic Corporation
"Hari" <harik2k2@hotmail.com> wrote in message
news:054901c35bae$52d5db50$a401280a@phx.gbl...
> Thanks a lot Max! It worked! I had already done what
> Arnaud had pointed out but this was the missing aspect!
>
> Thanks once again.
> Hari.
> >-----Original Message-----
> >You have to fire EOS event.
> >
> >Do something like this
> >
> > KsPinGenerateEvents(
> > m_pKsPin,
> > &KSEVENTSETID_Connection,
> > KSEVENT_CONNECTION_ENDOFSTREAM,
> > 0,
> > NULL,
> > NULL,
> > NULL );
> >
> >
> >-- Max.
> >
> >
> >"Hari" <harik2k2@hotmail.com> wrote in message
> >news:073501c35b22$99e938c0$a501280a@phx.gbl...
> >> Hi,
> >>
> >> I have implemented an AVStream mini-driver to stream DV
> >> data to my device. The driver is listed as a filter in
> >> the "WDM Streaming Rendering devices" and is able to
> >> successfully stream also. The problem iam facing is as
> >> follows:
> >>
> >> When there is no more data to stream then AVStream
> class
> >> driver sends a stream pointer with no MDL associated
> with
> >> it. This is an indication to the mini-driver about the
> >> non-availability of stream data. But my driver would
> >> like to indicate "end_of_stream" to the application so
> >> that the state of the filter graph is changed to "STOP"
> >> state. I tried to set the optionsFlags in the last
> >> stream pointer to KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM.
> >> But still applications like GraphEdit is waiting for
> user
> >> intervention to stop the filter graph. MSDV driver, on
> >> the other hand, is able to issue this end_of_stream
> event
> >> and the filter graph needs no intervention to
> transition
> >> to STOP state.
> >>
> >> What needs to be done in my KS mini-driver to indicate
> >> end_of_stream to directshow applications?
> >>
> >> Any suggestions on this will be highly appreciated.
> >>
> >> Hari.
> >
> >
> >.
> >