## gstplayer-mediainfo gstplayer-mediainfo — Player Media Information |

## Functions

const gchar * | gst_player_media_info_get_uri ()
GstClockTime | gst_player_media_info_get_duration ()
const gchar * | gst_player_media_info_get_title ()
const gchar * | gst_player_media_info_get_container_format ()
gboolean | gst_player_media_info_is_seekable ()
GstSample * | gst_player_media_info_get_image_sample ()
GstTagList * | gst_player_media_info_get_tags ()
GList * | gst_player_media_info_get_stream_list ()
gint | gst_player_stream_info_get_index ()
GstCaps * | gst_player_stream_info_get_caps ()
GstTagList * | gst_player_stream_info_get_tags ()
const gchar * | gst_player_stream_info_get_codec ()
const gchar * | gst_player_stream_info_get_stream_type ()
gint | gst_player_audio_info_get_bitrate ()
gint | gst_player_audio_info_get_channels ()
const gchar * | gst_player_audio_info_get_language ()
gint | gst_player_audio_info_get_max_bitrate ()
gint | gst_player_audio_info_get_sample_rate ()
gint | gst_player_video_info_get_bitrate ()
gint | gst_player_video_info_get_height ()
gint | gst_player_video_info_get_width ()
void | gst_player_video_info_get_framerate ()
gint | gst_player_video_info_get_max_bitrate ()
void | gst_player_video_info_get_pixel_aspect_ratio ()
const gchar * | gst_player_subtitle_info_get_language ()

## Types and Values

| GstPlayerMediaInfo
| GstPlayerStreamInfo
| GstPlayerAudioInfo
| GstPlayerVideoInfo
| GstPlayerSubtitleInfo

## Object Hierarchy

        GObject
        ├── GstPlayerMediaInfo
        ╰── GstPlayerStreamInfo
            ├── GstPlayerAudioInfo
            ├── GstPlayerSubtitleInfo
            ╰── GstPlayerVideoInfo

## Description

## Functions

### gst_player_media_info_get_uri ()

    const gchar *
    gst_player_media_info_get_uri (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

the URI associated with GstPlayerMediaInfo.

### gst_player_media_info_get_duration ()

    GstClockTime
    gst_player_media_info_get_duration (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

duration of the media.

### gst_player_media_info_get_title ()

    const gchar *
    gst_player_media_info_get_title (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

the media title.

### gst_player_media_info_get_container_format ()

    const gchar *
    gst_player_media_info_get_container_format
                                   (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

the container format.

### gst_player_media_info_is_seekable ()

    gboolean
    gst_player_media_info_is_seekable (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

`TRUE` if the media is seekable.

### gst_player_media_info_get_image_sample ()

    GstSample *
    gst_player_media_info_get_image_sample
                                   (const GstPlayerMediaInfo *info);

Function to get the image (or preview-image) stored in taglist. Application can use gst_sample_*_() API's to get caps, buffer etc.

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

GstSample or NULL.

[transfer none]

### gst_player_media_info_get_tags ()

    GstTagList *
    gst_player_media_info_get_tags (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

the tags contained in media info.

[transfer none]

### gst_player_media_info_get_stream_list ()

    GList *
    gst_player_media_info_get_stream_list (const GstPlayerMediaInfo *info);

#### Parameters

info | a GstPlayerMediaInfo |

#### Returns

A GList of matching GstPlayerStreamInfo.

[transfer none][element-type GstPlayerStreamInfo]

### gst_player_stream_info_get_index ()

    gint
    gst_player_stream_info_get_index (const GstPlayerStreamInfo *info);

Function to get stream index from GstPlayerStreamInfo instance.

#### Parameters

info | a GstPlayerStreamInfo |

#### Returns

the stream index of this stream.

### gst_player_stream_info_get_caps ()

    GstCaps *
    gst_player_stream_info_get_caps (const GstPlayerStreamInfo *info);

#### Parameters

info | a GstPlayerStreamInfo |

#### Returns

the GstCaps of the stream.

[transfer none]

### gst_player_stream_info_get_tags ()

    GstTagList *
    gst_player_stream_info_get_tags (const GstPlayerStreamInfo *info);

#### Parameters

info | a GstPlayerStreamInfo |

#### Returns

the tags contained in this stream.

[transfer none]

### gst_player_stream_info_get_codec ()

    const gchar *
    gst_player_stream_info_get_codec (const GstPlayerStreamInfo *info);

A string describing codec used in GstPlayerStreamInfo.

#### Parameters

info | a GstPlayerStreamInfo |

#### Returns

codec string or NULL on unknown.

### gst_player_stream_info_get_stream_type ()

    const gchar *
    gst_player_stream_info_get_stream_type
                                   (const GstPlayerStreamInfo *info);

Function to return human readable name for the stream type of the given `info` (ex: "audio", "video", "subtitle")

#### Parameters

info | a GstPlayerStreamInfo |

#### Returns

a human readable name

### gst_player_audio_info_get_bitrate ()

    gint
    gst_player_audio_info_get_bitrate (const GstPlayerAudioInfo *info);

#### Parameters

info | a GstPlayerAudioInfo |

#### Returns

the audio bitrate in GstPlayerAudioInfo.

### gst_player_audio_info_get_channels ()

    gint
    gst_player_audio_info_get_channels (const GstPlayerAudioInfo *info);

#### Parameters

info | a GstPlayerAudioInfo |

#### Returns

the number of audio channels in GstPlayerAudioInfo.

### gst_player_audio_info_get_language ()

    const gchar *
    gst_player_audio_info_get_language (const GstPlayerAudioInfo *info);

#### Parameters

info | a GstPlayerAudioInfo |

#### Returns

the language of the stream, or NULL if unknown.

### gst_player_audio_info_get_max_bitrate ()

    gint
    gst_player_audio_info_get_max_bitrate (const GstPlayerAudioInfo *info);

#### Parameters

info | a GstPlayerAudioInfo |

#### Returns

the audio maximum bitrate in GstPlayerAudioInfo.

### gst_player_audio_info_get_sample_rate ()

    gint
    gst_player_audio_info_get_sample_rate (const GstPlayerAudioInfo *info);

#### Parameters

info | a GstPlayerAudioInfo |

#### Returns

the audio sample rate in GstPlayerAudioInfo.

### gst_player_video_info_get_bitrate ()

    gint
    gst_player_video_info_get_bitrate (const GstPlayerVideoInfo *info);

#### Parameters

info | a GstPlayerVideoInfo |

#### Returns

the current bitrate of video in GstPlayerVideoInfo.

### gst_player_video_info_get_height ()

    gint
    gst_player_video_info_get_height (const GstPlayerVideoInfo *info);

#### Parameters

info | a GstPlayerVideoInfo |

#### Returns

the height of video in GstPlayerVideoInfo.

### gst_player_video_info_get_width ()

    gint
    gst_player_video_info_get_width (const GstPlayerVideoInfo *info);

#### Parameters

info | a GstPlayerVideoInfo |

#### Returns

the width of video in GstPlayerVideoInfo.

### gst_player_video_info_get_framerate ()

    void
    gst_player_video_info_get_framerate (const GstPlayerVideoInfo *info,
                                         gint *fps_n,
                                         gint *fps_d);

#### Parameters

info | a GstPlayerVideoInfo |
fps_n | Numerator of frame rate. | [out]
fps_d | Denominator of frame rate. | [out]

### gst_player_video_info_get_max_bitrate ()

    gint
    gst_player_video_info_get_max_bitrate (const GstPlayerVideoInfo *info);

#### Parameters

info | a GstPlayerVideoInfo |

#### Returns

the maximum bitrate of video in GstPlayerVideoInfo.

### gst_player_video_info_get_pixel_aspect_ratio ()

    void
    gst_player_video_info_get_pixel_aspect_ratio
                                   (const GstPlayerVideoInfo *info,
                                    guint *par_n,
                                    guint *par_d);

Returns the pixel aspect ratio in `par_n` and `par_d`

#### Parameters

info | a GstPlayerVideoInfo |
par_n | numerator. | [out]
par_d | denominator. | [out]

### gst_player_subtitle_info_get_language ()

    const gchar *
    gst_player_subtitle_info_get_language (const GstPlayerSubtitleInfo *info);

#### Parameters

info | a GstPlayerSubtitleInfo |

#### Returns

the language of the stream, or NULL if unknown.

## Types and Values

### GstPlayerMediaInfo

    typedef struct _GstPlayerMediaInfo GstPlayerMediaInfo;

Structure containing the media information of a URI.

### GstPlayerStreamInfo

    typedef struct _GstPlayerStreamInfo GstPlayerStreamInfo;

Base structure for information concering a media stream. Depending on the stream type, one can find more media-specific information in GstPlayerVideoInfo, GstPlayerAudioInfo, GstPlayerSubtitleInfo.

### GstPlayerAudioInfo

    typedef struct _GstPlayerAudioInfo GstPlayerAudioInfo;

GstPlayerStreamInfo specific to audio streams.

### GstPlayerVideoInfo

    typedef struct _GstPlayerVideoInfo GstPlayerVideoInfo;

GstPlayerStreamInfo specific to video streams.

### GstPlayerSubtitleInfo

    typedef struct _GstPlayerSubtitleInfo GstPlayerSubtitleInfo;

GstPlayerStreamInfo specific to subtitle streams.