/** * gst_tuner_channel_changed: * @tuner: A #GstTuner instance * @channel: A #GstTunerChannel instance * * Called by elements implementing the #GstTuner interface when the * current channel changes. Fires the #GstTuner::channel-changed signal. */ void gst_tuner_channel_changed (GstTuner * tuner, GstTunerChannel * channel) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), gst_tuner_signals[CHANNEL_CHANGED], 0, channel); }
/** * gst_tuner_signal_changed: * @tuner: A #GstTuner instance * @channel: The current #GstTunerChannel * @signal: The new signal strength * * Called by elements implementing the #GstTuner interface when the * incoming signal strength changes. Fires the #GstTuner::signal-changed * signal on the tuner and the #GstTunerChannel::signal-changed signal on * the channel. */ void gst_tuner_signal_changed (GstTuner * tuner, GstTunerChannel * channel, gint signal) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), gst_tuner_signals[SIGNAL_CHANGED], 0, channel, signal); g_signal_emit_by_name (G_OBJECT (channel), "signal_changed", signal); }
/** * gst_tuner_frequency_changed: * @tuner: A #GstTuner instance * @channel: The current #GstTunerChannel * @frequency: The new frequency setting * * Called by elements implementing the #GstTuner interface when the * configured frequency changes. Fires the #GstTuner::frequency-changed * signal on the tuner, and the #GstTunerChannel::frequency-changed signal * on the channel. */ void gst_tuner_frequency_changed (GstTuner * tuner, GstTunerChannel * channel, gulong frequency) { g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_signal_emit (G_OBJECT (tuner), gst_tuner_signals[FREQUENCY_CHANGED], 0, channel, frequency); g_signal_emit_by_name (G_OBJECT (channel), "frequency_changed", frequency); }
void gst_tuner_set_frequency (GstTuner * tuner, GstTunerChannel * channel, gulong frequency) { GstTunerInterface *iface; g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_return_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY)); iface = GST_TUNER_GET_INTERFACE (tuner); if (iface->set_frequency) { iface->set_frequency (tuner, channel, frequency); } }
void gst_tuner_set_frequency (GstTuner * tuner, GstTunerChannel * channel, gulong frequency) { GstTunerClass *klass; g_return_if_fail (GST_IS_TUNER (tuner)); g_return_if_fail (GST_IS_TUNER_CHANNEL (channel)); g_return_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY)); klass = GST_TUNER_GET_CLASS (tuner); if (klass->set_frequency) { klass->set_frequency (tuner, channel, frequency); } }
/** * gst_tuner_signal_strength: * @tuner: the #GstTuner (a #GstElement) that owns the given channel. * @channel: the #GstTunerChannel to get the signal strength from. * * Get the strength of the signal on this channel. Note that this * requires the current channel to be a "tuning" channel, i.e. a * channel on which frequency can be set. This can be checked using * GST_TUNER_CHANNEL_HAS_FLAG (), and the appropriate flag to check * for is GST_TUNER_CHANNEL_FREQUENCY. * * The valid range of the signal strength is indicated in the * min_signal and max_signal properties of the #GstTunerChannel. * * Returns: Signal strength, or 0 on error. */ gint gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel) { GstTunerInterface *iface; g_return_val_if_fail (GST_IS_TUNER (tuner), 0); g_return_val_if_fail (GST_IS_TUNER_CHANNEL (channel), 0); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY), 0); iface = GST_TUNER_GET_INTERFACE (tuner); if (iface->signal_strength) { return iface->signal_strength (tuner, channel); } return 0; }
/** * gst_tuner_signal_strength: * @tuner: the #GstTuner (a #GstElement) that owns the given channel. * @channel: the #GstTunerChannel to get the signal strength from. * * Get the strength of the signal on this channel. Note that this * requires the current channel to be a "tuning" channel, i.e. a * channel on which frequency can be set. This can be checked using * GST_TUNER_CHANNEL_HAS_FLAG (), and the appropriate flag to check * for is GST_TUNER_CHANNEL_FREQUENCY. * * The valid range of the signal strength is indicated in the * min_signal and max_signal properties of the #GstTunerChannel. * * Returns: Signal strength, or 0 on error. */ gint gst_tuner_signal_strength (GstTuner * tuner, GstTunerChannel * channel) { GstTunerClass *klass; g_return_val_if_fail (GST_IS_TUNER (tuner), 0); g_return_val_if_fail (GST_IS_TUNER_CHANNEL (channel), 0); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY), 0); klass = GST_TUNER_GET_CLASS (tuner); if (klass->signal_strength) { return klass->signal_strength (tuner, channel); } return 0; }
gulong gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel) { GstTunerInterface *iface; g_return_val_if_fail (GST_IS_TUNER (tuner), 0); g_return_val_if_fail (GST_IS_TUNER_CHANNEL (channel), 0); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY), 0); iface = GST_TUNER_GET_INTERFACE (tuner); if (iface->get_frequency) { return iface->get_frequency (tuner, channel); } return 0; }
gulong gst_tuner_get_frequency (GstTuner * tuner, GstTunerChannel * channel) { GstTunerClass *klass; g_return_val_if_fail (GST_IS_TUNER (tuner), 0); g_return_val_if_fail (GST_IS_TUNER_CHANNEL (channel), 0); g_return_val_if_fail (GST_TUNER_CHANNEL_HAS_FLAG (channel, GST_TUNER_CHANNEL_FREQUENCY), 0); klass = GST_TUNER_GET_CLASS (tuner); if (klass->get_frequency) { return klass->get_frequency (tuner, channel); } return 0; }