mirror of
https://github.com/devgianlu/librespot-android.git
synced 2026-04-25 21:35:49 +03:00
[GH-ISSUE #5] Implement Android native decoders #3
Labels
No labels
bug
enhancement
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot-android#3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @devgianlu on GitHub (Apr 25, 2021).
Original GitHub issue: https://github.com/devgianlu/librespot-android/issues/5
@devgianlu commented on GitHub (Apr 29, 2021):
This might actually be need as the Tremolo decoder crashed a couple of times (might be something in my implementation...)
@devgianlu commented on GitHub (May 2, 2021):
I have tried using the
MediaCodecclass to make a decoder, but did not make much progress. Also, it doesn't seem able to recognize the input format details (sample rate, channels, ...) which is a bit unfortunate.@funtax commented on GitHub (May 2, 2021):
It's a long time ago when I tried to decode the Vorbis-files on Android using MediaCodec and MediaExtractor.
These require API 16+ and maybe this or the general hassle + CPU-requirements caused that I implemented the custom decoder via Tremolo (and first via Tremor).
I also remember this post: https://stackoverflow.com/questions/18221064/best-way-to-stream-ogg-vorbis-on-android
I remember you need the MediaExtractor and the MediaCodec together, but pretty sure you already know this :)
Maybe I can find something useful in my personal commit history..
@mitschwimmer commented on GitHub (May 2, 2021):
Yeah, that's unfortunate. Let me add to the things you probably already know, what I found on the solution Martin mentioned already. Let MediaExtractor analyse incoming data and use it to configure MediaCodec. That introduces a small challenge as one needs to implement a custom MediaDataSource that can act on InputStream as MediaExtractor expects files/URL's (MediaDataSource Example).
I have no experience whether this actually works, but it seems plausible.
@devgianlu commented on GitHub (May 2, 2021):
I hadn't figure out the MediaExtractor existed. Will give it another shot tomorrow, thank you for the insights!
@funtax commented on GitHub (May 2, 2021):
Yes, thanks @mitschwimmer, that triggered my brain. The extractor is based on complete files and I think this might have been the reason for me to give up with this and move on with Tremor.
Crossing fingers i can find some of my old commits 😃
@funtax commented on GitHub (May 2, 2021):
Found this in my commit-history from 21th November 2016 (on 22th the message says "Starting with Tremor to support InputStreams"):