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

Find images in audio files #1472

Closed
wants to merge 2 commits into from

Conversation

dublok
Copy link
Contributor

@dublok dublok commented Feb 27, 2016

Handle Gst.Sample as image in audio file tags (scanned with Gst1.0).

Fixes #1469

This patch works well on my RPi with raspbian.

On my Ubuntu 14.04 the Gst.Buffer.map() fail with a c error.

** (python:10510): CRITICAL **: Unable to determine array length for 0x7fa0901c0e90

Any Idea? Corrupted Ubuntu?

Handle Gst.Sample as image in audio file tags (scaned with Gst1.0).
Always unmap the mapped memory, even in case of exception.
@jodal jodal added this to the v2.0.1 - Bug fixes milestone Mar 1, 2016
@dublok
Copy link
Contributor Author

dublok commented Mar 2, 2016

The Gst.Buffer.map() code is working on Ubuntu 15.10.
I assume that the patch is OK and Ubuntu 14.04 has an issue.

@@ -53,6 +53,14 @@ def convert_taglist(taglist):
result[tag].append(value.decode('utf-8', 'replace'))
elif isinstance(value, (compat.text_type, bool, numbers.Number)):
result[tag].append(value)
elif isinstance(value, Gst.Sample):
buf = value.get_buffer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://lazka.github.io/pgi-docs/#Gst-1.0/structs/Sample.html#Gst.Sample.get_buffer says get_buffer() can return None, code should probably check for that.

@adamcik
Copy link
Member

adamcik commented Mar 25, 2016

Addressing the one comment myself and merging this into the release-2.0 branch.

@adamcik
Copy link
Member

adamcik commented Mar 25, 2016

And I have a 14.04 machine myself, so will take a quick look at that.

@adamcik
Copy link
Member

adamcik commented Mar 25, 2016

Pushed your cherry-picked changes pluss a few extra changes to the release-2.0 branch.

@adamcik adamcik closed this Mar 25, 2016
@adamcik
Copy link
Member

adamcik commented Mar 25, 2016

793e425 works around the warnings for old GStreamer python bindings.

jodal added a commit that referenced this pull request Mar 26, 2016
tmyersjstar pushed a commit to tmyersjstar/mopidy that referenced this pull request Apr 5, 2016
@dublok dublok deleted the fix/1469-image-tag-extraction branch September 14, 2016 12:39
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.

None yet

3 participants