After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732237 - dashdemux: expose language tags
dashdemux: expose language tags
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-25 16:09 UTC by Matthieu Bouron
Modified: 2014-08-19 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
WIP dashdemux: push language code tag (1.34 KB, patch)
2014-06-25 17:31 UTC, Matthieu Bouron
none Details | Review
dashdemux: push language code tag (2.78 KB, patch)
2014-06-26 14:03 UTC, Matthieu Bouron
committed Details | Review

Description Matthieu Bouron 2014-06-25 16:09:09 UTC
Currently dashdemux parse various language properties contained in the AdaptationSet and ContentComponent nodes but does not send any language tags to downstream.

There are a few cases we need to deal with.

1) The lang property is set on the AdaptationSet node. Information can be forwarded downstream using a single tag (GST_TAG_LANGUAGE_CODE)

2) The lang property is not set on the AdaptationSet node but ContentComponents are present and have the lang property. In this case, we will need to find a way to forward downstream multiple lang tags corresponding to the streams contained in the fragments of this AdaptationSet.
Is it reasonable to use the GST_TAG_LANGUAGE_CODE tag with multiple value here ? Each index value corresponding to the real stream index ?
Or something like "stream-%d-language-code" makes more sense ?
Also we can only trust the order of appearance of the ContentComponent nodes to associate it a stream index.

On the qtdemux/[...] side, the tag event should be handled and the upstream tags stored globally.
For each output stream it should look at the proper language tag / value index, get the value, and push the tag to the stream tags.
The rest of the upstream tags will be pushed with the other global tags.

What do you think ?
Comment 1 Thiago Sousa Santos 2014-06-25 16:29:08 UTC
Do you have an example of such manifests so I can take a look?
Comment 2 Matthieu Bouron 2014-06-25 16:53:17 UTC
Here is a manifest where each adaptation set contains only one media component (stream) and the language property is set.
The language is also stored in the mp4 fragments.

http://samples.0x5c.me/DASH/sample-sintel-multiaudio-dash/
Comment 3 Matthieu Bouron 2014-06-25 17:31:46 UTC
Created attachment 279238 [details] [review]
WIP dashdemux: push language code tag

Language code tag is retrieved from the AdaptationSet language property.

TODO: language should also be retrieved from the ContentComponent if present.
Comment 4 Thiago Sousa Santos 2014-06-25 17:44:04 UTC
(In reply to comment #2)
> Here is a manifest where each adaptation set contains only one media component
> (stream) and the language property is set.
> The language is also stored in the mp4 fragments.
> 
> http://samples.0x5c.me/DASH/sample-sintel-multiaudio-dash/

Currently dashdemux exposes all those streams and using playbin you can select the audio stream that you want to play. The non active streams are deactivated at dashdemux and don't get any buffer downloaded to save network. If you activate it again the stream download is restarted.

Do you have a sample with the ContentComponents nodes?
Comment 5 Thiago Sousa Santos 2014-06-25 17:45:01 UTC
(In reply to comment #3)
> Created an attachment (id=279238) [details] [review]
> WIP dashdemux: push language code tag
> 
> Language code tag is retrieved from the AdaptationSet language property.
> 
> TODO: language should also be retrieved from the ContentComponent if present.

Patch looks good, will do a full review once you handle contentcomponent on this on a subsequent patch.
Comment 6 Matthieu Bouron 2014-06-26 14:03:38 UTC
Created attachment 279315 [details] [review]
dashdemux: push language code tag

Patch updated. Added a call to gst_tag_check_language_code.
Comment 7 Thiago Sousa Santos 2014-07-22 10:58:02 UTC
ContentComponent entry can be found in one of the dash mpds here: http://rdmedia.bbc.co.uk/dash/ondemand/bbb/
Comment 8 Thiago Sousa Santos 2014-08-19 19:11:45 UTC
commit 4afa05e567272ef8084e8f82b89fb1e545e62ef1
Author: Thiago Santos <thiagoss@osg.samsung.com>
Date:   Tue Aug 19 16:01:58 2014 -0300

    dashdemux: read language from ContentComponent node as a fallback
    
    If the language is not specified in the AdaptationSet, use the ContentComponent
    node to get it. We only get it if there is only a single ContentComponent as
    it doesn't seem clear on what to do if there are multiple entries
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732237

commit 82fdb3aefcd2d2b642b97ced2d0475b39114a5ba
Author: Matthieu Bouron <matthieu.bouron@collabora.com>
Date:   Wed Jun 25 15:55:32 2014 +0200

    dashdemux: push language code tag
    
    Language code tag is retrieved from the AdaptationSet language
    property.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=732237