Facing problems running gstreamer element in pull mode

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Facing problems running gstreamer element in pull mode

Rajashree Chivakula

Hi all,

I'm new to gstreamer so please bear with me if my issue seems trivial.

I'm developing an application to implement Adaptive Streaming. For this, I have the souphttpsrc element that's linked to my adaptivestreaming element. The adaptivestreaming element needs to send out URIs to the souphttpsrc element and download chunks of data from the network, which it then passes along to the demux/decoders. Each chunk has it's own URI. The problem I'm facing is : how do i design it such that my adaptivestreaming element will control the flow of data from souphttpsrc ? Basically run my adaptivestreaming element in pull mode (I'm not really interested in random accesses, I need to download all the data that's accessible by the URI); I did implement the activate_function and activatepull_function, but it didn't work. I could not enter my looping function associated with the sinkpad of my adaptivestreaming element.
In my activate function :

static gboolean gst_adaptive_streaming_activate (GstPad *pad) {

    if(gst_pad_check_pull_range(pad)) {

       return gst_pad_activate_pull(pad, TRUE);

    }

    else {

        g_print("Cannot activate task ...\n");

        return FALSE;

    }

}

gst_pad_check_pull_range() returned FALSE ;  But souphttplivesrc does support getrangefunc(); Any idea what’s happening here ?


Thanks



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Facing problems running gstreamer element in pull mode

Kapil Agrawal
Are you trying to implement something as
gst-launch adaptivestreaming ! souphttpsrc ! decodebin ! sink ?

If yes then I doubt how could you do that as  souphttpsrc only has src pads.

I would have tried to make changes in the souphttpsrc element to implement adaptive streaming inside it ?

Regards
Kapil

On Thu, May 5, 2011 at 5:17 AM, Rajashree Chivakula <[hidden email]> wrote:

Hi all,

I'm new to gstreamer so please bear with me if my issue seems trivial.

I'm developing an application to implement Adaptive Streaming. For this, I have the souphttpsrc element that's linked to my adaptivestreaming element. The adaptivestreaming element needs to send out URIs to the souphttpsrc element and download chunks of data from the network, which it then passes along to the demux/decoders. Each chunk has it's own URI. The problem I'm facing is : how do i design it such that my adaptivestreaming element will control the flow of data from souphttpsrc ? Basically run my adaptivestreaming element in pull mode (I'm not really interested in random accesses, I need to download all the data that's accessible by the URI); I did implement the activate_function and activatepull_function, but it didn't work. I could not enter my looping function associated with the sinkpad of my adaptivestreaming element.
In my activate function :

static gboolean gst_adaptive_streaming_activate (GstPad *pad) {

    if(gst_pad_check_pull_range(pad)) {

       return gst_pad_activate_pull(pad, TRUE);

    }

    else {

        g_print("Cannot activate task ...\n");

        return FALSE;

    }

}

gst_pad_check_pull_range() returned FALSE ;  But souphttplivesrc does support getrangefunc(); Any idea what’s happening here ?


Thanks



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Facing problems running gstreamer element in pull mode

Rajashree Chivakula
Kapil,

I was trying to implement something like :

gst-launch souphttpsrc ! adaptivestreaming ! decodebin ! sink.

It works well if I program the souphttpsrc with the URI to download; But I want the adaptivestreaming element to control souphttpsrc. Is that possible ?

Rajashree



On Wed, May 4, 2011 at 11:25 PM, Kapil Agrawal <[hidden email]> wrote:
Are you trying to implement something as
gst-launch adaptivestreaming ! souphttpsrc ! decodebin ! sink ?

If yes then I doubt how could you do that as  souphttpsrc only has src pads.

I would have tried to make changes in the souphttpsrc element to implement adaptive streaming inside it ?

Regards
Kapil

On Thu, May 5, 2011 at 5:17 AM, Rajashree Chivakula <[hidden email]> wrote:

Hi all,

I'm new to gstreamer so please bear with me if my issue seems trivial.

I'm developing an application to implement Adaptive Streaming. For this, I have the souphttpsrc element that's linked to my adaptivestreaming element. The adaptivestreaming element needs to send out URIs to the souphttpsrc element and download chunks of data from the network, which it then passes along to the demux/decoders. Each chunk has it's own URI. The problem I'm facing is : how do i design it such that my adaptivestreaming element will control the flow of data from souphttpsrc ? Basically run my adaptivestreaming element in pull mode (I'm not really interested in random accesses, I need to download all the data that's accessible by the URI); I did implement the activate_function and activatepull_function, but it didn't work. I could not enter my looping function associated with the sinkpad of my adaptivestreaming element.
In my activate function :

static gboolean gst_adaptive_streaming_activate (GstPad *pad) {

    if(gst_pad_check_pull_range(pad)) {

       return gst_pad_activate_pull(pad, TRUE);

    }

    else {

        g_print("Cannot activate task ...\n");

        return FALSE;

    }

}

gst_pad_check_pull_range() returned FALSE ;  But souphttplivesrc does support getrangefunc(); Any idea what’s happening here ?


Thanks



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Facing problems running gstreamer element in pull mode

Kapil Agrawal
I think you might try to make changes in souphttpsrc and add functionality of adaptivestreaming ?

On Fri, May 6, 2011 at 2:42 AM, Rajashree Chivakula <[hidden email]> wrote:
Kapil,

I was trying to implement something like :

gst-launch souphttpsrc ! adaptivestreaming ! decodebin ! sink.

It works well if I program the souphttpsrc with the URI to download; But I want the adaptivestreaming element to control souphttpsrc. Is that possible ?

Rajashree




On Wed, May 4, 2011 at 11:25 PM, Kapil Agrawal <[hidden email]> wrote:
Are you trying to implement something as
gst-launch adaptivestreaming ! souphttpsrc ! decodebin ! sink ?

If yes then I doubt how could you do that as  souphttpsrc only has src pads.

I would have tried to make changes in the souphttpsrc element to implement adaptive streaming inside it ?

Regards
Kapil

On Thu, May 5, 2011 at 5:17 AM, Rajashree Chivakula <[hidden email]> wrote:

Hi all,

I'm new to gstreamer so please bear with me if my issue seems trivial.

I'm developing an application to implement Adaptive Streaming. For this, I have the souphttpsrc element that's linked to my adaptivestreaming element. The adaptivestreaming element needs to send out URIs to the souphttpsrc element and download chunks of data from the network, which it then passes along to the demux/decoders. Each chunk has it's own URI. The problem I'm facing is : how do i design it such that my adaptivestreaming element will control the flow of data from souphttpsrc ? Basically run my adaptivestreaming element in pull mode (I'm not really interested in random accesses, I need to download all the data that's accessible by the URI); I did implement the activate_function and activatepull_function, but it didn't work. I could not enter my looping function associated with the sinkpad of my adaptivestreaming element.
In my activate function :

static gboolean gst_adaptive_streaming_activate (GstPad *pad) {

    if(gst_pad_check_pull_range(pad)) {

       return gst_pad_activate_pull(pad, TRUE);

    }

    else {

        g_print("Cannot activate task ...\n");

        return FALSE;

    }

}

gst_pad_check_pull_range() returned FALSE ;  But souphttplivesrc does support getrangefunc(); Any idea what’s happening here ?


Thanks



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




--
www.mediamagictechnologies.com (Gstreamer, ffmpeg, Red5, Streaming)
twitter handle: @gst_kaps
http://www.linkedin.com/in/kapilagrawal

_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Facing problems running gstreamer element in pull mode

Tim-Philipp Müller-2
In reply to this post by Rajashree Chivakula
On Wed, 2011-05-04 at 16:47 -0700, Rajashree Chivakula wrote:

Hi,

> I'm developing an application to implement Adaptive Streaming. For
> this, I have the souphttpsrc element that's linked to my
> adaptivestreaming element. The adaptivestreaming element needs to send
> out URIs to the souphttpsrc element and download chunks of data from
> the network, which it then passes along to the demux/decoders. Each
> chunk has it's own URI. The problem I'm facing is : how do i design it
> such that my adaptivestreaming element will control the flow of data
> from souphttpsrc ? Basically run my adaptivestreaming element in pull
> mode (I'm not really interested in random accesses, I need to download
> all the data that's accessible by the URI); I did implement the
> activate_function and activatepull_function, but it didn't work. I
> could not enter my looping function associated with the sinkpad of my
> adaptivestreaming element.
> In my activate function :
> (snip)
> gst_pad_check_pull_range() returned FALSE ;  But souphttplivesrc does
> support getrangefunc(); Any idea what’s happening here ?

You might want to have a look at the new hlsdemux plugin in
gst-plugins-bad git/pre-release (and the upcoming release).

souphttpsrc does not support operating in pull mode, it derives from
GstPushSrc.

Cheers
 -Tim



_______________________________________________
gstreamer-devel mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel