private void OnSourceChanged(object o, Gst.GLib.NotifyArgs args) { if (Device == null) { return; } var cdda_src = GetCddaSource(o as PlayBin2); if (cdda_src == null) { return; } // CddaBaseSrc elements should always have this property if (cdda_src.HasProperty("device")) { Log.DebugFormat("cdda: setting device property on source ({0})", Device); cdda_src ["device"] = Device; } // If the GstCddaBaseSrc is cdparanoia, it will have this property, so set it if (cdda_src.HasProperty("paranoia-mode")) { cdda_src ["paranoia-mode"] = 0; } }
private void OnCapsSet(object o, Gst.GLib.NotifyArgs args) { Structure s = null; int width, height, fps_n, fps_d, par_n, par_d; Caps caps = ((Pad)o).NegotiatedCaps; width = height = fps_n = fps_d = 0; if (caps == null) { return; } /* Get video decoder caps */ s = caps [0]; if (s != null) { /* We need at least width/height and framerate */ if (!(s.HasField("framerate") && s.HasField("width") && s.HasField("height"))) { return; } Fraction f = new Fraction(s.GetValue("framerate")); fps_n = f.Numerator; fps_d = f.Denominator; Gst.GLib.Value val; width = (int)s.GetValue("width"); height = (int)s.GetValue("height"); /* Get the PAR if available */ val = s.GetValue("pixel-aspect-ratio"); if (!val.Equals(Gst.GLib.Value.Empty)) { Fraction par = new Fraction(val); par_n = par.Numerator; par_d = par.Denominator; } else /* Square pixels */ { par_n = 1; par_d = 1; } /* Notify PlayerEngine if a callback was set */ RaiseVideoGeometry(width, height, fps_n, fps_d, par_n, par_d); } }
private void OnSourceChanged(object o, Gst.GLib.NotifyArgs args) { if (Device == null) { return; } var dvd_src = GetDvdSource(o as PlayBin2); if (dvd_src == null) { return; } // dvd source elements should always have this property if (dvd_src.HasProperty("device")) { Log.DebugFormat("dvd: setting device property on source ({0})", Device); dvd_src ["device"] = Device; } }
private void OnVolumeChanged(object o, Gst.GLib.NotifyArgs args) { OnEventChanged(PlayerEvent.Volume); }