Page 1 of 1

libvlc_media_get_tracks_info

Posted: 04 Aug 2010 11:07
by ekim.tecul
Hello,

I try to use libvlc_media_get_tracks_info() but without success. I follow sequence
of api call describe within documentation but without more success.
Is someone use it successfully ? is it working ?
I'm working with libvlc 1.1.1 on windows vista sp2 and compile with visual C++ 8.
Below code that I use to test it:

Code: Select all

const char * const vlc_args[] = { "-v" }; static void testMediaTrackInfo1(const libvlc_event_t *pEvent, void *param) { printf("receive event %s\n", libvlc_event_type_name(pEvent->type)); ReleaseSemaphore((HANDLE) param, 1, NULL); } void testMediaTrackInfo() { libvlc_media_track_info_t *pInfo; HANDLE ghSemaphore = CreateSemaphore( NULL, 0, 1, NULL); libvlc_instance_t *pVlc = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args); libvlc_media_t *pMedia = libvlc_media_new_location(pVlc, "http://vipicecast.yacast.net/europe1"); libvlc_media_player_t *pPlayer = libvlc_media_player_new_from_media(pMedia); libvlc_media_add_option(pMedia, "sout=\"#description\""); libvlc_event_manager_t *pEvent = libvlc_media_player_event_manager(pPlayer); libvlc_event_attach(pEvent, libvlc_MediaPlayerPlaying, testMediaTrackInfo1, ghSemaphore); libvlc_media_player_play(pPlayer); WaitForSingleObject(ghSemaphore, INFINITE); printf("Now playing\n"); libvlc_media_player_release(pPlayer); printf("Count = %d\n", libvlc_media_get_tracks_info(pMedia, &pInfo)); }
Thanks for help

Re: libvlc_media_get_tracks_info

Posted: 04 Aug 2010 15:57
by Jean-Baptiste Kempf
Can you use -vvv and paste the logs?

Re: libvlc_media_get_tracks_info

Posted: 04 Aug 2010 17:29
by ekim.tecul
Hello,

Below is end of log
[016c6d4c] main input debug: Creating an input for 'http://vipicecast.yacast.net/europe1'
[016c6d4c] main input debug: thread started
[016c6d4c] main input debug: thread (input) created at priority 1 (../.././src/input/input.c:214)
[016f1614] main stream output debug: using sout chain=`standard{mux="",access="",dst=""#description""}'
[016f1614] main stream output debug: stream=`standard'
[0171486c] main stream out debug: looking for sout stream module: 1 candidate
[0171486c] main stream out warning: missing value for option mux
[0171486c] main stream out warning: missing value for option access
[0171486c] main stream out warning: missing value for option dst
[0171486c] main stream out warning: option description"" is unknown
[0171486c] stream_out_standard stream out debug: creating `/(null)://(null)'
[0171486c] stream_out_standard stream out error: no mux specified or found by extension
[0171486c] main stream out debug: no sout stream module matching "standard" could be loaded
[0171486c] main stream out debug: TIMER module_need() : 43.000 ms - Total 43.000 ms / 1 intvls (Avg 43.000 ms)
[0171486c] main stream out debug: destroying chain... (name=(null))
[0171486c] main stream out debug: destroying chain done
[016f1614] main stream output error: stream chain failed for `standard{mux="",access="",dst=""#description""}'
[016c6d4c] main input error: cannot start stream output instance, aborting
[016c6d4c] main input debug: thread ended
Changing

Code: Select all

libvlc_media_add_option(pMedia, "sout=\"#description\"");
by

Code: Select all

libvlc_media_add_option(pMedia, "--sout=\"#description\"");
give the following log :
1.1.1 The Luggage
[00961e8c] main libvlc debug: VLC media player - 1.1.1 The Luggage
[00961e8c] main libvlc debug: Copyright ┬® 1996-2010 the VideoLAN team
[00961e8c] main libvlc debug: revision 1.1.1-0-gcbc8a0b
[00961e8c] main libvlc debug: configured with .././configure '--host=i586-mingw32msvc' '--build=i386-linux' '--enable-dirac' '--enable-mkv' '--enable-tagli
b' '--enable-release' '--enable-nls' '--disable-projectm' '--without-contrib' '--enable-update-check' '--enable-lua' '--enable-faad' '--enable-flac' '--enab
le-theora' '--enable-twolame' '--enable-quicktime' '--enable-real' '--enable-avcodec' '--enable-merge-ffmpeg' '--enable-dca' '--enable-mpc' '--enable-libass
' '--enable-x264' '--enable-schroedinger' '--enable-realrtsp' '--enable-live555' '--with-live555-tree=/usr/win32/live.com' '--enable-dvdread' '--with-dvdnav
-config-path=/usr/win32/bin' '--enable-shout' '--enable-goom' '--enable-caca' '--enable-portaudio' '--enable-sdl' '--with-sdl-config-path=/usr/win32/bin' '-
-enable-qt4' '--enable-mozilla' '--with-mozilla-sdk-path=/usr/win32/gecko-sdk' '--enable-activex' '--enable-sse' '--enable-mmx' '--enable-libcddb' '--enable
-zvbi' '--disable-telx' '--disable-dvb' '--disable-sqlite' '--enable-peflags' 'build_alias=i386-linux' 'host_alias=i586-mingw32msvc' 'CC=i586-mingw32msvc-gc
c' 'LDFLAGS=-L/usr/win32/lib' 'CPPFLAGS=-I/usr/win32/include -I/usr/win32/include/ebml' 'CXX=i586-mingw32msvc-g++' 'PKG_CONFIG_LIBDIR=/usr/win32/lib/pkgconf
ig'
[00961e8c] main libvlc debug: translation test: code is "C"
[00961e8c] main libvlc debug: checking plugin modules
[00961e8c] main libvlc debug: loading plugins cache file c:\Users\mike\Documents\Visual Studio 2008\Projects\testLibVlc\Debug\plugins\plugins-04041e-3e8.dat

[00961e8c] main libvlc debug: recursively browsing `c:\Users\mike\Documents\Visual Studio 2008\Projects\testLibVlc\Debug\plugins'
[00961e8c] main libvlc debug: saving plugins cache c:\Users\mike\Documents\Visual Studio 2008\Projects\testLibVlc\Debug\plugins\plugins-04041e-3e8.dat
[00961e8c] main libvlc debug: module bank initialized (369 modules)
[00961e8c] main libvlc debug: CPU has capabilities MMX MMXEXT SSE SSE2 SSE3 SSSE3 FPU
[00961e8c] main libvlc debug: looking for memcpy module: 4 candidates
[00961e8c] main libvlc debug: using memcpy module "memcpymmxext"
[008f6cb4] main input debug: Creating an input for 'Media Library'
[008f6cb4] main input debug: Input is a meta file: disabling unneeded options
[008f6cb4] main input debug: using timeshift granularity of 50 MiB
[008f6cb4] main input debug: using timeshift path 'C:\Users\mike\AppData\Local\Temp'
[008f6cb4] main input debug: `file/xspf-open:///C:/Users/mike/AppData/Roaming/vlc/ml.xspf' gives access `file' demux `xspf-open' path `C:\Users\mike\AppData
\Roaming\vlc\ml.xspf'
[008f6cb4] main input debug: creating demux: access='file' demux='xspf-open' path='C:\Users\mike\AppData\Roaming\vlc\ml.xspf'
[008745ac] main demux debug: looking for access_demux module: 2 candidates
[008745ac] main demux debug: no access_demux module matching "file" could be loaded
[008745ac] main demux debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
[008f6cb4] main input debug: creating access 'file' path='C:\Users\mike\AppData\Roaming\vlc\ml.xspf'
[008745ac] main access debug: looking for access module: 2 candidates
[008745ac] filesystem access debug: opening file `C:\Users\mike\AppData\Roaming\vlc\ml.xspf'
[008745ac] main access debug: using access module "filesystem"
[008745ac] main access debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
[0087468c] main stream debug: Using AStream*Stream
[0087468c] main stream debug: pre buffering
[0087468c] main stream debug: received first data after 0 ms
[0087468c] main stream debug: pre-buffering done 304 bytes in 0s - 296875 KiB/s
[0094486c] main stream debug: looking for stream_filter module: 2 candidates
[0094486c] main stream debug: no stream_filter module matching "any" could be loaded
[0094486c] main stream debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
[0094486c] main stream debug: looking for stream_filter module: 1 candidate
[0094486c] main stream debug: using stream_filter module "stream_filter_record"
[0094486c] main stream debug: TIMER module_need() : 1.000 ms - Total 1.000 ms / 1 intvls (Avg 1.000 ms)
[008f6cb4] main input debug: creating demux: access='file' demux='xspf-open' path='C:\Users\mike\AppData\Roaming\vlc\ml.xspf'
[00944924] main demux debug: looking for demux module: 1 candidate
[00944924] playlist demux debug: using XSPF playlist reader
[00944924] main demux debug: using demux module "playlist"
[00944924] main demux debug: TIMER module_need() : 2.000 ms - Total 2.000 ms / 1 intvls (Avg 2.000 ms)
[0091c6d4] main demux meta debug: looking for meta reader module: 2 candidates
[0091c6d4] lua demux meta debug: Trying Lua scripts in C:\Users\mike\AppData\Roaming\vlc\lua\meta\reader
[0091c6d4] lua demux meta debug: Trying Lua scripts in c:\Users\mike\Documents\Visual Studio 2008\Projects\testLibVlc\Debug\lua\meta\reader
[0091c6d4] main demux meta debug: no meta reader module matching "any" could be loaded
[0091c6d4] main demux meta debug: TIMER module_need() : 8.000 ms - Total 8.000 ms / 1 intvls (Avg 8.000 ms)
[008f6cb4] main input debug: `file/xspf-open:///C:/Users/mike/AppData/Roaming/vlc/ml.xspf' successfully opened
[008cf8fc] main xml debug: looking for xml module: 2 candidates
[008cf8fc] main xml debug: using xml module "xml"
[008cf8fc] main xml debug: TIMER module_need() : 11.000 ms - Total 11.000 ms / 1 intvls (Avg 11.000 ms)
[00944924] playlist demux debug: parsed 0 tracks successfully
[008cf8fc] main xml debug: removing module "xml"
[008f6cb4] main input debug: EOF reached
[00944924] main demux debug: removing module "playlist"
[0094486c] main stream debug: removing module "stream_filter_record"
[008745ac] main access debug: removing module "filesystem"
[008f6cb4] main input debug: TIMER input launching for 'Media Library' : 29.000 ms - Total 29.000 ms / 1 intvls (Avg 29.000 ms)
[00921564] main interface debug: looking for interface module: 1 candidate
[00921564] main interface debug: using interface module "hotkeys"
[00921564] main interface debug: TIMER module_need() : 16.000 ms - Total 16.000 ms / 1 intvls (Avg 16.000 ms)
[008f6d4c] main input debug: Creating an input for 'http://vipicecast.yacast.net/europe1'
[008f6d4c] main input debug: thread started
[008f6d4c] main input debug: using timeshift granularity of 50 MiB
[008f6d4c] main input debug: using timeshift path 'C:\Users\mike\AppData\Local\Temp'
[008f6d4c] main input debug: `http://vipicecast.yacast.net/europe1' gives access `http' demux `' path `vipicecast.yacast.net/europe1'
[008f6d4c] main input debug: creating demux: access='http' demux='' path='vipicecast.yacast.net/europe1'
[008f6d4c] main input debug: thread (input) created at priority 1 (../.././src/input/input.c:214)
[00921614] main demux debug: looking for access_demux module: 0 candidates
[00921614] main demux debug: no access_demux module matched "http"
[00921614] main demux debug: TIMER module_need() : 13.000 ms - Total 13.000 ms / 1 intvls (Avg 13.000 ms)
[008f6d4c] main input debug: creating access 'http' path='vipicecast.yacast.net/europe1'
[009421ac] main access debug: looking for access module: 2 candidates
[009421ac] access_http access debug: http: server='vipicecast.yacast.net' port=80 file='/europe1'
[009421ac] main access debug: net: connecting to vipicecast.yacast.net port 80
[009421ac] main access debug: connection succeeded (socket = 452)
[009421ac] access_http access debug: protocol 'HTTP' answer code 200
[009421ac] access_http access debug: Content-Type: audio/mpeg
[009421ac] access_http access debug: Meta-Info: icy-br: 75
[009421ac] access_http access debug: Meta-Info: ice-audio-info: bitrate=75
[009421ac] access_http access debug: Meta-Info: icy-description: Europe1
[009421ac] access_http access debug: Icy-Name: Europe1
[009421ac] access_http access debug: Meta-Info: icy-pub: 0
[009421ac] access_http access debug: Server: Icecast 2.3.2
[009421ac] access_http access debug: Icy-MetaInt: 16000
[009421ac] access_http access warning: ICY metaint=16000
[009421ac] access_http access: Raw-audio server found, mp3 demuxer selected
[009421ac] access_http access debug: auto re-connect enabled
[009421ac] main access debug: using access module "access_http"
[009421ac] main access debug: TIMER module_need() : 366.000 ms - Total 366.000 ms / 1 intvls (Avg 366.000 ms)
[00921614] main stream debug: Using AStream*Stream
[00921614] main stream debug: pre buffering
[00921614] main stream debug: received first data after 74 ms
[00921614] main stream debug: pre-buffering done 1024 bytes in 0s - 12 KiB/s
[0092fecc] main stream debug: looking for stream_filter module: 2 candidates
[0092fecc] main stream debug: no stream_filter module matching "any" could be loaded
[0092fecc] main stream debug: TIMER module_need() : 10.000 ms - Total 10.000 ms / 1 intvls (Avg 10.000 ms)
[0092fecc] main stream debug: looking for stream_filter module: 1 candidate
[0092fecc] main stream debug: using stream_filter module "stream_filter_record"
[0092fecc] main stream debug: TIMER module_need() : 14.000 ms - Total 14.000 ms / 1 intvls (Avg 14.000 ms)
[008f6d4c] main input debug: creating demux: access='http' demux='mp3' path='vipicecast.yacast.net/europe1'
[0087468c] main demux debug: looking for demux module: 1 candidate
[0087468c] es demux debug: detected format mpga
[00931eb4] main demux packetizer debug: looking for packetizer module: 21 candidates
[00931eb4] main demux packetizer debug: using packetizer module "mpeg_audio"
[00931eb4] main demux packetizer debug: TIMER module_need() : 23.000 ms - Total 23.000 ms / 1 intvls (Avg 23.000 ms)
[0087468c] main demux debug: using demux module "es"
[0087468c] main demux debug: TIMER module_need() : 181.000 ms - Total 181.000 ms / 1 intvls (Avg 181.000 ms)
[0091c6d4] main demux meta debug: looking for meta reader module: 2 candidates
[0091c6d4] lua demux meta debug: Trying Lua scripts in C:\Users\mike\AppData\Roaming\vlc\lua\meta\reader
[0091c6d4] lua demux meta debug: Trying Lua scripts in c:\Users\mike\Documents\Visual Studio 2008\Projects\testLibVlc\Debug\lua\meta\reader
[0091c6d4] main demux meta debug: no meta reader module matching "any" could be loaded
[0091c6d4] main demux meta debug: TIMER module_need() : 22.000 ms - Total 22.000 ms / 1 intvls (Avg 22.000 ms)
[008f6d4c] main input debug: `http://vipicecast.yacast.net/europe1' successfully opened
receive event MediaPlayerPlaying
[00931eb4] mpeg_audio demux packetizer debug: MPGA channels:2 samplerate:44100 bitrate:64
[008f6d4c] main input debug: selecting program id=0
Now playing
[0092d6cc] main decoder debug: looking for decoder module: 34 candidates
[009421ac] main access debug: waitpipe: object killed
[0092d6cc] main decoder debug: using decoder module "mpeg_audio"
[0092d6cc] main decoder debug: TIMER module_need() : 31.000 ms - Total 31.000 ms / 1 intvls (Avg 31.000 ms)
[0092d6cc] main decoder debug: thread started
[0092d6cc] main decoder debug: thread (decoder) created at priority 2 (../.././src/input/decoder.c:301)
[008f6d4c] main input debug: Buffering 0%
[008f6d4c] main input debug: Buffering 2%
[0092d6cc] mpeg_audio decoder debug: MPGA channels:2 samplerate:44100 bitrate:64
[008f6d4c] main input debug: creating aout
[00934ed4] main audio output debug: looking for audio output module: 4 candidates
[00934ed4] aout_directx audio output debug: Opening DirectSound Audio Output
[008f6d4c] main input debug: Buffering 4%
[008f6d4c] main input debug: Buffering 6%
[008f6d4c] main input debug: control type=0
[008f6d4c] main input debug: control: stopping input
[00934ed4] aout_directx audio output debug: found device: P├®riph├®rique audio principal
[00934ed4] aout_directx audio output debug: found device: Haut-parleurs (Realtek High Definition Audio)
[00934ed4] aout_directx audio output debug: device supports 2 channels (DEFAULT!)
[00934ed4] aout_directx audio output debug: device supports 1 channel
[00934ed4] aout_directx audio output debug: Windows says your SpeakerConfig is stereo
[00934ed4] aout_directx audio output debug: creating DirectSoundThread
[00933b14] main generic debug: thread started
[00933b14] aout_directx generic debug: DirectSoundThread ready
[00933b14] main generic debug: thread (DirectSound Notification Thread) created at priority 15 (../../.././modules/audio_output/directx.c:321)
[00934ed4] main audio output debug: using audio output module "aout_directx"
[00934ed4] main audio output debug: TIMER module_need() : 100.000 ms - Total 100.000 ms / 1 intvls (Avg 100.000 ms)
[00934ed4] main audio output debug: output 's16l' 44100 Hz Stereo frame=1 samples/4 bytes
[00934ed4] main audio output debug: mixer 'f32l' 44100 Hz Stereo frame=1 samples/8 bytes
[00934ed4] main audio output debug: filter(s) 'f32l'->'s16l' 44100 Hz->44100 Hz Stereo->Stereo
[009573ac] main audio filter debug: looking for audio filter module: 14 candidates
[009573ac] audio_format audio filter debug: f32l->s16l, bits per sample: 32->16
[009573ac] main audio filter debug: using audio filter module "audio_format"
[009573ac] main audio filter debug: TIMER module_need() : 29.000 ms - Total 29.000 ms / 1 intvls (Avg 29.000 ms)
[00934ed4] main audio output debug: found a filter for the whole conversion
[009188a4] main generic debug: looking for audio mixer module: 3 candidates
[009188a4] main generic debug: using audio mixer module "float32_mixer"
[009188a4] main generic debug: TIMER module_need() : 11.000 ms - Total 11.000 ms / 1 intvls (Avg 11.000 ms)
[00934ed4] main audio output debug: input 'mpga' 44100 Hz Stereo frame=1152 samples/1053 bytes
[009586cc] main audio filter debug: looking for audio filter module: 1 candidate
[009586cc] scaletempo audio filter debug: format: 44100 rate, 2 nch, 4 bps, fl32
[009586cc] scaletempo audio filter debug: params: 30 stride, 0.200 overlap, 14 search
[009586cc] scaletempo audio filter debug: 1.000 scale, 1323.000 stride_in, 1323 stride_out, 1059 standing, 264 overlap, 617 search, 2204 queue, fl32 mode
[009586cc] main audio filter debug: using audio filter module "scaletempo"
[009586cc] main audio filter debug: TIMER module_need() : 24.000 ms - Total 24.000 ms / 1 intvls (Avg 24.000 ms)
[00934ed4] main audio output debug: filter(s) 'mpga'->'f32l' 44100 Hz->44100 Hz Stereo->Stereo
[0095624c] main audio filter debug: looking for audio filter module: 14 candidates
[0095624c] mpgatofixed32 audio filter debug: mpga->f32l, bits per sample: 0
[0095624c] main audio filter debug: using audio filter module "mpgatofixed32"
[0095624c] main audio filter debug: TIMER module_need() : 14.000 ms - Total 14.000 ms / 1 intvls (Avg 14.000 ms)
[00934ed4] main audio output debug: found a filter for the whole conversion
[00934ed4] main audio output debug: filter(s) 'f32l'->'f32l' 48510 Hz->44100 Hz Stereo->Stereo
[0095656c] main audio filter debug: looking for audio filter module: 14 candidates
[0095656c] bandlimited_resampler audio filter debug: f32l/48510KHz/2->f32l/44100KHz/2
[0095656c] main audio filter debug: using audio filter module "bandlimited_resampler"
[0095656c] main audio filter debug: TIMER module_need() : 21.000 ms - Total 21.000 ms / 1 intvls (Avg 21.000 ms)
[00934ed4] main audio output debug: found a filter for the whole conversion
[0092d6cc] main decoder debug: thread times: real 0m0.305000s, kernel 0m0.046800s, user 0m0.062400s
[0092d6cc] main decoder debug: removing module "mpeg_audio"
[0092d6cc] main decoder debug: killing decoder fourcc `mpga', 2 PES in FIFO
[0095624c] main audio filter debug: removing module "mpgatofixed32"
[009586cc] main audio filter debug: removing module "scaletempo"
[0095656c] main audio filter debug: removing module "bandlimited_resampler"
[00934ed4] aout_directx audio output debug: closing audio device
[00933b14] aout_directx generic debug: DirectSoundThread exiting
[00933b14] main generic debug: thread ended
[00933b14] main generic debug: thread times: real 0m0.240000s, kernel 0m0.000000s, user 0m0.000000s
[00934ed4] main audio output debug: removing module "aout_directx"
[009573ac] main audio filter debug: removing module "audio_format"
[009188a4] main generic debug: removing module "float32_mixer"
[008f6d4c] main input debug: releasing aout
[00931eb4] main demux packetizer debug: removing module "mpeg_audio"
[0087468c] main demux debug: removing module "es"
[0092fecc] main stream debug: removing module "stream_filter_record"
[009421ac] main access debug: removing module "access_http"
[008f6d4c] main input debug: Program doesn't contain anymore ES
[008f6d4c] main input debug: thread ended
[008f6d4c] main input debug: thread times: real 0m1.227000s, kernel 0m0.031200s, user 0m0.046800s
[008f6d4c] main input debug: TIMER input launching for 'http://vipicecast.yacast.net/europe1' : 768.000 ms - Total 768.000 ms / 1 intvls (Avg 768.000 ms)
Count = 0
thanks for help

Re: libvlc_media_get_tracks_info

Posted: 05 Aug 2010 18:40
by ekim.tecul
Hello,

Code: Select all

libvlc_media_add_option(pMedia, "sout=#description:dummy");
do the trick