diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-02-10 23:55:53 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-02-10 23:59:37 +0100 |
commit | becbe7f8ef61f51ccbbb228f248b85b02e1eeab9 (patch) | |
tree | 76a43cbe4bd84835bdad413bc6661decb9c0aecf | |
parent | a0101b32ea373f04214b388de9041df298de6a52 (diff) | |
download | totem-becbe7f8ef61f51ccbbb228f248b85b02e1eeab9.tar.gz |
backend: Export subtitle/lang track titles
-rw-r--r-- | src/backend/bacon-video-widget.c | 2 | ||||
-rw-r--r-- | src/backend/bacon-video-widget.h | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c index 08bbab0ce..e85e6e119 100644 --- a/src/backend/bacon-video-widget.c +++ b/src/backend/bacon-video-widget.c @@ -2775,6 +2775,7 @@ get_lang_list_for_type (BaconVideoWidget * bvw, const gchar * type_name) if (tags) { gst_tag_list_get_string (tags, GST_TAG_LANGUAGE_CODE, &info->language); + gst_tag_list_get_string (tags, GST_TAG_TITLE, &info->title); if (g_str_equal (type_name, "AUDIO")) gst_tag_list_get_string (tags, GST_TAG_AUDIO_CODEC, &info->codec); @@ -2800,6 +2801,7 @@ bacon_video_widget_lang_info_free (BvwLangInfo *info) { if (info == NULL) return; + g_free (info->title); g_free (info->language); g_free (info->codec); g_free (info); diff --git a/src/backend/bacon-video-widget.h b/src/backend/bacon-video-widget.h index 23764b6f2..a115301e2 100644 --- a/src/backend/bacon-video-widget.h +++ b/src/backend/bacon-video-widget.h @@ -339,15 +339,17 @@ void bacon_video_widget_dvd_event (BaconVideoWidget *bvw, /** * BvwLangInfo: + * @title: the title of the track, or %NULL if unset. * @language: the ISO-639 language code for the track, or "und" if unknown. - * Can never be %NULL. + * Can never be %NULL. * @codec: the codec for the track, or %NULL if unknown or unset. * - * #BvwLangInfo holds the language code and codec for each subtitle - * or audio track for a media, which would allow the front-ends to - * present appropriate information to the user. + * #BvwLangInfo holds the title, language code and codec for each + * subtitle or audio track for a media, which would allow the + * front-ends to present appropriate information to the user. */ typedef struct { + char *title; char *language; char *codec; } BvwLangInfo; |