## gsttuner

gsttuner — Interface for elements providing tuner operations

## Synopsis

    #include <gst/interfaces/tuner.h>

                        GstTuner;
    const GList*        gst_tuner_list_channels             (GstTuner *tuner);
    GstTunerChannel*    gst_tuner_get_channel               (GstTuner *tuner);
    void                gst_tuner_set_channel               (GstTuner *tuner,
                                                             GstTunerChannel *channel);
    const GList*        gst_tuner_list_norms                (GstTuner *tuner);
    GstTunerNorm*       gst_tuner_get_norm                  (GstTuner *tuner);
    void                gst_tuner_set_norm                  (GstTuner *tuner,
                                                             GstTunerNorm *norm);
    gulong              gst_tuner_get_frequency             (GstTuner *tuner,
                                                             GstTunerChannel *channel);
    void                gst_tuner_set_frequency             (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gulong frequency);
    gint                gst_tuner_signal_strength           (GstTuner *tuner,
                                                             GstTunerChannel *channel);
    GstTunerNorm*       gst_tuner_find_norm_by_name         (GstTuner *tuner,
                                                             gchar *norm);
    GstTunerChannel*    gst_tuner_find_channel_by_name      (GstTuner *tuner,
                                                             gchar *channel);
    void                gst_tuner_channel_changed           (GstTuner *tuner,
                                                             GstTunerChannel *channel);
    void                gst_tuner_norm_changed              (GstTuner *tuner,
                                                             GstTunerNorm *norm);
    void                gst_tuner_frequency_changed         (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gulong frequency);
    void                gst_tuner_signal_changed            (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gint signal);

## Object Hierarchy

      GInterface
       +----GstTuner

## Prerequisites

GstTuner requires GstImplementsInterface and GstElement.

## Signals

      "channel-changed"                                : Run Last
      "frequency-changed"                              : Run Last
      "norm-changed"                                   : Run Last
      "signal-changed"                                 : Run Last

## Description

## Details

### GstTuner

    typedef struct _GstTuner GstTuner;

### gst_tuner_list_channels ()

    const GList*        gst_tuner_list_channels             (GstTuner *tuner);

Retrieve a list of channels (e.g. 'composite', 's-video', ...) from the given tuner object.

`tuner` : | the GstTuner (a GstElement) to get the channels from.
Returns : | a list of channels available on this tuner.

### gst_tuner_get_channel ()

    GstTunerChannel*    gst_tuner_get_channel               (GstTuner *tuner);

`tuner` : |
Returns : |

### gst_tuner_set_channel ()

    void                gst_tuner_set_channel               (GstTuner *tuner,
                                                             GstTunerChannel *channel);

Tunes the object to the given channel.

`tuner` : | the GstTuner (a GstElement) that owns the channel.
`channel` : | the channel to tune to.

### gst_tuner_list_norms ()

    const GList*        gst_tuner_list_norms                (GstTuner *tuner);

`tuner` : |
Returns : |

### gst_tuner_get_norm ()

    GstTunerNorm*       gst_tuner_get_norm                  (GstTuner *tuner);

Get the current video norm from the given tuner object for the currently selected channel.

`tuner` : | the GstTuner (a GstElement) to get the current norm from.
Returns : | the current norm.

### gst_tuner_set_norm ()

    void                gst_tuner_set_norm                  (GstTuner *tuner,
                                                             GstTunerNorm *norm);

Changes the video norm on this tuner to the given norm.

`tuner` : | the GstTuner (a GstElement) to set the norm on.
`norm` : | the norm to use for the current channel.

### gst_tuner_get_frequency ()

    gulong              gst_tuner_get_frequency             (GstTuner *tuner,
                                                             GstTunerChannel *channel);

Retrieve the current frequency from the given channel. The same applies as for `set_frequency()`: check the flag.

`tuner` : | the GstTuner (a GstElement) that owns the given channel.
`channel` : | the GstTunerChannel to retrieve the frequency from.
Returns : | the current frequency, or 0 on error.

### gst_tuner_set_frequency ()

    void                gst_tuner_set_frequency             (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gulong frequency);

Sets a tuning frequency on the given tuner/channel. Note that this requires the given channel to be a "tuning" channel, which can be checked using `GST_TUNER_CHANNEL_HAS_FLAG()`, with the proper flag being GST_TUNER_CHANNEL_FREQUENCY.

`tuner` : | the Gsttuner (a GstElement) that owns the given channel.
`channel` : | the GstTunerChannel to set the frequency on.
`frequency` : | the frequency to tune in to.

### gst_tuner_signal_strength ()

    gint                gst_tuner_signal_strength           (GstTuner *tuner,
                                                             GstTunerChannel *channel);

`tuner` : |
`channel` : |
Returns : |

### gst_tuner_find_norm_by_name ()

    GstTunerNorm*       gst_tuner_find_norm_by_name         (GstTuner *tuner,
                                                             gchar *norm);

`tuner` : |
`norm` : |
Returns : |

### gst_tuner_find_channel_by_name ()

    GstTunerChannel*    gst_tuner_find_channel_by_name      (GstTuner *tuner,
                                                             gchar *channel);

`tuner` : |
`channel` : |
Returns : |

### gst_tuner_channel_changed ()

    void                gst_tuner_channel_changed           (GstTuner *tuner,
                                                             GstTunerChannel *channel);

`tuner` : |
`channel` : |

### gst_tuner_norm_changed ()

    void                gst_tuner_norm_changed              (GstTuner *tuner,
                                                             GstTunerNorm *norm);

`tuner` : |
`norm` : |

### gst_tuner_frequency_changed ()

    void                gst_tuner_frequency_changed         (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gulong frequency);

`tuner` : |
`channel` : |
`frequency` : |

### gst_tuner_signal_changed ()

    void                gst_tuner_signal_changed            (GstTuner *tuner,
                                                             GstTunerChannel *channel,
                                                             gint signal);

`tuner` : |
`channel` : |
`signal` : |

## Signal Details

### The "channel-changed" signal

    void                user_function                      (GstTuner        *gsttuner,
                                                            GstTunerChannel *arg1,
                                                            gpointer         user_data)      : Run Last

`gsttuner` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "frequency-changed" signal

    void                user_function                      (GstTuner        *gsttuner,
                                                            GstTunerChannel *arg1,
                                                            gulong           arg2,
                                                            gpointer         user_data)      : Run Last

`gsttuner` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.

### The "norm-changed" signal

    void                user_function                      (GstTuner     *gsttuner,
                                                            GstTunerNorm *arg1,
                                                            gpointer      user_data)      : Run Last

`gsttuner` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.

### The "signal-changed" signal

    void                user_function                      (GstTuner        *gsttuner,
                                                            GstTunerChannel *arg1,
                                                            gint             arg2,
                                                            gpointer         user_data)      : Run Last

`gsttuner` : | the object which received the signal.
`arg1` : |
`arg2` : |
`user_data` : | user data set when the signal handler was connected.