GtuberMediaInfo: Gtuber Reference Manual

## GtuberMediaInfo GtuberMediaInfo — contains media information |

## Functions

const gchar * | gtuber_media_info_get_id ()
const gchar * | gtuber_media_info_get_title ()
const gchar * | gtuber_media_info_get_description ()
guint | gtuber_media_info_get_duration ()
GHashTable * | gtuber_media_info_get_chapters ()
gboolean | gtuber_media_info_get_has_streams ()
GPtrArray * | gtuber_media_info_get_streams ()
gboolean | gtuber_media_info_get_has_adaptive_streams ()
GPtrArray * | gtuber_media_info_get_adaptive_streams ()
GHashTable * | gtuber_media_info_get_request_headers ()

## Properties

char * | description | Read
guint | duration | Read
gboolean | has-adaptive-streams | Read
gboolean | has-streams | Read
char * | id | Read
char * | title | Read

## Types and Values

| GtuberMediaInfo

## Object Hierarchy

        GObject
        ╰── GtuberMediaInfo

## Description

## Functions

### gtuber_media_info_get_id ()

    const gchar *
    gtuber_media_info_get_id (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

media ID or `NULL` when undetermined.

[transfer none]

### gtuber_media_info_get_title ()

    const gchar *
    gtuber_media_info_get_title (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

media title or `NULL` when undetermined.

[transfer none]

### gtuber_media_info_get_description ()

    const gchar *
    gtuber_media_info_get_description (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

media description or `NULL` when undetermined.

[transfer none]

### gtuber_media_info_get_duration ()

    guint
    gtuber_media_info_get_duration (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

media duration in seconds or 0 when undetermined.

### gtuber_media_info_get_chapters ()

    GHashTable *
    gtuber_media_info_get_chapters (GtuberMediaInfo *info);

Get a GHashTable with chapter start time and name pairs.

#### Parameters

info | a GtuberMediaInfo |

#### Returns

a GHashTable with chapters, or `NULL` when none.

[transfer none]

### gtuber_media_info_get_has_streams ()

    gboolean
    gtuber_media_info_get_has_streams (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

`TRUE` if info has streams, `FALSE` otherwise.

### gtuber_media_info_get_streams ()

    GPtrArray *
    gtuber_media_info_get_streams (GtuberMediaInfo *info);

Get a GPtrArray of GtuberStream instances. When no streams are available, an empty array is returned. Use `gtuber_media_info_get_has_streams()` to check if array will be empty.

#### Parameters

info | a GtuberMediaInfo |

#### Returns

a GPtrArray of available GtuberStream instances.

[transfer none][element-type GtuberStream]

### gtuber_media_info_get_has_adaptive_streams ()

    gboolean
    gtuber_media_info_get_has_adaptive_streams
                                   (GtuberMediaInfo *info);

#### Parameters

info | a GtuberMediaInfo |

#### Returns

`TRUE` if info has adaptive streams, `FALSE` otherwise.

### gtuber_media_info_get_adaptive_streams ()

    GPtrArray *
    gtuber_media_info_get_adaptive_streams
                                   (GtuberMediaInfo *info);

Get a GPtrArray of GtuberAdaptiveStream instances. When no adaptive streams are available, an empty array is returned. Use `gtuber_media_info_get_has_adaptive_streams()` to check if array will be empty.

#### Parameters

info | a GtuberMediaInfo |

#### Returns

a GPtrArray of available GtuberAdaptiveStream instances.

[transfer none][element-type GtuberAdaptiveStream]

### gtuber_media_info_get_request_headers ()

    GHashTable *
    gtuber_media_info_get_request_headers (GtuberMediaInfo *info);

Get a GHashTable with request headers name and key pairs.

Users should use those headers for any future HTTP requests to URIs within specific GtuberMediaInfo object.

#### Parameters

info | a GtuberMediaInfo |

#### Returns

a GHashTable with recommended request headers.

[transfer none]

## Types and Values

### GtuberMediaInfo

    typedef struct _GtuberMediaInfo GtuberMediaInfo;

Contains result with parsed media info.

## Property Details

### The `“description”` property

      “description”              char *

Short media description.

Owner: GtuberMediaInfo

Flags: Read

Default value: NULL

### The `“duration”` property

      “duration”                 guint

Media duration in seconds.

Owner: GtuberMediaInfo

Flags: Read

Default value: 0

### The `“has-adaptive-streams”` property

      “has-adaptive-streams”     gboolean

Check if media info has any adaptive streams.

Owner: GtuberMediaInfo

Flags: Read

Default value: FALSE

### The `“has-streams”` property

      “has-streams”              gboolean

Check if media info has any normal streams.

Owner: GtuberMediaInfo

Flags: Read

Default value: FALSE

### The `“id”` property

      “id”                       char *

The ID of media.

Owner: GtuberMediaInfo

Flags: Read

Default value: NULL

### The `“title”` property

      “title”                    char *

Media title.

Owner: GtuberMediaInfo

Flags: Read

Default value: NULL