Help needed regarding buffering

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

Help needed regarding buffering

Vikram
Hi,
I am trying to use queue element in my pipeline for buffering. My goal is to start playback of content after some bytes are queued up.
 
According to my understanding of the queue, I was trying the following
 
1. Set max-size-bytes= some bytes(for queue's max capacity)
2. Set min-threshold-bytes=some bytes(say 100k)
 
 
souphttpsrc is downloading the data.
Now I was thinking that chunks will be queued up inside queue till the min-threshold(100k bytes) is reached and queue will start pushing the data downstream(thats a demux) after that.
 
But while testing, I realized that queue starts pushing as soon as it gets the first chunk.
Looks like my understanding of queue is not correct.
 
Can someone help me out regarding this? If you can share some insight or some documentation to help me do this, that would be great of you.
 
Regards,
Vikram

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

Re: Help needed regarding buffering

Wim Taymans
On 10/23/2012 11:45 AM, Vijay Vikram wrote:

> Hi,
> I am trying to use queue element in my pipeline for buffering. My goal
> is to start playback of content after some bytes are queued up.
> According to my understanding of the queue, I was trying the following
> 1. Set max-size-bytes= some bytes(for queue's max capacity)
> 2. Set min-threshold-bytes=some bytes(say 100k)
> souphttpsrc is downloading the data.
> Now I was thinking that chunks will be queued up inside queue till the
> min-threshold(100k bytes) is reached and queue will start pushing the
> data downstream(thats a demux) after that.
> But while testing, I realized that queue starts pushing as soon as it
> gets the first chunk.
> Looks like my understanding of queue is not correct.
> Can someone help me out regarding this? If you can share some insight
> or some documentation to help me do this, that would be great of you.

Don't use queue for this, the min-threshold-* is useless. Use queue2 to
implement buffering and
check out the buffering documentation here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim


> Regards,
> Vikram
>
>
> _______________________________________________
> 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: Help needed regarding buffering

Vikram
Hi Wim,
Thanks a lot for your prompt reply.
 
I have tried this thing with queue2 too.
 
The steps are mentioned below
1. Set max-size-bytes= 10MB(for queue's max capacity)
2. Set low-percent=high-percent=5 initially.
 
Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I get the percent vlaue, I am always getting either 0 or 100.
 
Is it that restrictin based on number of bytes is not correct. rather we should restrict the percentage values based on time as explained in the link you have shared?
 
Or Is there something wrong with my understanding?
 
Regards,
Vikram
On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]> wrote:
On 10/23/2012 11:45 AM, Vijay Vikram wrote:
Hi,
I am trying to use queue element in my pipeline for buffering. My goal is to start playback of content after some bytes are queued up.
According to my understanding of the queue, I was trying the following
1. Set max-size-bytes= some bytes(for queue's max capacity)
2. Set min-threshold-bytes=some bytes(say 100k)
souphttpsrc is downloading the data.
Now I was thinking that chunks will be queued up inside queue till the min-threshold(100k bytes) is reached and queue will start pushing the data downstream(thats a demux) after that.
But while testing, I realized that queue starts pushing as soon as it gets the first chunk.
Looks like my understanding of queue is not correct.
Can someone help me out regarding this? If you can share some insight or some documentation to help me do this, that would be great of you.

Don't use queue for this, the min-threshold-* is useless. Use queue2 to implement buffering and
check out the buffering documentation here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim


Regards,
Vikram


_______________________________________________
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


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

Re: Help needed regarding buffering

Wim Taymans
On 10/23/2012 12:57 PM, Vijay Vikram wrote:
> Hi Wim,
> Thanks a lot for your prompt reply.
> I have tried this thing with queue2 too.
> The steps are mentioned below
> 1. Set max-size-bytes= 10MB(for queue's max capacity)
> 2. Set low-percent=high-percent=5 initially.
> Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I
> get the percent vlaue, I am always getting either 0 or 100.
That would be correct if you set the low and high-percent values to the
same value...
You probably want to leave this to the default values..

Wim

> Is it that restrictin based on number of bytes is not correct. rather
> we should restrict the percentage values based on time as explained in
> the link you have shared?
> Or Is there something wrong with my understanding?
> Regards,
> Vikram
> On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     On 10/23/2012 11:45 AM, Vijay Vikram wrote:
>
>         Hi,
>         I am trying to use queue element in my pipeline for buffering.
>         My goal is to start playback of content after some bytes are
>         queued up.
>         According to my understanding of the queue, I was trying the
>         following
>         1. Set max-size-bytes= some bytes(for queue's max capacity)
>         2. Set min-threshold-bytes=some bytes(say 100k)
>         souphttpsrc is downloading the data.
>         Now I was thinking that chunks will be queued up inside queue
>         till the min-threshold(100k bytes) is reached and queue will
>         start pushing the data downstream(thats a demux) after that.
>         But while testing, I realized that queue starts pushing as
>         soon as it gets the first chunk.
>         Looks like my understanding of queue is not correct.
>         Can someone help me out regarding this? If you can share some
>         insight or some documentation to help me do this, that would
>         be great of you.
>
>
>     Don't use queue for this, the min-threshold-* is useless. Use
>     queue2 to implement buffering and
>     check out the buffering documentation here:
>
>     http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html
>
>     Wim
>
>
>         Regards,
>         Vikram
>
>
>         _______________________________________________
>         gstreamer-devel mailing list
>         [hidden email]
>         <mailto:[hidden email]>
>         http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> 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
|

AW: Help needed regarding buffering

BGraaf
In reply to this post by Vikram

Hi Vikram,

 

I’ve implemented the buffer with setting all max values (bytes, frames and time) and set only the min value for time. It’s runs fine for me.

 

Regards

Bernhard

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:gstreamer-devel-bounces+bernhard.graaf=[hidden email]] Im Auftrag von Vijay Vikram
Gesendet: Dienstag, 23. Oktober 2012 12:58
An: Discussion of the development of and with GStreamer
Betreff: Re: Help needed regarding buffering

 

Hi Wim,

Thanks a lot for your prompt reply.

 

I have tried this thing with queue2 too.

 

The steps are mentioned below

1. Set max-size-bytes= 10MB(for queue's max capacity)

2. Set low-percent=high-percent=5 initially.

 

Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I get the percent vlaue, I am always getting either 0 or 100.

 

Is it that restrictin based on number of bytes is not correct. rather we should restrict the percentage values based on time as explained in the link you have shared?

 

Or Is there something wrong with my understanding?

 

Regards,

Vikram

On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]> wrote:

On 10/23/2012 11:45 AM, Vijay Vikram wrote:

Hi,
I am trying to use queue element in my pipeline for buffering. My goal is to start playback of content after some bytes are queued up.
According to my understanding of the queue, I was trying the following
1. Set max-size-bytes= some bytes(for queue's max capacity)
2. Set min-threshold-bytes=some bytes(say 100k)
souphttpsrc is downloading the data.
Now I was thinking that chunks will be queued up inside queue till the min-threshold(100k bytes) is reached and queue will start pushing the data downstream(thats a demux) after that.
But while testing, I realized that queue starts pushing as soon as it gets the first chunk.
Looks like my understanding of queue is not correct.
Can someone help me out regarding this? If you can share some insight or some documentation to help me do this, that would be great of you.

 

Don't use queue for this, the min-threshold-* is useless. Use queue2 to implement buffering and
check out the buffering documentation here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim

Regards,
Vikram


_______________________________________________
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

 


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

Re: Help needed regarding buffering

Vikram
Hi ,
 
Thanks for your response to my queries but my prob still remains in the same state.
 
I would restate my issue first.
I have a pipeline which has the following elements in the same sequence as mentioned below
 
httpsrc->queue2->demux
 
For queue, my code snippet looks like this-
 
GstElement *queue = gst_element_factory_make( "queue2", "data" );
 
g_object_set (G_OBJECT (queue ), "max-size-bytes", 10MB, "max-size-time", 0, "max-size-buffers", 0, "use-buffering", true, NULL);
 
httpsrc pushes data in chunks. I am expecting the queue to hold the data chunks till 1MB(10 percent of the max size) is filled. But what i see is , queue pushes data to the demux as soon as it gets the first chunk.
 
I tried using "temp-location" property, but in that case data is always pushed to the file specified in the "temp-location", and it never comes to the queue.
 
Please suggest (if possible with code snippet) how to achieve it.
 
Please correct me if I am going wrong with my pipe itself.
 
Regards,
Vikram

On Tue, Oct 23, 2012 at 5:41 PM, Bernhard Graaf <[hidden email]> wrote:

Hi Vikram,

 

I’ve implemented the buffer with setting all max values (bytes, frames and time) and set only the min value for time. It’s runs fine for me.

 

Regards

Bernhard

 


Von: gstreamer-devel-bounces+bernhard.graaf=[hidden email] [mailto:[hidden email]=[hidden email]] Im Auftrag von Vijay Vikram
Gesendet: Dienstag, 23. Oktober 2012 12:58
An: Discussion of the development of and with GStreamer
Betreff: Re: Help needed regarding buffering

 

Hi Wim,

Thanks a lot for your prompt reply.

 

I have tried this thing with queue2 too.

 

The steps are mentioned below

1. Set max-size-bytes= 10MB(for queue's max capacity)

2. Set low-percent=high-percent=5 initially.

 

Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I get the percent vlaue, I am always getting either 0 or 100.

 

Is it that restrictin based on number of bytes is not correct. rather we should restrict the percentage values based on time as explained in the link you have shared?

 

Or Is there something wrong with my understanding?

 

Regards,

Vikram

On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]> wrote:

On 10/23/2012 11:45 AM, Vijay Vikram wrote:

Hi,
I am trying to use queue element in my pipeline for buffering. My goal is to start playback of content after some bytes are queued up.
According to my understanding of the queue, I was trying the following
1. Set max-size-bytes= some bytes(for queue's max capacity)
2. Set min-threshold-bytes=some bytes(say 100k)
souphttpsrc is downloading the data.
Now I was thinking that chunks will be queued up inside queue till the min-threshold(100k bytes) is reached and queue will start pushing the data downstream(thats a demux) after that.
But while testing, I realized that queue starts pushing as soon as it gets the first chunk.
Looks like my understanding of queue is not correct.
Can someone help me out regarding this? If you can share some insight or some documentation to help me do this, that would be great of you.

 

Don't use queue for this, the min-threshold-* is useless. Use queue2 to implement buffering and
check out the buffering documentation here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim

Regards,
Vikram


_______________________________________________
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

 


_______________________________________________
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: Help needed regarding buffering

Wim Taymans
On 10/30/2012 07:14 AM, Vijay Vikram wrote:

> Hi ,
> Thanks for your response to my queries but my prob still remains in the
> same state.
> I would restate my issue first.
> I have a pipeline which has the following elements in the same sequence
> as mentioned below
> httpsrc->queue2->demux
> For queue, my code snippet looks like this-
> GstElement *queue = gst_element_factory_make( "queue2", "data" );
> g_object_set (G_OBJECT (queue ), "max-size-bytes", 10MB,
> "max-size-time", 0, "max-size-buffers", 0, "use-buffering", true, NULL);
> httpsrc pushes data in chunks. I am expecting the queue to hold the data
> chunks till 1MB(10 percent of the max size) is filled. But what i see is
> , queue pushes data to the demux as soon as it gets the first chunk.
> I tried using "temp-location" property, but in that case data is always
> pushed to the file specified in the "temp-location", and it never comes
> to the queue.
> Please suggest (if possible with code snippet) how to achieve it.
> Please correct me if I am going wrong with my pipe itself.

You need to watch for buffering messages and keep the pipeline paused
while buffering. This is explained here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim

> Regards,
> Vikram
>
> On Tue, Oct 23, 2012 at 5:41 PM, Bernhard Graaf <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi Vikram,____
>
>     __ __
>
>     I’ve implemented the buffer with setting all max values (bytes,
>     frames and time) and set only the min value for time. It’s runs fine
>     for me.____
>
>     __ __
>
>     Regards____
>
>     Bernhard____
>
>     __ __
>
>     ------------------------------------------------------------------------
>
>     *Von:*gstreamer-devel-bounces+bernhard.graaf=[hidden email]
>     <mailto:[hidden email]>
>     [mailto:gstreamer-devel-bounces+bernhard.graaf
>     <mailto:gstreamer-devel-bounces%2Bbernhard.graaf>=[hidden email]
>     <mailto:[hidden email]>] *Im Auftrag von *Vijay Vikram
>     *Gesendet:* Dienstag, 23. Oktober 2012 12:58
>     *An:* Discussion of the development of and with GStreamer
>     *Betreff:* Re: Help needed regarding buffering____
>
>     __ __
>
>     Hi Wim,____
>
>     Thanks a lot for your prompt reply.____
>
>     ____
>
>     I have tried this thing with queue2 too.____
>
>     ____
>
>     The steps are mentioned below____
>
>     1. Set max-size-bytes= 10MB(for queue's max capacity)____
>
>     2. Set low-percent=high-percent=5 initially.____
>
>     ____
>
>     Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I
>     get the percent vlaue, I am always getting either 0 or 100. ____
>
>     ____
>
>     Is it that restrictin based on number of bytes is not correct.
>     rather we should restrict the percentage values based on time as
>     explained in the link you have shared?____
>
>     ____
>
>     Or Is there something wrong with my understanding?____
>
>     ____
>
>     Regards,____
>
>     Vikram____
>
>     On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]
>     <mailto:[hidden email]>> wrote:____
>
>     On 10/23/2012 11:45 AM, Vijay Vikram wrote:____
>
>     Hi,
>     I am trying to use queue element in my pipeline for buffering. My
>     goal is to start playback of content after some bytes are queued up.
>     According to my understanding of the queue, I was trying the following
>     1. Set max-size-bytes= some bytes(for queue's max capacity)
>     2. Set min-threshold-bytes=some bytes(say 100k)
>     souphttpsrc is downloading the data.
>     Now I was thinking that chunks will be queued up inside queue till
>     the min-threshold(100k bytes) is reached and queue will start
>     pushing the data downstream(thats a demux) after that.
>     But while testing, I realized that queue starts pushing as soon as
>     it gets the first chunk.
>     Looks like my understanding of queue is not correct.
>     Can someone help me out regarding this? If you can share some
>     insight or some documentation to help me do this, that would be
>     great of you.____
>
>     __ __
>
>     Don't use queue for this, the min-threshold-* is useless. Use queue2
>     to implement buffering and
>     check out the buffering documentation here:
>
>     http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html
>
>     Wim
>
>     ____
>
>     Regards,
>     Vikram
>
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel____
>
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel____
>
>     __ __
>
>
>     _______________________________________________
>     gstreamer-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
> _______________________________________________
> 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: Help needed regarding buffering

Vikram
Hi Wim,
As I have mentioned in my previous emails, after handling buffering messages I am always getting either 0% or 100% from gst_message_parse_buffering.
 
I would like to understand how queue sets its low and high watermark.
 
As I have mentioned in my previous mail, my queue has  "max-size-bytes" set to 10MB.
And by default low-percent=10 and high-percent=99.
 
 
So does that mean that the data will be pushed out of the queue when queue has 1MB data queued i.e. to say
is low watermark = 1MB,
and high watermark = 9.9MB
 
As explained in the documentation, a BUFFERING message with 100% will be posted only when high watermark is reached. But as I have already told queue pushes data down stream as soon as first chunk(about 1KB) is queued up.
 
I am sure I am missing some minute details of the queue. 
 
Regards,
Vikram

On Tue, Oct 30, 2012 at 3:16 PM, Wim Taymans <[hidden email]> wrote:
On 10/30/2012 07:14 AM, Vijay Vikram wrote:
Hi ,
Thanks for your response to my queries but my prob still remains in the
same state.
I would restate my issue first.
I have a pipeline which has the following elements in the same sequence
as mentioned below
httpsrc->queue2->demux
For queue, my code snippet looks like this-
GstElement *queue = gst_element_factory_make( "queue2", "data" );
g_object_set (G_OBJECT (queue ), "max-size-bytes", 10MB,
"max-size-time", 0, "max-size-buffers", 0, "use-buffering", true, NULL);
httpsrc pushes data in chunks. I am expecting the queue to hold the data
chunks till 1MB(10 percent of the max size) is filled. But what i see is
, queue pushes data to the demux as soon as it gets the first chunk.
I tried using "temp-location" property, but in that case data is always
pushed to the file specified in the "temp-location", and it never comes
to the queue.
Please suggest (if possible with code snippet) how to achieve it.
Please correct me if I am going wrong with my pipe itself.

You need to watch for buffering messages and keep the pipeline paused while buffering. This is explained here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim

Regards,
Vikram

On Tue, Oct 23, 2012 at 5:41 PM, Bernhard Graaf <[hidden email]
<mailto:[hidden email]>> wrote:

    Hi Vikram,____

    __ __


    I’ve implemented the buffer with setting all max values (bytes,
    frames and time) and set only the min value for time. It’s runs fine
    for me.____

    __ __

    Regards____

    Bernhard____

    __ __

    ------------------------------------------------------------------------

    *Von:*gstreamer-devel-bounces+bernhard.graaf=[hidden email]
    <mailto:[hidden email]>
    [mailto:[hidden email]
    <mailto:[hidden email]>=[hidden email]
    <mailto:[hidden email]>] *Im Auftrag von *Vijay Vikram
    *Gesendet:* Dienstag, 23. Oktober 2012 12:58
    *An:* Discussion of the development of and with GStreamer
    *Betreff:* Re: Help needed regarding buffering____

    __ __

    Hi Wim,____

    Thanks a lot for your prompt reply.____

    ____

    I have tried this thing with queue2 too.____

    ____

    The steps are mentioned below____

    1. Set max-size-bytes= 10MB(for queue's max capacity)____

    2. Set low-percent=high-percent=5 initially.____

    ____


    Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I
    get the percent vlaue, I am always getting either 0 or 100. ____

    ____


    Is it that restrictin based on number of bytes is not correct.
    rather we should restrict the percentage values based on time as
    explained in the link you have shared?____

    ____

    Or Is there something wrong with my understanding?____

    ____

    Regards,____

    Vikram____


    On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]
    <mailto:[hidden email]>> wrote:____

    On 10/23/2012 11:45 AM, Vijay Vikram wrote:____


    Hi,
    I am trying to use queue element in my pipeline for buffering. My
    goal is to start playback of content after some bytes are queued up.
    According to my understanding of the queue, I was trying the following
    1. Set max-size-bytes= some bytes(for queue's max capacity)
    2. Set min-threshold-bytes=some bytes(say 100k)
    souphttpsrc is downloading the data.
    Now I was thinking that chunks will be queued up inside queue till
    the min-threshold(100k bytes) is reached and queue will start
    pushing the data downstream(thats a demux) after that.
    But while testing, I realized that queue starts pushing as soon as
    it gets the first chunk.
    Looks like my understanding of queue is not correct.
    Can someone help me out regarding this? If you can share some
    insight or some documentation to help me do this, that would be
    great of you.____

    __ __


    Don't use queue for this, the min-threshold-* is useless. Use queue2
    to implement buffering and
    check out the buffering documentation here:

    http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

    Wim

    ____


    Regards,
    Vikram


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



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

    __ __



    _______________________________________________
    gstreamer-devel mailing list
    [hidden email]
    <mailto:[hidden email]>

_______________________________________________
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: Help needed regarding buffering

Vikram
Hi Wim,
By the way, I forgot to inform you that I am using gstreamer 0.10 not 1.0. Hope this will help you in giving out info in a better way?
 
Regards,
Vikram

On Tue, Oct 30, 2012 at 6:07 PM, Vijay Vikram <[hidden email]> wrote:
Hi Wim,
As I have mentioned in my previous emails, after handling buffering messages I am always getting either 0% or 100% from gst_message_parse_buffering.
 
I would like to understand how queue sets its low and high watermark.
 
As I have mentioned in my previous mail, my queue has  "max-size-bytes" set to 10MB.
And by default low-percent=10 and high-percent=99.
 
 
So does that mean that the data will be pushed out of the queue when queue has 1MB data queued i.e. to say
is low watermark = 1MB,
and high watermark = 9.9MB
 
As explained in the documentation, a BUFFERING message with 100% will be posted only when high watermark is reached. But as I have already told queue pushes data down stream as soon as first chunk(about 1KB) is queued up.
 
I am sure I am missing some minute details of the queue. 
 
Regards,
Vikram

On Tue, Oct 30, 2012 at 3:16 PM, Wim Taymans <[hidden email]> wrote:
On 10/30/2012 07:14 AM, Vijay Vikram wrote:
Hi ,
Thanks for your response to my queries but my prob still remains in the
same state.
I would restate my issue first.
I have a pipeline which has the following elements in the same sequence
as mentioned below
httpsrc->queue2->demux
For queue, my code snippet looks like this-
GstElement *queue = gst_element_factory_make( "queue2", "data" );
g_object_set (G_OBJECT (queue ), "max-size-bytes", 10MB,
"max-size-time", 0, "max-size-buffers", 0, "use-buffering", true, NULL);
httpsrc pushes data in chunks. I am expecting the queue to hold the data
chunks till 1MB(10 percent of the max size) is filled. But what i see is
, queue pushes data to the demux as soon as it gets the first chunk.
I tried using "temp-location" property, but in that case data is always
pushed to the file specified in the "temp-location", and it never comes
to the queue.
Please suggest (if possible with code snippet) how to achieve it.
Please correct me if I am going wrong with my pipe itself.

You need to watch for buffering messages and keep the pipeline paused while buffering. This is explained here:

http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

Wim

Regards,
Vikram

On Tue, Oct 23, 2012 at 5:41 PM, Bernhard Graaf <[hidden email]
<mailto:[hidden email]>> wrote:

    Hi Vikram,____

    __ __


    I’ve implemented the buffer with setting all max values (bytes,
    frames and time) and set only the min value for time. It’s runs fine
    for me.____

    __ __

    Regards____

    Bernhard____

    __ __

    ------------------------------------------------------------------------

    *Von:*gstreamer-devel-bounces+bernhard.graaf=[hidden email]
    <mailto:[hidden email]>
    [mailto:[hidden email]
    <mailto:[hidden email]>=[hidden email]
    <mailto:[hidden email]>] *Im Auftrag von *Vijay Vikram
    *Gesendet:* Dienstag, 23. Oktober 2012 12:58
    *An:* Discussion of the development of and with GStreamer
    *Betreff:* Re: Help needed regarding buffering____

    __ __

    Hi Wim,____

    Thanks a lot for your prompt reply.____

    ____

    I have tried this thing with queue2 too.____

    ____

    The steps are mentioned below____

    1. Set max-size-bytes= 10MB(for queue's max capacity)____

    2. Set low-percent=high-percent=5 initially.____

    ____


    Now I am listening to bus messages. On GST_MESSAGE_BUFFERING, when I
    get the percent vlaue, I am always getting either 0 or 100. ____

    ____


    Is it that restrictin based on number of bytes is not correct.
    rather we should restrict the percentage values based on time as
    explained in the link you have shared?____

    ____

    Or Is there something wrong with my understanding?____

    ____

    Regards,____

    Vikram____


    On Tue, Oct 23, 2012 at 3:23 PM, Wim Taymans <[hidden email]
    <mailto:[hidden email]>> wrote:____

    On 10/23/2012 11:45 AM, Vijay Vikram wrote:____


    Hi,
    I am trying to use queue element in my pipeline for buffering. My
    goal is to start playback of content after some bytes are queued up.
    According to my understanding of the queue, I was trying the following
    1. Set max-size-bytes= some bytes(for queue's max capacity)
    2. Set min-threshold-bytes=some bytes(say 100k)
    souphttpsrc is downloading the data.
    Now I was thinking that chunks will be queued up inside queue till
    the min-threshold(100k bytes) is reached and queue will start
    pushing the data downstream(thats a demux) after that.
    But while testing, I realized that queue starts pushing as soon as
    it gets the first chunk.
    Looks like my understanding of queue is not correct.
    Can someone help me out regarding this? If you can share some
    insight or some documentation to help me do this, that would be
    great of you.____

    __ __


    Don't use queue for this, the min-threshold-* is useless. Use queue2
    to implement buffering and
    check out the buffering documentation here:

    http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/html/chapter-buffering.html

    Wim

    ____


    Regards,
    Vikram


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



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

    __ __



    _______________________________________________
    gstreamer-devel mailing list
    [hidden email]
    <mailto:[hidden email]>

_______________________________________________
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