gst_object_set question.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gst_object_set question.

955 Views
kangmw086
Contributor III

I configured the gstreamer pipe line as follows.

-->> imxv4l2src device=/dev/video0 ! imv4l2sink

Before Status GST_STATE_PLAYING
g_object_set(src,device"/dev/video1", NULL)
You can select a camera with the command.

but gst_element_set_state(pipeline, GST_STATE_PLAYING);
g_object_set(src,device"/dev/video1", NULL);

command is not executed after the command.

Please tell me how to change the element property to g_object_set.
If src is videootesrc, the g_object_set command changes the property well.

 

regards.

0 Kudos
3 Replies

761 Views
joanxie
NXP TechSupport
NXP TechSupport

I'm not sure if I understand it correctly, you play from the video0 firstly, then you want to set pipeline to change to video1? after gst_element_set_state(pipeline, GST_STATE_PLAYING);(this for video0), you want to use "g_object_set(src,device"/dev/video1", NULL);“  to change to video1 from video0, am I right?if yes, maybe you need restart the pipeline, set the PALYING state to NULL firstly, you can refer to the link as below:

"https://stackoverflow.com/questions/37254563/how-to-restart-a-pipeline-when-it-is-in-playing-state"

you also can refer to the source code about setting

"https://github.com/PanderMusubi/gstcam/blob/master/src/gstcam.c"

 

 

0 Kudos

911 Views
joanxie
NXP TechSupport
NXP TechSupport

what board do you use? do you want to test camera ?

0 Kudos

865 Views
kangmw086
Contributor III

i used i.MX6Q.

Test two cameras.

The GSTREAMER attribute change and PLAY PAUSE function do not work.

Please give me a simple example.

0 Kudos