<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; } @font-face { font-family: SimSun; } @font-face { font-family: "Cambria Math"; } @font-face { } p.MsoNormal, li.MsoNormal, div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; } a:link, span.MsoHyperlink { color: rgb(5, 99, 193); text-decoration: underline; } a:visited, span.MsoHyperlinkFollowed { color: rgb(149, 79, 114); text-decoration: underline; } span.E-MailFormatvorlage17 { font-family: Arial, sans-serif; color: windowtext; } .MsoChpDefault { font-size: 10pt; font-family: Calibri, sans-serif; } @page WordSection1 { margin: 70.85pt 70.85pt 2cm; } div.WordSection1 { }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I can suggest one more option:<br>
</p>
<p>Having 3 pipelines and using intevideosink / intervideosrc communication:<br>
</p>
<p><br>
</p>
<p>// First pipeline: live stream:<br>
</p>
<p>autovideosrc ! ... ! intervideosink channel="live_stream_channel"<br>
</p>
<p><br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">// Second pipeline: file playback:<br>
</p>
<p style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px;">​filesrc ! ... ! intervideosink channel="file_playback_channel"<br>
</p>
<div><br>
// Third pipeline: consumer:<br>
</div>
<div>intervideosrc name="<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">intervideosrc</span>_element" channel=<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"....</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"</span>
 ! .... ! ximagesink<br>
</div>
<p><br>
</p>
<p>In theory, I think it should be easy just to change the "channel" property <br>
</p>
<p>of "<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">intervideosrc</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">_element"
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
to "</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">live_stream_channel</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"
 or "</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">file_playback_chan</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">nel</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">​</span><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">"</span>  while
 playing, or at most you just need to stop or pause the third pipeline.</span><br>
</p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Probably care should be taken, the first and the second pipelines to output exactly the same format</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">About which one is the best- the best one is the easiest to try first :)</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"><br>
</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Cheers</span></p>
<p><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">Martin</span></p>
<p><br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org> on behalf of Maurer, Martin <martin2.maurer@zeiss.com><br>
<b>Sent:</b> Monday, August 21, 2017 1:42 PM<br>
<b>To:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Subject:</b> Connect two separate pipelines (not at the same time) to same HDMI output?</font>
<div> </div>
</div>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial",sans-serif">Hello,</span></p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">I have two pipelines:</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">One to display a live stream on a monitor.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">One to decompress a video file and display it on a monitor.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">At the moment these are two separate programs.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Now I want to put them into the same program, displaying the output to the same monitor.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">The program shall decide which pipeline to display on the monitor, never both at the same time.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">I found different possibilities, but what are the differences/advantages/disadvantages?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">a) Use two valves and a funnel</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Can one pipeline be playing while the other is not playing or pipeline not even existing at all?
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Or do I need to add a fakesrc to input of valve for each not existing pipeline?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">b) Use an input selector</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Can one pipeline be playing while the other is not playing?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">c) Use two output selectors (one for each pipeline) and switch between fakesink and real output.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Does the monitor of one pipeline then get free to use for other pipeline or is it still busy?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Can I take away elements from a output selector which are not actively used? Or not so easily possible?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">d) Stop and disable first pipeline completely to free “monitor element” and (when done) use “monitor element” in second pipeline.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Would it just be enough to pause or stop the first pipeline? Or do I need to unlink the pipeline to get the monitor element free to use in another pipeline?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Or is only one pipeline supported at all per program/executable/message loop?</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Note: Would be good if same mechanism is working in Windows and Linux.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Best regards,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif">Martin</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt; font-family:"Arial",sans-serif"> </span></p>
</div>
</div>
</div>
</body>
</html>