Problem in getting File descriptor from pipeline

Keyur Patel keyur.patel at einfochips.com
Sat Jan 4 06:10:55 PST 2014


Further pipeline simplification

 

gst-launch  \

v4l2src device=/dev/video1 ! \

'video/x-raw-yuv,format=(fourcc)YUY2,width=640,height=480,framerate=30/1' !
\

fakesink &

 

this pipeline is also creating two /dev/video1 Fds.

 

I need both fds.

 

Regards,

Keyur Patel

 

From: gstreamer-devel-bounces at lists.freedesktop.org
[mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Keyur
Patel
Sent: 04 January 2014 06:37
To: gstreamer-devel at lists.freedesktop.org
Subject: Problem in getting File descriptor from pipeline

 

Hi,

 

I have pipeline  as mentioned below

 

   /*Local video stream chaine*/

    gst_bin_add_many( GST_BIN( video_pipeline_tx ), source, capsfilter,
ffmpegcsd, ffcapsfiler, videoflip, videosink, NULL);

 

    /*Link the differents elements*/

    ret = gst_element_link_many( source, capsfilter, ffmpegcsd, ffcapsfiler,
videoflip, videosink, NULL);

 

    GstPad* data_pad = gst_element_get_static_pad (videoflip, "src");

    gst_pad_add_buffer_probe (data_pad, G_CALLBACK (gst_frame_data), this);

    gst_object_unref (data_pad);

 

where source is "v4l2src" /dev/video0

 

in normal pipeline PLAY state my application is opening two fd instants of
/dev/video0 (checked by ls -l /proc/pid/fd)

and after pipeline PAUSE state it close these two fds.

 

I want these two fds from code.

I have successfully get first fd by using 

g_object_get(source, "device-fd", &my_fd, NULL);

 

now i am unable to get 2nd fd, Can you please tell me why this 2nd FD is
open? Also  i need its File descriptor.

 

Thanks in advance, Please help

 

 

Regards,

Keyur Patel


****************************************************************************
****************************************************************************
***** 

eInfochips Business Disclaimer: This e-mail message and all attachments
transmitted with it are intended solely for the use of the addressee and may
contain legally privileged and confidential information. If the reader of
this message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient, you are
hereby notified that any dissemination, distribution, copying, or other use
of this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any views
expressed in this message are those of the individual sender unless
otherwise stated. Company has taken enough precautions to prevent the spr
ead of viruses. However the company accepts no liability for any damage
caused by any virus transmitted by this email.

****************************************************************************
****************************************************************************
***** 


----------------------------------------------------------------------------
-----------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is
believed to be clean
----------------------------------------------------------------------------
-----------------

 


----------------------------------------------------------------------------
-----------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is
believed to be clean
----------------------------------------------------------------------------
-----------------

 


*************************************************************************************************************************************************************
eInfochips Business Disclaimer : This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.
*************************************************************************************************************************************************************

---------------------------------------------------------------------------------------------
Notice: 
This message has been scanned by Trend Micro Mail Security scanner and is believed to be clean
---------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140104/94473f47/attachment.html>


More information about the gstreamer-devel mailing list