<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Actually turns out I am having two separate issues here…</div><div><br></div><div>Interestingly the “overlay" element never seems to be doing anything regardless of what video filter I am using. For example just as a test I changed it to  a videoflip filter with method=clockwise and that doesn’t seem to be happening either.</div><div><br></div><div><div><div>            sourceElement = ElementFactory.Make("filesrc", "source" + playerId);</div><div>            decodeElement = ElementFactory.Make("decodebin", "decoder" + playerId);</div><div>            convertElement = ElementFactory.Make("videoconvert", "convert" + playerId);</div><div>            overlayElement = ElementFactory.Make("videoflip", "overlay" + playerId);</div><div>            queueElement = ElementFactory.Make("queue", "queue" + playerId);</div><div><br></div><div>            if (overlayElement != null)</div><div>            {</div><div>                overlayElement["method"] = "clockwise";</div><div>            }</div><div>            pipeline = new Pipeline("pipeline" + playerId);</div><div>            sourceElement["location"] = videoUri;</div><div>            decodeElement.PadAdded += decodeElement_PadAdded; // connect the convertElement to decodeElement once its ready</div><div><br></div><div>            pipeline.Bus.EnableSyncMessageEmission();</div><div>            pipeline.Bus.AddSignalWatch();</div><div>            pipeline.Bus.SyncMessage += Bus_SyncMessageHandler;</div><div>            pipeline.Bus.Message += Bus_MessageHandler;</div><div><br></div><div>            pipeline.Add(sourceElement, decodeElement, convertElement, overlayElement, queueElement, sinkElement);</div><div>            Element.Link(sourceElement, decodeElement);</div><div><br></div><div>            isPlaying = false;</div><div>            pipeline.SetState(State.Playing);</div><div>            </div><div>private static void decodeElement_PadAdded(object o, PadAddedArgs args)</div><div>{</div><div>    Console.WriteLine("Decode element, pad added.");</div><div>    PadLinkReturn padReturn = args.NewPad.Link(convertElement.GetStaticPad("sink"));</div><div>    bool linked = convertElement.Link(overlayElement);</div><div>    bool linked2 = overlayElement.Link(queueElement);</div><div>    bool linked3 = queueElement.Link(sinkElement);</div><div>}</div></div></div><div><br></div><div><br></div><div>Oddly enough if I construct the same pipeline using Gst.Parse it works, so clearly I must be missing something in how I am manually creating the pipeline.</div><div><br></div><div>Pipeline pipeline = Parse.Launch("filesrc location=\”<path to videofile>" ! decodebin ! videoconvert ! videoflip  method=clockwise ! queue ! autovideosink") as Pipeline;</div><div><br></div><div>^ this pipeline works was expected.</div><div><br></div><div>Now back to the cairooverlay issue. If I use the Parsed pipeline with the cairooverlay and iterate over the pipeline elements I can discover the cairo overlay element and connect to its Draw function. The problem I am having if I do that is that my glib-sharp.dll 3.0.0.0 gives me an error – Unknown type CairoContext.  My glib-sharp is built off off the gtk-sharp-master git repo. I thought that CairoContext was part of Mono.Cairo and I have also included cairo-sharp.dll in my project. So I’m not sure how to solve this issue. Is there something better to use for Drawing on top of video frame rather than the CairoOverlay element?</div><div><br></div><div>Thanks,</div><div>Piyush</div><div><br></div><span id="OLK_SRC_BODY_SECTION"><div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt"><span style="font-weight:bold">From: </span> <Agarwal>, Piyush Agarwal <<a href="mailto:piyush.agarwal@ll.mit.edu">piyush.agarwal@ll.mit.edu</a>><br><span style="font-weight:bold">Reply-To: </span> Discussion of the development of and with GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>><br><span style="font-weight:bold">Date: </span> Monday, January 12, 2015 at 5:15 PM<br><span style="font-weight:bold">To: </span> Discussion of the development of and with GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>><br><span style="font-weight:bold">Subject: </span> Gstreamer-Sharp - Use Cairo Overlay<br></div><div><br></div><div><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 14px; font-family: Calibri, sans-serif;"><div>Hi Everyone,</div><div><br></div><div>I am trying to use the cairooverlay element in a Gstreamer-sharp application and unfortunately the draw/caps-changed signals are not being called. Just wanted to double check and make sure I was setting up the element properly:</div><div><br></div><div><div>            sourceElement = ElementFactory.Make("filesrc", "source" + playerId);</div><div>            decodeElement = ElementFactory.Make("decodebin", "decoder" + playerId);</div><div>            convertElement = ElementFactory.Make("videoconvert", "convert" + playerId);</div><div>            overlayElement = ElementFactory.Make("cairooverlay", "overlay" + playerId);</div><div>            queueElement = ElementFactory.Make("queue", "queue" + playerId);</div></div><div><br></div><div><div>            if (overlayElement != null)</div><div>            {</div><div>                overlayElement.Connect("draw", DrawOverlay);</div><div>                overlayElement.Connect("caps-changed", PrepareOverlay);</div><div>            }</div></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre"></span>     …… // other stuff here for initialization of the playbin/pipeline</div><div><br></div><div><div>                Bin pipelineBin = (Bin)pipeline;</div><div><br></div><div>                pipelineBin.Add(sourceElement, decodeElement, convertElement, overlayElement, queueElement, sinkElement);</div><div>                Element.Link(sourceElement, decodeElement, convertElement, overlayElement, queueElement, sinkElement);</div></div><div><br></div><div>And then my signal functions are:</div><div><br></div><div><div>        private static void PrepareOverlay(object o, GLib.SignalArgs args)</div><div>        {</div><div>            Console.WriteLine(args);</div><div>        }</div><div><br></div><div>        private static void DrawOverlay(object o, GLib.SignalArgs args)</div><div>        {</div><div>            Console.WriteLine(args);</div><div>        }</div></div><div><br></div><div>My breakpoints inside the signal functions never hit.</div><div><br></div><div>Hopefully someone can help me out!</div><div><br></div><div>Thanks,</div><div>PIyush</div></div></div></span></body></html>