[Android] src: Show embedded art from media as well

Edward Wang edward.c.wang at compdigitec.com
Thu Jun 28 23:43:27 CEST 2012


On 12-06-28 05:12 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On Thu, Jun 28, 2012 at 05:08:55PM -0400, Edward Wang wrote :
>> >  Did not work on either my 4.0 or 2.1 phone before this patch.
> Share your logs, but the fix must be in VLC, not in android-vlc.
>
> Best regards,
The libvlc is of latest git, with all five patches (XilasZ's dir patch 
included) applied and compiled. The vlc-android is also of latest git. 
Clearing the media database makes no difference whatsoever.

In comparison, desktop Qt4 VLC.git retrieves the embedded art perfectly: 
http://i50.tinypic.com/sgmhqa.png
Comparison between the before and after: http://i45.tinypic.com/wcmouu.png

Before my patch:

V/VLC/LibVLC(11793): Reading file:///sdcard/media/noartist.flac
D/VLC     (11793): [0x3f6be0]: main input Creating an input for 
'noartist.flac'
D/VLC     (11793): [0x3f6be0]: main input using timeshift granularity of 
50 MiB, in path '/tmp'
D/VLC     (11793): [0x3f6be0]: main input 
`file:///sdcard/media/noartist.flac' gives access `file' demux `' path 
`/sdcard/media/noartist.flac'
D/VLC     (11793): [0x3f6be0]: main input creating demux: access='file' 
demux='' location='/sdcard/media/noartist.flac' 
file='/sdcard/media/noartist.flac'
D/VLC     (11793): [0x3fa398]: main demux looking for access_demux 
module: 0 candidates
D/VLC     (11793): [0x3fa398]: main demux no access_demux module matched 
"file"
D/VLC     (11793): [0x3f6be0]: main input creating access 'file' 
location='/sdcard/media/noartist.flac', path='/sdcard/media/noartist.flac'
D/VLC     (11793): [0x3fa398]: main access looking for access module: 2 
candidates
D/VLC     (11793): [0x3fa398]: filesystem access opening file 
`/sdcard/media/noartist.flac'
D/VLC     (11793): [0x3fa398]: main access using access module "filesystem"
D/VLC     (11793): [0x3fa7b8]: main stream Using stream method for AStream*
D/VLC     (11793): [0x3fa7b8]: main stream starting pre-buffering
D/VLC     (11793): [0x3fa7b8]: main stream received first data after 5 ms
D/VLC     (11793): [0x3fa7b8]: main stream pre-buffering done 1024 bytes 
in 0s - 152 KiB/s
D/VLC     (11793): [0x3fa5a0]: main stream looking for stream_filter 
module: 7 candidates
D/VLC     (11793): [0x3fa5a0]: main stream no stream_filter module 
matching "any" could be loaded
D/VLC     (11793): [0x3fa5a0]: main stream looking for stream_filter 
module: 0 candidates
D/VLC     (11793): [0x3fa5a0]: main stream no stream_filter module 
matched "stream_filter_record"
D/VLC     (11793): [0x3f6be0]: main input creating demux: access='file' 
demux='' location='/sdcard/media/noartist.flac' 
file='/sdcard/media/noartist.flac'
D/VLC     (11793): [0x3fa5a0]: main demux looking for demux module: 48 
candidates
D/VLC     (11793): [0x3fb550]: main demux packetizer looking for 
packetizer module: 19 candidates
D/VLC     (11793): [0x3fb550]: main demux packetizer using packetizer 
module "packetizer_flac"
D/VLC     (11793): [0x3fa5a0]: main demux using demux module "flacsys"
D/VLC     (11793): [0x3f6be0]: main input looking for a subtitle file in 
/sdcard/media/
D/VLC     (11793): [0x3fb118]: main demux meta looking for meta reader 
module: 1 candidate
D/VLC     (11793): [0x3fb118]: main demux meta no meta reader module 
matching "any" could be loaded
I/ActivityManager( 7010): Starting activity: Intent { flg=0x4000000 
cmp=org.videolan.vlc/.gui.audio.AudioPlayerActivity }
D/VLC     (11793): [0x31b638]: main playlist playlist threads correctly 
activated
D/VLC     (11793): [0x31b638]: main playlist rebuilding array of current 
- root Playlist
D/VLC     (11793): [0x31b638]: main playlist rebuild done - 0 items, 
index -1
D/VLC     (11793): [0x3f6be0]: main input 
`file:///sdcard/media/noartist.flac' successfully opened
D/VLC/JNI/main(11793): vlc_event_callback: failed to get JNI 
environment, assuming native thread
D/VLC     (11793): [0x3f6be0]: main input selecting program id=0
D/VLC     (11793): [0x402fa0]: main decoder looking for decoder module: 
26 candidates
D/VLC     (11793): [0x402fa0]: main decoder using decoder module "flac"
D/VLC     (11793): [0x3f6be0]: main input Buffering 0%
D/VLC     (11793): [0x402fa0]: flac decoder decode STREAMINFO
D/VLC     (11793): [0x402fa0]: flac decoder channels:2 samplerate:44100 
bitspersamples:24
D/VLC     (11793): [0x402fa0]: flac decoder STREAMINFO decoded
D/VLC     (11793): [0x3c2ad0]: main generic creating audio output
D/VLC     (11793): [0x3f6be0]: main input Buffering 30%
D/VLC     (11793): [0x3fbb88]: main audio output looking for audio 
output module: 2 candidates
D/VLC     (11793): [0x3f6be0]: main input Buffering 61%
E/AudioPolicyManager(  952): getDeviceForStrategy() strategy 0, device 2
D/VLC     (11793): [0x3f6be0]: main input Buffering 92%
E/AudioPolicyManager(  952): getDeviceForStrategy() strategy 0, device 2
D/VLC     (11793): [0x3fbb88]: main audio output using audio output 
module "android_audiotrack"
D/VLC     (11793): [0x3f6be0]: main input Stream buffering done (371 ms 
in 148 ms)
D/VLC     (11793): [0x3fbb88]: main audio output output 's16l' 44100 Hz 
Stereo frame=1 samples/4 bytes
D/VLC     (11793): [0x3fbb88]: main audio output mixer 'fi32' 44100 Hz 
Stereo frame=1 samples/8 bytes
D/VLC     (11793): [0x3fbb88]: main audio output filter(s) 
'fi32'->'s16l' 44100 Hz->44100 Hz Stereo->Stereo
D/VLC     (11793): [0x3fd1d8]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11793): [0x3fd1d8]: main audio filter using audio filter 
module "converter_fixed"
D/VLC     (11793): [0x3fbb88]: main audio output conversion pipeline 
completed
D/VLC     (11793): [0x3fe388]: main mixer looking for audio mixer 
module: 2 candidates
D/VLC     (11793): [0x3fe388]: main mixer using audio mixer module 
"fixed32_mixer"
D/VLC     (11793): [0x3fbb88]: main audio output input 's24l' 44100 Hz 
Stereo frame=1 samples/6 bytes
D/VLC     (11793): [0x3fbb88]: main audio output filter(s) 
's24l'->'fi32' 44100 Hz->44100 Hz Stereo->Stereo
D/VLC     (11793): [0x3fd4c8]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11793): [0x3fd4c8]: main audio filter no audio filter module 
matching "any" could be loaded
D/VLC     (11793): [0x3fd4c8]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11793): [0x3fd4c8]: main audio filter using audio filter 
module "converter_fixed"
D/VLC     (11793): [0x4221d8]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11793): [0x4221d8]: audio_format audio filter s24l->s16l, 
bits per sample: 24->16
D/VLC     (11793): [0x4221d8]: main audio filter using audio filter 
module "audio_format"
D/VLC     (11793): [0x3fbb88]: main audio output conversion pipeline 
completed
D/VLC     (11793): [0x3fbb88]: main audio output filter(s) 
'fi32'->'fi32' 48510 Hz->44100 Hz Stereo->Stereo
D/VLC     (11793): [0x4224c8]: main audio filter looking for audio 
resampler module: 1 candidate
D/VLC     (11793): [0x4224c8]: main audio filter using audio resampler 
module "ugly_resampler"
D/VLC     (11793): [0x3fbb88]: main audio output conversion pipeline 
completed
D/VLC     (11793): [0x402fa0]: main decoder End of audio preroll
D/VLC     (11793): [0x3f6be0]: main input Decoder buffering done in 43 ms
W/VLC     (11793): [0x3fbb88]: main audio output PTS is out of range 
(-4263), dropping buffer
W/AudioHardwareMSM72XX(  952): open driver
W/AudioHardwareMSM72XX(  952): get config
W/AudioHardwareMSM72XX(  952): set config
W/AudioHardwareMSM72XX(  952): buffer_size: 4800
W/AudioHardwareMSM72XX(  952): buffer_count: 2
W/AudioHardwareMSM72XX(  952): channel_count: 2
W/AudioHardwareMSM72XX(  952): sample_rate: 44100
W/ActivityManager( 7010): Activity pause timeout for 
HistoryRecord{2e18a218 org.videolan.vlc/.gui.MainActivity}
I/foo     ( 7010): ********************** resuming: 773794464
I/VLC/AudioService(11793): MediaPlayerPlaying
V/VLC/AudioPlayerActivity(11793): width = 320 : height = 240
V/MediaProvider( 7267): enter query, uri: 
content://media/external/audio/albums
I/ActivityManager( 7010): Displayed activity 
org.videolan.vlc/.gui.audio.AudioPlayerActivity: 1619 ms (total 1619 ms)

And obligatory screenshot of Before:

http://i45.tinypic.com/nozszs.png

------------------------------------------------

After my patch:

V/VLC/LibVLC(11868): Reading file:///sdcard/media/noartist.flac
D/VLC     (11868): [0x2b9a00]: main input Creating an input for 
'noartist.flac'
D/VLC     (11868): [0x2b9a00]: main input using timeshift granularity of 
50 MiB, in path '/tmp'
D/VLC     (11868): [0x2b9a00]: main input 
`file:///sdcard/media/noartist.flac' gives access `file' demux `' path 
`/sdcard/media/noartist.flac'
D/VLC     (11868): [0x2b9a00]: main input creating demux: access='file' 
demux='' location='/sdcard/media/noartist.flac' 
file='/sdcard/media/noartist.flac'
D/VLC     (11868): [0x3a6a00]: main demux looking for access_demux 
module: 0 candidates
D/VLC     (11868): [0x3a6a00]: main demux no access_demux module matched 
"file"
D/VLC     (11868): [0x2b9a00]: main input creating access 'file' 
location='/sdcard/media/noartist.flac', path='/sdcard/media/noartist.flac'
D/VLC     (11868): [0x2b58d8]: main access looking for access module: 2 
candidates
D/VLC     (11868): [0x2b58d8]: filesystem access opening file 
`/sdcard/media/noartist.flac'
D/VLC     (11868): [0x2b58d8]: main access using access module "filesystem"
D/VLC     (11868): [0x3a6a00]: main stream Using stream method for AStream*
D/VLC     (11868): [0x3a6a00]: main stream starting pre-buffering
D/VLC     (11868): [0x3a6a00]: main stream received first data after 0 ms
D/VLC     (11868): [0x3a6a00]: main stream pre-buffering done 1024 bytes 
in 0s - 1577 KiB/s
D/VLC     (11868): [0x3a6aa0]: main stream looking for stream_filter 
module: 7 candidates
D/VLC     (11868): [0x3a6aa0]: main stream no stream_filter module 
matching "any" could be loaded
D/VLC     (11868): [0x3c4bb0]: main stream looking for stream_filter 
module: 0 candidates
D/VLC     (11868): [0x3c4bb0]: main stream no stream_filter module 
matched "stream_filter_record"
D/VLC     (11868): [0x2b9a00]: main input creating demux: access='file' 
demux='' location='/sdcard/media/noartist.flac' 
file='/sdcard/media/noartist.flac'
D/VLC     (11868): [0x3a6aa0]: main demux looking for demux module: 48 
candidates
D/VLC     (11868): [0x41f978]: main demux packetizer looking for 
packetizer module: 19 candidates
D/VLC     (11868): [0x41f978]: main demux packetizer using packetizer 
module "packetizer_flac"
D/VLC     (11868): [0x3a6aa0]: main demux using demux module "flacsys"
D/VLC     (11868): [0x2b9a00]: main input looking for a subtitle file in 
/sdcard/media/
I/ActivityManager( 7010): Starting activity: Intent { flg=0x4000000 
cmp=org.videolan.vlc/.gui.audio.AudioPlayerActivity }
D/VLC     (11868): [0x402740]: main demux meta looking for meta reader 
module: 1 candidate
D/VLC     (11868): [0x402740]: main demux meta no meta reader module 
matching "any" could be loaded
D/VLC     (11868): [0x2b9a00]: main input 
`file:///sdcard/media/noartist.flac' successfully opened
D/VLC/JNI/main(11868): vlc_event_callback: failed to get JNI 
environment, assuming native thread
D/VLC     (11868): [0x2b9a00]: main input selecting program id=0
D/VLC     (11868): [0x3c8548]: main decoder looking for decoder module: 
26 candidates
D/VLC     (11868): [0x3c8548]: main decoder using decoder module "flac"
D/VLC     (11868): [0x2b9a00]: main input Buffering 0%
D/VLC     (11868): [0x3c8548]: flac decoder decode STREAMINFO
D/VLC     (11868): [0x3c8548]: flac decoder channels:2 samplerate:44100 
bitspersamples:24
D/VLC     (11868): [0x3c8548]: flac decoder STREAMINFO decoded
I/foo     ( 7010): ********************** resuming: 772370832
D/VLC     (11868): [0x420748]: main generic creating audio output
I/VLC/AudioService(11868): MediaPlayerPlaying
V/VLC/AudioPlayerActivity(11868): width = 320 : height = 240
D/VLC     (11868): [0x2b9a00]: main input Buffering 30%
D/VLC     (11868): [0x2b9a00]: main input Buffering 61%
D/VLC     (11868): [0x372018]: main audio output looking for audio 
output module: 2 candidates
E/AudioPolicyManager(  952): getDeviceForStrategy() strategy 0, device 2
D/VLC     (11868): [0x372018]: main audio output using audio output 
module "android_audiotrack"
D/VLC     (11868): [0x372018]: main audio output output 's16l' 44100 Hz 
Stereo frame=1 samples/4 bytes
D/VLC     (11868): [0x372018]: main audio output mixer 'fi32' 44100 Hz 
Stereo frame=1 samples/8 bytes
D/VLC     (11868): [0x372018]: main audio output filter(s) 
'fi32'->'s16l' 44100 Hz->44100 Hz Stereo->Stereo
D/VLC     (11868): [0x35ac88]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11868): [0x35ac88]: main audio filter using audio filter 
module "converter_fixed"
D/VLC     (11868): [0x372018]: main audio output conversion pipeline 
completed
D/VLC     (11868): [0x42b090]: main mixer looking for audio mixer 
module: 2 candidates
D/VLC     (11868): [0x42b090]: main mixer using audio mixer module 
"fixed32_mixer"
D/VLC     (11868): [0x372018]: main audio output input 's24l' 44100 Hz 
Stereo frame=1 samples/6 bytes
D/VLC     (11868): [0x372018]: main audio output filter(s) 
's24l'->'fi32' 44100 Hz->44100 Hz Stereo->Stereo
D/VLC     (11868): [0x3b8688]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11868): [0x3b8688]: main audio filter no audio filter module 
matching "any" could be loaded
D/VLC     (11868): [0x3b8688]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11868): [0x3b8688]: main audio filter using audio filter 
module "converter_fixed"
D/VLC     (11868): [0x4281a0]: main audio filter looking for audio 
filter module: 8 candidates
D/VLC     (11868): [0x4281a0]: audio_format audio filter s24l->s16l, 
bits per sample: 24->16
D/VLC     (11868): [0x4281a0]: main audio filter using audio filter 
module "audio_format"
D/VLC     (11868): [0x372018]: main audio output conversion pipeline 
completed
D/VLC     (11868): [0x372018]: main audio output filter(s) 
'fi32'->'fi32' 48510 Hz->44100 Hz Stereo->Stereo
D/VLC     (11868): [0x3601b8]: main audio filter looking for audio 
resampler module: 1 candidate
D/VLC     (11868): [0x3601b8]: main audio filter using audio resampler 
module "ugly_resampler"
D/VLC     (11868): [0x372018]: main audio output conversion pipeline 
completed
D/VLC     (11868): [0x3c8548]: main decoder End of audio preroll
D/VLC     (11868): [0x2b9a00]: main input Buffering 92%
D/VLC     (11868): [0x2b9a00]: main input Stream buffering done (371 ms 
in 170 ms)
D/VLC     (11868): [0x2b9a00]: main input Decoder buffering done in 0 ms
W/VLC     (11868): [0x372018]: main audio output PTS is out of range 
(-3695), dropping buffer
W/AudioHardwareMSM72XX(  952): open driver
W/AudioHardwareMSM72XX(  952): get config
W/AudioHardwareMSM72XX(  952): set config
W/AudioHardwareMSM72XX(  952): buffer_size: 4800
W/AudioHardwareMSM72XX(  952): buffer_count: 2
W/AudioHardwareMSM72XX(  952): channel_count: 2
W/AudioHardwareMSM72XX(  952): sample_rate: 44100
W/AudioFlinger(  952): write blocked for 83 msecs, 10 delayed writes, 
thread 0xb940
V/MediaProvider( 7267): enter query, uri: 
content://media/external/audio/albums
V/VLC/AudioService(11868): artworkURL (calculated) = 
/sdcard/Android/data/org.videolan.vlc/cache/art/arturl/3535195d580680376f3244d5853a465e/art.png
I/ActivityManager( 7010): Displayed activity 
org.videolan.vlc/.gui.audio.AudioPlayerActivity: 553 ms (total 553 ms)

I don't think anything of significance has changed here, apart from the 
artworkURL line, which _I added_ as a pure debugging tool (it doesn't 
impact LibVLC).

Screenshot after the patch: http://i50.tinypic.com/104go5s.png



More information about the Android mailing list