Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the order of audio tracks in the menu #157

Merged
merged 3 commits into from
May 13, 2020
Merged

Fix the order of audio tracks in the menu #157

merged 3 commits into from
May 13, 2020

Conversation

qnga
Copy link
Contributor

@qnga qnga commented May 12, 2020

Fix #129 by using track infos from Playbin rather than from Discoverer.
By the way, implement VLC-like track names in the menu.

gaupol/agents/video.py Outdated Show resolved Hide resolved
gaupol/agents/video.py Outdated Show resolved Hide resolved
@otsaloma
Copy link
Owner

Nice! I added the review above on some specific issues and also I have a couple questions:

  • Can you post a screenshot of how it looks? I'm not familiar with "VLC-like".
  • Why is the language name gotten from both "get-audio-tags" and GstTag.tag_get_language_name? Is the former often missing?
  • Have you checked what happens, how it looks, if the language is unspecified in the container metadata, e.g. "und" in Matroska?
  • Have you checked this all works with the current Gst version requirement (>= 1.6)?

@qnga
Copy link
Contributor Author

qnga commented May 13, 2020

Thanks for the suggestions.

Can you post a screenshot of how it looks? I'm not familiar with "VLC-like".

gaupol_audio_tracks
Track titles are very useful when there are several audio tracks for the same language. For example, with a different bitrate or number of channels. When no title is available, VLC fallbacks to Track {:d}.

Why is the language name gotten from both "get-audio-tags" and GstTag.tag_get_language_name? Is the former often missing?

get-audio-tags returns a set of tags which include title, language-code and language-name. According to gstreamer documentation, the last one should be used only when no language code is available.
GstTag.tag_get_language_name returns a localized language name from a language code (see the screenshot above).

Have you checked what happens, how it looks, if the language is unspecified in the container metadata, e.g. "und" in Matroska?

Yes, everything's ok. On the screenshot below, the first track has 'mis' language code and the second one 'und'.
gaupol_audio_und

Have you checked this all works with the current Gst version requirement (>= 1.6)?

I tested my fix with Gstreamer 1.16.

@otsaloma
Copy link
Owner

I tested my fix with Gstreamer 1.16.

I looked at the GStreamer documentation, but unlike e.g. GTK, it doesn't seem to list what version symbols are available since. Nor can I find the documentation for 1.6 online. Usually I like to keep track of the version requirements, but never mind, maybe it's fine.

Thanks for the work, I'll merge.

@otsaloma otsaloma merged commit 528c72e into otsaloma:master May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audio languages are inverted
2 participants