public void Initialize() { Element videosink; video_display_context_type = VideoDisplayContextType.GdkWindow; //FIXME BEFORE PUSHING NEW GST# BACKEND: is gconfvideosink gone in 1.0? it is not there in the unmanaged backend videosink = ElementFactory.Make("gconfvideosink", "videosink"); if (videosink == null) { videosink = ElementFactory.Make("autovideosink", "videosink"); if (videosink == null) { video_display_context_type = VideoDisplayContextType.Unsupported; videosink = ElementFactory.Make("fakesink", "videosink"); if (videosink != null) { videosink ["sync"] = true; } } } playbin ["video-sink"] = videosink; // FIXME: the 2 lines below (SyncHandler and ElementAdded), if uncommented, cause hangs, and they // don't seem to be useful at this point anyway, remove? //a) playbin.Bus.SyncHandler = (bus, message) => { return bus.SyncSignalHandler (message); }; //b) playbin.Bus.EnableSyncMessageEmission (); playbin.Bus.SyncMessage += OnSyncMessage; //if (videosink is Bin) { ((Bin)videosink).ElementAdded += OnVideoSinkElementAdded; } RaisePrepareWindow(); }
public void Initialize() { Element videosink; if (VideoPipelineSetup != null) { videosink = VideoPipelineSetup(); if (videosink != null && videosink is Element) { playbin ["video-sink"] = videosink; video_display_context_type = VideoDisplayContextType.Custom; return; } } video_display_context_type = VideoDisplayContextType.GdkWindow; videosink = ElementFactory.Make("gconfvideosink", "videosink"); if (videosink == null) { videosink = ElementFactory.Make("autovideosink", "videosink"); if (videosink == null) { video_display_context_type = VideoDisplayContextType.Unsupported; videosink = ElementFactory.Make("fakesink", "videosink"); if (videosink != null) { videosink ["sync"] = true; } } } playbin ["video-sink"] = videosink; playbin.Bus.SyncHandler = (bus, message) => { return(bus.SyncSignalHandler(message)); }; playbin.Bus.SyncMessage += OnSyncMessage; if (videosink is Bin) { ((Bin)videosink).ElementAdded += OnVideoSinkElementAdded; } if (PrepareWindow != null) { PrepareWindow(); } }
public void Initialize () { Element videosink; if (VideoPipelineSetup != null) { videosink = VideoPipelineSetup (); if (videosink != null && videosink is Element) { playbin ["video-sink"] = videosink; video_display_context_type = VideoDisplayContextType.Custom; return; } } video_display_context_type = VideoDisplayContextType.GdkWindow; videosink = ElementFactory.Make ("gconfvideosink", "videosink"); if (videosink == null) { videosink = ElementFactory.Make ("autovideosink", "videosink"); if (videosink == null) { video_display_context_type = VideoDisplayContextType.Unsupported; videosink = ElementFactory.Make ("fakesink", "videosink"); if (videosink != null) { videosink ["sync"] = true; } } } playbin ["video-sink"] = videosink; playbin.Bus.SyncHandler = (bus, message) => {return bus.SyncSignalHandler (message); }; playbin.Bus.SyncMessage += OnSyncMessage; if (videosink is Bin) { ((Bin)videosink).ElementAdded += OnVideoSinkElementAdded; } if (PrepareWindow != null) { PrepareWindow (); } }
public void Initialize() { Element videosink; video_display_context_type = VideoDisplayContextType.GdkWindow; //FIXME BEFORE PUSHING NEW GST# BACKEND: is gconfvideosink gone in 1.0? it is not there in the unmanaged backend videosink = ElementFactory.Make ("gconfvideosink", "videosink"); if (videosink == null) { videosink = ElementFactory.Make ("autovideosink", "videosink"); if (videosink == null) { video_display_context_type = VideoDisplayContextType.Unsupported; videosink = ElementFactory.Make ("fakesink", "videosink"); if (videosink != null) { videosink ["sync"] = true; } } } playbin ["video-sink"] = videosink; // FIXME: the 2 lines below (SyncHandler and ElementAdded), if uncommented, cause hangs, and they // don't seem to be useful at this point anyway, remove? //a) playbin.Bus.SyncHandler = (bus, message) => { return bus.SyncSignalHandler (message); }; //b) playbin.Bus.EnableSyncMessageEmission (); playbin.Bus.SyncMessage += OnSyncMessage; //if (videosink is Bin) { ((Bin)videosink).ElementAdded += OnVideoSinkElementAdded; } RaisePrepareWindow (); }