How to set properties in GStreamer elements

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

How to set properties in GStreamer elements

gstreader
How to set the element's properties in C using g_object_set():

I would like to set the properties of x264enc element as
x264enc tune=zerolatency byte-stream=true bitrate=300   

I have used this code I am getting the warning:
g_object_set (videoenc, "tune","zerolatency","byte-stream",TRUE,"bitrate",300,NULL);

GLib-GObject-WARNING **: value "((GstX264EncTune) Zero latency (requires constant framerate) | 134519424)" of type `GstX264EncTune' is invalid or out of range for property `tune' of type `GstX264EncTune

  I would like to set the properties of  udpsink :

  I have used this code and getting warning:
 
  rtpsink = gst_element_factory_make ("udpsink", "rtpsink");
  g_assert (rtpsink);

  g_object_set (rtpsink, "port", 5000,"host", DEST_HOST, NULL);
  g_object_set(rtpsink,"ts-offset",VOFFSET,NULL);


  GLib-GObject-WARNING **: g_object_set_valist: object class `GstUDPSink' has no property named `127.0.0.1'

  Please some one reply me what I need to change that all work fine.

  Thanks in advance.



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

Re: How to set properties in GStreamer elements

Sudarshan Bisht
In x264enc the type of tune property is GstX264EncTune , but you are setting it as a string. So you need to pass an object of type GstX264EncTune.  

In udpsink make sure type of host property is a string, e.g. "127.0.0.1".   

All this information about which property is having which type can be checked by doing "gst-inspect <plugin_name>".



On Sun, Jul 31, 2011 at 10:29 AM, arpi d <[hidden email]> wrote:
How to set the element's properties in C using g_object_set():

I would like to set the properties of x264enc element as
x264enc tune=zerolatency byte-stream=true bitrate=300   

I have used this code I am getting the warning:
g_object_set (videoenc, "tune","zerolatency","byte-stream",TRUE,"bitrate",300,NULL);

GLib-GObject-WARNING **: value "((GstX264EncTune) Zero latency (requires constant framerate) | 134519424)" of type `GstX264EncTune' is invalid or out of range for property `tune' of type `GstX264EncTune

  I would like to set the properties of  udpsink :

  I have used this code and getting warning:
 
  rtpsink = gst_element_factory_make ("udpsink", "rtpsink");
  g_assert (rtpsink);

  g_object_set (rtpsink, "port", 5000,"host", DEST_HOST, NULL);
  g_object_set(rtpsink,"ts-offset",VOFFSET,NULL);


  GLib-GObject-WARNING **: g_object_set_valist: object class `GstUDPSink' has no property named `127.0.0.1'

  Please some one reply me what I need to change that all work fine.

  Thanks in advance.



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




--
Regards,

Sudarshan Bisht

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

Re: How to set properties in GStreamer elements

gstreader
Thanks its working.