Add 16 bit PCM audio track detected including MS ACM for >2 channels #1410
Add 16 bit PCM audio track detected including MS ACM for >2 channels #1410ojw28 merged 5 commits intogoogle:devfrom drhill:ms_acm_pcm
Conversation
|
Please can you provide sample media for both codec types? Ideally also for both 16-bit and non-16-bit. You can email some samples to dev.exoplayer@gmail.com if you're unable to provide them publicly. Thanks! |
|
|
||
| mimeType = MimeTypes.AUDIO_RAW; | ||
| if (audioBitDepth != 16) | ||
| throw new ParserException("ExoPlayer is only capable of handling 16-bit audio."); |
There was a problem hiding this comment.
As a side note, we're working on adding support for re-sampling of 8/24-bit audio to. This will likely happen all the way down in AudioTrack. Or in other words, don't bother working on this, since it's near the top of our list already ;).
|
Cleaned up. I proved samples via email link for 16bit PCM and 24 bit PCM (mono and multichannel). A_MS_ACM is tricky because the clips I sent were originally that (except the mono 24 bit), but ffmpeg changed the MKV header info when I cut the clip down. I'll look for another way to get a clean clip that has A_MS_ACM that isn't full length as the shortest I have would be 40+ minutes of HD video & lossless audio. Is there any other changes you would like me to make? |
| } | ||
| } | ||
|
|
||
| public static final int WAVEFORMAT_SIZE = 18; |
There was a problem hiding this comment.
All this stuff should be private rather than public (including the method). The constants should be defined at the top of the file (method at the bottom as it is now).
|
Also looks good otherwise, thanks! |
|
[NB - Matching style of code comment applies to this one too] |
|
Changes up! |
|
Thanks for the changes! FYI I made some tweaks in 841c10f. Let me know if I broke anything; I confess to not having tested the result...! |
|
Np. I'll give it a test when I get home this afternoon. |
|
Works fine, thanks! |
Seems that 1 or 2 channel tracks come in directly as PCM_INT_LIT while >2 channel tracks are wrapped in MS ACM to preserve channel mapping.