Getting device-fd form playbin

Tim-Philipp Müller t.i.m at zen.co.uk
Thu Feb 28 04:41:04 PST 2013


On Thu, 2013-02-28 at 16:35 +0800, Mohammad-AL.Gmail wrote:

Hi,

> I tried to issue
> gst_child_proxy_get((GstObject*)pipeline, videosink::device-fd, & device_fd,
> NULL); 
> after switching the pipeline to PAUSE STATE (and waited till PAUSE is
> accomplished) and before switching to PLAY STATE to be sure the v4l2 sink is
> created, but still the same error.

I presume you are in an environment where you always want to use
v4l2sink for output, right?

If so, the easiest way might be to create it yourself via

 GstElement *videosink = gst_element_factory_make ("v4l2sink", NULL);

then set it on playbin2 using

  g_object_set (playbin2, "video-sink", videosink, NULL);

and then keep the videosink pointer around for later use if you want to.

You could probably also set the video sink's state to READY, and then
get the fd immediately via

  int fd;
  g_object_get (videosink, "device-fd", &fd, NULL);

(This assumes playbin2 isn't going to close the device an re-open it
again, and I don't think it does, but not 100% sure - try it).

 Cheers
  -Tim

> -----Original Message-----
> From: Mohammad-AL.Gmail [mailto:AL.mohamed.salim at gmail.com] 
> Sent: Thursday, February 28, 2013 11:30 AM
> To: 'Discussion of the development of and with GStreamer'
> Subject: Getting device-fd form playbin
> 
> Hi, 
> 
> I have created a playbin2 and able to play pipeline.
> 
> Now I wish to set some characteristics of display. I need device-fd of the
> display.
> 
> I am trying to use gst_child_proxy_get((GstObject*)pipeline,
> videosink::device-fd, & device_fd, NULL); But during runtime, the error is
> returned:
> 
> No property in object player
> 
> Can anybody help me to hint at what is wrong?
> 
> Kindest Rgds,
> Salim
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list