[gst-devel] Scheduling Problem

kodam naga raju01e at gmail.com
Tue Jul 28 15:17:38 CEST 2009


Hi,
i am using _activate function in pullreader plugin.
In this function i am checking gst_pad_check_pull_range() to
check upstream element supporting pull based method.
If supports i am starting task like gst_pullreader_getdata_loop.
In this function i am using  gst_pad_pull_range to get the data from
upstream element.

alsasrc ! pushreader ! pullreader ! alsasink

When i run in pipeline gst_pad_pull_range calling getrange funtion of
pushreader.
It is coming into getrange of pushreader, but upto that time no data pushed
by alsasrc
into pushreader so buffer is NULL, so  getrange of pushreader return error
message to gst_pad_pull_range.
This pullreader loop is running continously and checking for data.
Chain function of pushreader not executing.


When i run

alsasrc ! pullreader ! pushreader ! alsasink

(pushreader - Removed set_getrange function from pushreader.
                       Pushreader push the data which it got from pullreader
to alsasink.)

This pipeline is working properly.

But when i try to push data from pushreader to pullreader it is not working.
wheather it is the pipline problem or in gstreamer this type of schduling
itself is not possible.
please help me.

Thanks
Nagaraju K




On Tue, Jul 28, 2009 at 7:20 AM, ved kpl <ved.kpl at gmail.com> wrote:

> Have you added the _activate() on pullreader's sink pad?
> This function is necessary when activating your element in pull mode,
> as I guess by default,  the pads are activated in push mode.
> You can implement your custom activate() , which will inturn start the
> task on the sinkpad of the pullreader (depending upon upstream
> supporting get_range or not), hence operating in pull mode.
> for eg. qtdemux_sink_activate() in qtdemux.c
>
> As far as activate_push() is concerned... it depends on whether you
> want to start the task on the srcpad of pushreader(like queue) and
> push downstream. But in your case the downstream element (pullreader)
> does a get_range..
>
>
>
>
>
> On 7/28/09, kodam naga <raju01e at gmail.com> wrote:
> > Hi,
> > Thank you for your reply.
> > In this pipeline pull element is in middle.
> > I added activate_pull in pullreader plugin.
> > i am using chain function in pushreader plugin.
> > where should i use activate_push.
> >
> > Thanks
> > Nagaraju K
> >
> > On Tue, Jul 28, 2009 at 5:03 AM, pritesh kumar
> > <pritesh.kumar2 at gmail.com>wrote:
> >
> >> hi ,
> >> i cant predict the exact reason, but according to me the pipeline u r
> >> trying to implement is not correct approach.
> >>
> >> the pull elements should be most upstream , otherwise u have to handle
> the
> >> pad activation functions properly.  activate_push () , activate_pull().
> >>
> >>
> >> Alternatively,
> >>
> >> the pipeline can be alsasrc  !  pushreader ! alsasink
> >>
> >> where the pushreader is  a push element .
> >>
> >> whereas in push reader u can have async data queue , which will receive
> >> data from alsasrc and on a separate thread push data to alsasink.
> >>
> >>
> >> let the push reader be a completey push element.
> >>
> >> or may be this approach alsasrc ! push reader ! queue ! alsasink
> >>
> >>
> >> regards
> >> antwan rockamora
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> On Tue, Jul 28, 2009 at 12:59 PM, raju03e <raju01e at gmail.com> wrote:
> >>
> >>>
> >>> Hi,
> >>>
> >>> I am a newbee to gstreamer. I am trying to explore about push and pull
> >>> based
> >>> scheduling in gstreamer.
> >>>
> >>> I wrote pushreader, pullreader plugins.
> >>>
> >>> In pushreader - sink pad is exposed with chain function, src pad with
> >>> set_getrange function. In chain function whatever data got from
> alsasrc,
> >>> I
> >>> stored that buffer into plugin internal buffer. Getrange function is
> >>> using
> >>> this internal buffer.
> >>>
> >>> In pullreader – sink pad is exposed with getrange function, it tries to
> >>> get
> >>> data from pushreader and push that data to alsasink.
> >>>
> >>> Pipeline is alsasrc ! pushreader ! pullreader ! Alsasink
> >>>
> >>> When I tried to execute the above pipeline, only getrange is
> scheduling,
> >>> Chain function is not scheduling.
> >>>
> >>> Please help me to solve this problem.
> >>>
> >>> Thanks
> >>> Nagaraju K
> >>> --
> >>> View this message in context:
> >>> http://www.nabble.com/Scheduling-Problem-tp24693862p24693862.html
> >>> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> >>>
> >>>
> >>>
> >>>
> ------------------------------------------------------------------------------
> >>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >>> 30-Day
> >>> trial. Simplify your report design, integration and deployment - and
> >>> focus
> >>> on
> >>> what you do best, core application coding. Discover what's new with
> >>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >>> _______________________________________________
> >>> gstreamer-devel mailing list
> >>> gstreamer-devel at lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >>>
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> >> 30-Day
> >> trial. Simplify your report design, integration and deployment - and
> focus
> >> on
> >> what you do best, core application coding. Discover what's new with
> >> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> >> _______________________________________________
> >> gstreamer-devel mailing list
> >> gstreamer-devel at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
> >>
> >>
> >
> >
> > --
> > Nagaraju K
> > Software Engineer
> > Aricent Communications
> > 9886490554
> >
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus
> on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>



-- 
Nagaraju K
Software Engineer
Aricent Communications
9886490554
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090728/90892937/attachment.htm>


More information about the gstreamer-devel mailing list