diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-01-02 02:21:40 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2012-01-02 02:21:40 +0000 |
commit | 2836cbee946f00f7876fb070c5385e36af92aff8 (patch) | |
tree | 891708c2feac439e7ff71f699cb2cef3063f4661 | |
parent | 5668654ed5fe0779e7067efc1f7769542dfff7e3 (diff) | |
parent | cb23beda4fb9df87eba1f28ef0cd483287e38b66 (diff) |
Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
gst/gsttaglist.c
plugins/elements/gstoutputselector.c
-rw-r--r-- | docs/gst/gstreamer-sections.txt | 1 | ||||
-rw-r--r-- | gst/gsttaglist.c | 6 | ||||
-rw-r--r-- | gst/gsttaglist.h | 17 | ||||
-rw-r--r-- | plugins/elements/gstoutputselector.c | 39 | ||||
-rw-r--r-- | tests/check/Makefile.am | 2 |
5 files changed, 44 insertions, 21 deletions
diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 91c6a97a71..1af0570cc2 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -2319,6 +2319,7 @@ GST_TAG_ALBUM_GAIN GST_TAG_ALBUM_PEAK GST_TAG_REFERENCE_LEVEL GST_TAG_LANGUAGE_CODE +GST_TAG_LANGUAGE_NAME GST_TAG_IMAGE GST_TAG_PREVIEW_IMAGE GST_TAG_ATTACHMENT diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c index e942b7ac56..1287e9346b 100644 --- a/gst/gsttaglist.c +++ b/gst/gsttaglist.c @@ -282,7 +282,11 @@ _priv_gst_tag_initialize (void) _("reference level of track and album gain values"), NULL); gst_tag_register (GST_TAG_LANGUAGE_CODE, GST_TAG_FLAG_META, G_TYPE_STRING, _("language code"), - _("language code for this stream, conforming to ISO-639-1"), NULL); + _("language code for this stream, conforming to ISO-639-1 or ISO-639-2"), + NULL); + gst_tag_register (GST_TAG_LANGUAGE_NAME, GST_TAG_FLAG_META, G_TYPE_STRING, + _("language name"), + _("freeform name of the language this stream is in"), NULL); gst_tag_register (GST_TAG_IMAGE, GST_TAG_FLAG_META, GST_TYPE_SAMPLE, _("image"), _("image related to this stream"), gst_tag_merge_use_first); gst_tag_register (GST_TAG_PREVIEW_IMAGE, GST_TAG_FLAG_META, GST_TYPE_SAMPLE, diff --git a/gst/gsttaglist.h b/gst/gsttaglist.h index 7abfc611ac..ec1f7a22b9 100644 --- a/gst/gsttaglist.h +++ b/gst/gsttaglist.h @@ -700,10 +700,25 @@ gboolean gst_tag_list_get_buffer_index (const GstTagList * list, /** * GST_TAG_LANGUAGE_CODE: * - * Language code (ISO-639-1) (string) of the content + * ISO-639-2 or ISO-639-1 code for the language the content is in (string) + * + * There is utility API in libgsttag in gst-plugins-base to obtain a translated + * language name from the language code: gst_tag_get_language_name() */ #define GST_TAG_LANGUAGE_CODE "language-code" /** + * GST_TAG_LANGUAGE_NAME: + * + * Name of the language the content is in (string) + * + * Free-form name of the language the content is in, if a language code + * is not available. This tag should not be set in addition to a language + * code. It is undefined what language or locale the language name is in. + * + * Since: 0.10.37 + */ +#define GST_TAG_LANGUAGE_NAME "language-name" +/** * GST_TAG_IMAGE: * * image (sample) (sample caps should specify the content type and preferably diff --git a/plugins/elements/gstoutputselector.c b/plugins/elements/gstoutputselector.c index 4b2aef1805..ba30a4672c 100644 --- a/plugins/elements/gstoutputselector.c +++ b/plugins/elements/gstoutputselector.c @@ -374,7 +374,8 @@ gst_output_selector_switch (GstOutputSelector * osel) /* Switch */ GST_OBJECT_LOCK (GST_OBJECT (osel)); - GST_INFO ("switching to pad %" GST_PTR_FORMAT, osel->pending_srcpad); + GST_INFO_OBJECT (osel, "switching to pad %" GST_PTR_FORMAT, + osel->pending_srcpad); if (gst_pad_is_linked (osel->pending_srcpad)) { osel->active_srcpad = osel->pending_srcpad; res = TRUE; @@ -385,25 +386,27 @@ gst_output_selector_switch (GstOutputSelector * osel) /* Send SEGMENT event and latest buffer if switching succeeded * and we already have a valid segment configured */ - if (res && osel->segment.format != GST_FORMAT_UNDEFINED) { - /* Send SEGMENT to the pad we are going to switch to */ - seg = &osel->segment; - /* If resending then mark segment start and position accordingly */ - if (osel->resend_latest && osel->latest_buffer && - GST_BUFFER_TIMESTAMP_IS_VALID (osel->latest_buffer)) { - start = position = GST_BUFFER_TIMESTAMP (osel->latest_buffer); - } else { - start = position = seg->position; - } + if (res) { + if (osel->segment.format != GST_FORMAT_UNDEFINED) { + /* Send SEGMENT to the pad we are going to switch to */ + seg = &osel->segment; + /* If resending then mark segment start and position accordingly */ + if (osel->resend_latest && osel->latest_buffer && + GST_BUFFER_TIMESTAMP_IS_VALID (osel->latest_buffer)) { + start = position = GST_BUFFER_TIMESTAMP (osel->latest_buffer); + } else { + start = position = seg->position; + } - seg->start = start; - seg->position = position; - ev = gst_event_new_segment (seg); + seg->start = start; + seg->position = position; + ev = gst_event_new_segment (seg); - if (!gst_pad_push_event (osel->active_srcpad, ev)) { - GST_WARNING_OBJECT (osel, - "newsegment handling failed in %" GST_PTR_FORMAT, - osel->active_srcpad); + if (!gst_pad_push_event (osel->active_srcpad, ev)) { + GST_WARNING_OBJECT (osel, + "newsegment handling failed in %" GST_PTR_FORMAT, + osel->active_srcpad); + } } /* Resend latest buffer to newly switched pad */ diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index d1788df81c..7103d8ea50 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -264,7 +264,7 @@ coverage-report: coverage/$$dir/index.xml > coverage/$$dir/index.html; \ fi; \ done - + for file in $(COVERAGE_FILES_REL); do \ echo Generating coverage/$$file.html; \ perl $(top_srcdir)/common/coverage/coverage-report-entry.pl \ |