Decodebin and multiqueue

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

Decodebin and multiqueue

Duchassin Frederic
Hello,


I try to use decodebin in my pipeline. I try to play mpeg2ts video with
audio and video and that's why decodebin try to use multiqueue.

But i would like to set properties of this multiqueue (max-size* = 0) .

In order to achieve this i use a callback on "element added" on decodebin :


/* CallBack for new element created in Decodebin */
void gstImpl::cb_element_added_decodebin (GstBin *bin, GstElement
*element, gpointer user_data)
{
     gchar * name = GST_OBJECT_NAME (element);
     gstImpl* pStreamObj = static_cast<gstImpl*>(user_data);

     bin = bin; //compiler happy !

     g_print ("DECODBIN element-added: %s\r\n", name);

     if (g_strrstr (name, "multiqueue"))
     {
       multiqueue = element;

       g_object_set(G_OBJECT(element), "max-size-buffers", (guint) 0, NULL);
       g_object_set(G_OBJECT(element), "max-size-bytes", (guint) 0, NULL);
       g_object_set(G_OBJECT(element), "max-size-time", (guint64) 0, NULL);
     }
}


If i read later these properties on my multiqueue, i can see that I
don't have 0 on all.


       guint tmp1, tmp2;
       guint64 tmp3;

       g_object_get(G_OBJECT(multiqueue), "max-size-buffers", &tmp1,
"max-size-bytes", &tmp2, "max-size-time", &tmp3, NULL);
       tmp1 = 1;


--> gives max-size-buffers=5 ; max-size-bytes=2097152; max-size-time=0;


Maybe decodebin already set these multiqueue's properties ??


BR


Frederic

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

Re: Decodebin and multiqueue

Duchassin Frederic

Hello,


I have seen that queue size can be tuned by properties "max-size-buffers", "max-size-bytes", "max-size-time" of decodebin element.

If i set theses properties to 0, decodebin is in automatic mode. How can i set these size to 0 in manual mode ?


Frederic



Le 12/02/2019 à 11:58, Duchassin Frederic a écrit :
Hello,


I try to use decodebin in my pipeline. I try to play mpeg2ts video with audio and video and that's why decodebin try to use multiqueue.

But i would like to set properties of this multiqueue (max-size* = 0) .

In order to achieve this i use a callback on "element added" on decodebin :


/* CallBack for new element created in Decodebin */
void gstImpl::cb_element_added_decodebin (GstBin *bin, GstElement *element, gpointer user_data)
{
    gchar * name = GST_OBJECT_NAME (element);
    gstImpl* pStreamObj = static_cast<gstImpl*>(user_data);

    bin = bin; //compiler happy !

    g_print ("DECODBIN element-added: %s\r\n", name);

    if (g_strrstr (name, "multiqueue"))
    {
      multiqueue = element;

      g_object_set(G_OBJECT(element), "max-size-buffers", (guint) 0, NULL);
      g_object_set(G_OBJECT(element), "max-size-bytes", (guint) 0, NULL);
      g_object_set(G_OBJECT(element), "max-size-time", (guint64) 0, NULL);
    }
}


If i read later these properties on my multiqueue, i can see that I don't have 0 on all.


      guint tmp1, tmp2;
      guint64 tmp3;

      g_object_get(G_OBJECT(multiqueue), "max-size-buffers", &tmp1, "max-size-bytes", &tmp2, "max-size-time", &tmp3, NULL);
      tmp1 = 1;


--> gives max-size-buffers=5 ; max-size-bytes=2097152; max-size-time=0;


Maybe decodebin already set these multiqueue's properties ??


BR


Frederic

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

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

Re: Decodebin and multiqueue

Vinod Kesti
All three 0 values is not valid.

Use below properties of decodebin to set the buffer size.

  max-size-bytes      : Max. amount of bytes in the queue (0=automatic)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0
  max-size-buffers    : Max. number of buffers in the queue (0=automatic)
                        flags: readable, writable
                        Unsigned Integer. Range: 0 - 4294967295 Default: 0
  max-size-time       : Max. amount of data in the queue (in ns,
0=automatic)
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615
Default: 0




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

Re: Decodebin and multiqueue

Duchassin Frederic
Hello ,

OK good to understand that all three 0 is not valid.

My decodebin place a multiqueue inside my pipeline. I just would like to
set this multiqueue with all 0 but it doesn't work:

     - if i set my multique size in "element-added" signal, decodebin
write a new size later !

Is there a way to force this multiqueue size with all 0 ?


BR


Frédéric



Le 22/02/2019 à 07:13, Vinod Kesti a écrit :

> All three 0 values is not valid.
>
> Use below properties of decodebin to set the buffer size.
>
>    max-size-bytes      : Max. amount of bytes in the queue (0=automatic)
>                          flags: readable, writable
>                          Unsigned Integer. Range: 0 - 4294967295 Default: 0
>    max-size-buffers    : Max. number of buffers in the queue (0=automatic)
>                          flags: readable, writable
>                          Unsigned Integer. Range: 0 - 4294967295 Default: 0
>    max-size-time       : Max. amount of data in the queue (in ns,
> 0=automatic)
>                          flags: readable, writable
>                          Unsigned Integer64. Range: 0 - 18446744073709551615
> Default: 0
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Decodebin and multiqueue

Vinod Kesti
decodebin internally changes the multiqueue size.

Use max-size-bytes , max-size-time, max-size-buffer of decodebin to set
maximum buffering by multiqueue.
Setting multiqueue property won't help you here




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

Re: Decodebin and multiqueue

Duchassin Frederic
OK I understand but if i would like to set all the multiqueue buffer to
0, i can't using decodebin properties.


Le 22/02/2019 à 12:04, Vinod Kesti a écrit :

> decodebin internally changes the multiqueue size.
>
> Use max-size-bytes , max-size-time, max-size-buffer of decodebin to set
> maximum buffering by multiqueue.
> Setting multiqueue property won't help you here
>
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel