gst/playback/gststreaminfo.*: Introduce language informations.

Original commit message from CVS:
2006-02-19  Julien MOUTTE  <julien@moutte.net>

* gst/playback/gststreaminfo.c: (gst_stream_type_get_type),
(cb_probe):
* gst/playback/gststreaminfo.h: Introduce language informations.
This commit is contained in:
Julien Moutte 2006-02-19 00:25:16 +00:00
parent c8ddff9120
commit 3491deae9c
3 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,9 @@
2006-02-19 Julien MOUTTE <julien@moutte.net>
* gst/playback/gststreaminfo.c: (gst_stream_type_get_type),
(cb_probe):
* gst/playback/gststreaminfo.h: Introduce language informations.
2006-02-18 Jan Schmidt <thaytan@mad.scientist.com>
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),

View file

@ -60,6 +60,7 @@ gst_stream_type_get_type (void)
{GST_STREAM_TYPE_AUDIO, "Audio stream", "audio"},
{GST_STREAM_TYPE_VIDEO, "Video stream", "video"},
{GST_STREAM_TYPE_TEXT, "Text stream", "text"},
{GST_STREAM_TYPE_SUBPICTURE, "Subpicture stream", "subpicture"},
{GST_STREAM_TYPE_ELEMENT,
"Stream handled by element", "element"},
{0, NULL, NULL},
@ -178,7 +179,7 @@ cb_probe (GstPad * pad, GstEvent * e, gpointer user_data)
GstStreamInfo *info = user_data;
if (GST_EVENT_TYPE (e) == GST_EVENT_TAG) {
gchar *codec; //, *lang;
gchar *codec, *lang;
GstTagList *list;
gst_event_parse_tag (e, &list);
@ -192,13 +193,11 @@ cb_probe (GstPad * pad, GstEvent * e, gpointer user_data)
info->codec = codec;
g_object_notify (G_OBJECT (info), "codec");
}
#if 0
if (gst_tag_list_get_string (list, GST_TAG_LANGUAGE_CODE, &lang)) {
g_free (info->langcode);
info->langcode = lang;
g_object_notify (G_OBJECT (info), "language-code");
}
#endif
}
return TRUE;

View file

@ -36,10 +36,11 @@ typedef struct _GstStreamInfoClass GstStreamInfoClass;
typedef enum {
GST_STREAM_TYPE_UNKNOWN = 0,
GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */
GST_STREAM_TYPE_VIDEO = 2, /* a video stream */
GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */
GST_STREAM_TYPE_ELEMENT = 4, /* stream handled by an element */
GST_STREAM_TYPE_AUDIO = 1, /* an audio stream */
GST_STREAM_TYPE_VIDEO = 2, /* a video stream */
GST_STREAM_TYPE_TEXT = 3, /* a subtitle/text stream */
GST_STREAM_TYPE_SUBPICTURE = 4, /* a subtitle in picture-form */
GST_STREAM_TYPE_ELEMENT = 5 /* stream handled by an element */
} GstStreamType;
struct _GstStreamInfo {
@ -82,4 +83,3 @@ gboolean gst_stream_info_is_mute (GstStreamInfo *stream_info);
G_END_DECLS
#endif /* __GST_STREAMINFO_H__ */