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

Sending user input while in buffering in rtsp streamsource filter

25 views
Skip to first unread message

Anoop R.K

unread,
Nov 14, 2009, 1:54:01 AM11/14/09
to
Dear all..,

I am designing a rtsp stream source filter.While designing a filter i
am facing a couple of challenges

While we are in buffering(after sending EC_STARVATION to filter grah
manager),or in other words after sending EC_STARVATION to the filter
graph manager,transition is not completed from pause to run(as i am
sending VFW_S_STATE_INTERMEDIATE from getstate()).
At this time iam not able to take any user input from mediaplayer
(neither pause or stop is called from filter graph manager).So that i
can't stop the current buffering that is.


Is there a way to get pasue or stop while in buffering.


Thanks
Anoop

Alessandro Angeli

unread,
Nov 14, 2009, 3:03:18 PM11/14/09
to
From: "Anoop R.K"

> While we are in buffering(after sending EC_STARVATION to
> filter grah manager),or in other words after sending
> EC_STARVATION to the filter graph manager,transition is
> not completed from pause to run(as i am sending
> VFW_S_STATE_INTERMEDIATE from getstate()).
> At this time iam not able to take any user input from
> mediaplayer (neither pause or stop is called from filter
> graph manager).So that i can't stop the current buffering
> that is.

Instead of notifying EC_STARVATION and returning
VFW_S_STATE_INTERMEDIATE, simply return VFW_S_CANT_CUE. That
way, the graph will transition to paused (and then to
running) without waiting for you. If you do that, be sure to
not deliver samples while paused but only when running.

A real-time network streaming source is the same as a live
capture source:

http://msdn.microsoft.com/en-us/library/dd377472.aspx
http://msdn.microsoft.com/en-us/library/dd390645.aspx


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


Anoop R.K

unread,
Nov 15, 2009, 8:37:22 AM11/15/09
to
On Nov 15, 1:03 am, "Alessandro Angeli" <nob...@nowhere.in.the.net>
wrote:

> From: "Anoop R.K"
>
> > While we are in buffering(after sending EC_STARVATION to
> > filter grah manager),or in other words after sending
> > EC_STARVATION to the filter graph  manager,transition is
> > not completed from pause to run(as i am sending
> > VFW_S_STATE_INTERMEDIATE from getstate()).
> > At this time iam not able to take any user input from
> > mediaplayer (neither pause or stop is called from filter
> > graph manager).So that i can't stop the current buffering
> > that is.
>
> Instead of notifying EC_STARVATION and returning
> VFW_S_STATE_INTERMEDIATE, simply return VFW_S_CANT_CUE. That
> way, the graph will transition to paused (and then to
> running) without waiting for you. If you do that, be sure to
> not deliver samples while paused but only when running.
>
> A real-time network streaming source is the same as a live
> capture source:
>
> http://msdn.microsoft.com/en-us/library/dd377472.aspxhttp://msdn.microsoft.com/en-us/library/dd390645.aspx

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


HI..,
The problem is if i directly send VFW_S_CANT_CUE with out gathering
enough data, the filter will go to run(in this case we won't have
enough data to render).

Thanks
Anoop


Geraint Davies

unread,
Nov 16, 2009, 4:57:10 AM11/16/09
to
On Sun, 15 Nov 2009 05:37:22 -0800 (PST), "Anoop R.K"
<anoo...@gmail.com> wrote:

>HI..,
>The problem is if i directly send VFW_S_CANT_CUE with out gathering
>enough data, the filter will go to run(in this case we won't have
>enough data to render).

You can suspend delivery in your filter until you are ready, even if
the graph is running. Once you restart, you adjust all your timestamps
to the current stream time plus a latency.

0 new messages