Hi everyone
I have a question about Gstreamer tee element when playing 10@80P video.
when i play 1080P video with gstreamer tee element,CPU load is 160%.
Detail of my project requirement and software design as below:
[Project requirement]
Playback 1080P video and output videostream to two different display(DISP1:UI + Video,DISP2:Video)
[software design]
1.Design videoplayer based on playbin of gstreamer
2.Add tee element to the playbin in order to output videostream to two imxv4l2sink
[tee element reference code]
m_videoSink2 = gst_element_factory_make("imxv4l2sink", NULL); |
g_object_set(G_OBJECT(m_videoSink2), "device", "/dev/video18", NULL);
......
gst_object_ref(GST_OBJECT(m_videoSink2));
//creat tee element
tee = gst_element_factory_make ("tee",NULL);
g_object_set(G_OBJECT(tee), "allow-not-linked", true, NULL);
queues[0] =gst_element_factory_make("queue",NULL);
queues[1] =gst_element_factory_make("queue",NULL);
qsrc_pad = gst_element_get_static_pad(queues[0],"src");
gst_bin_add_many(GST_BIN(m_videoOutputBin),m_videoIdentity, tee,queues[0],m_videoSink1,queues[1],m_videoSink2,NULL);
gst_element_link(queues[0],m_videoSink1);
gst_element_link(queues[1],m_videoSink2);
for (i = 0; i < NUM_SUBSTREAMS; ++i) {
tee_srcpads[i] = gst_element_get_request_pad (tee, "src_%u");
qsinkpads[i]= gst_element_get_static_pad (queues[i], "sink");
gst_pad_link (tee_srcpads[i],qsinkpads[i]);
}
gst_element_link(m_videoIdentity, tee);
[Test Result]
1.Play 1080P video to one display,CPU Load:8%(Compute based on IPU/VPU)
1.Play 1080P video to two display with above software design,CPU Load:160%(Compute based on IPU/VPU and CPU??)
So i think the reason of cpu overload is about tee element,maybe tee element copy the videostream data to two imxv4l2sink based on CPU.
Could anyone give me some advice about how to solve this issue?
Appreciate any help in advance.
Thank you
Andy
Hello,
Please refer to “i.MX_Linux_User's_Guide.pdf”.
“Video playback to multiple displays can be supported by a video sink plugin.
To configure the video sink plugin for multidisplay mode, see Overlaysink usage
later in this document.”
It makes sense to use the recent BSP.
i.MX 6 Series Software and Development Tool|NXP
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
HI Yuri
Thank you for your reply.
According to your advice,i use overlaysink to display the same video on two different monitor.
On the monitor1,i want to display:Background graphic for UI,Frontground graphic for Video.
But when i use overlaysink,video graphic of frontground consist of video content and black sreen.
So i can not see the UI graphic of background.
I do not want to display black sreen of the video graphic(FG).
I change overlay-top/overlay-left of overlaysink property,but it seems not work.
Is there any method on how to do not display black sreen of the video graphic(FG).
Thank you
Andy