libvlc : AudioCD not working with libvlc_media_new_location

This forum is about all development around libVLC.
deepars84
New Cone
New Cone
Posts: 7
Joined: 27 Jul 2015 09:06

libvlc : AudioCD not working with libvlc_media_new_location

Postby deepars84 » 27 Jul 2015 15:31

Hello ,

I am trying to play AudioCD with libvlc_media_new_location(); Debug log shows successful decoding of Audio tracks,
But it doesn't play any track.

I have used sample/example code.
It seems i am missing something? Do i need to manage playlist? or libvlc_media_new_location should take care playing track automatically like in DVD/Bluray media Disc?

Kindly help !!.

Thanks in advance

Log:
core audio output debug: using audio output module "directsound"
core generic debug: keeping audio output
core input debug: Creating an input for 'cdda:///D:/'
core input debug: using timeshift granularity of 50 MiB, in path 'C:\Users\vlc_pc\AppData\Local\Temp'
core input debug: `cdda:///D:/' gives access `cdda' demux `' path `/D:/'
core input debug: specified demux `any'
core input debug: creating demux: access='cdda' demux='any' location='/D:/' file='D:\'
core demux debug: looking for access_demux module matching "cdda": 13 candidates
core demux debug: no access_demux modules matched
core input debug: creating access 'cdda' location='/D:/', path='D:\'
core access debug: looking for access module matching "cdda": 23 candidates
cdda access debug: using winNT/2K/XP ioctl layer
cdda access debug: p_sectors: 0, 0
cdda access debug: p_sectors: 1, 12004
cdda access debug: p_sectors: 2, 25222
cdda access debug: p_sectors: 3, 37452
cdda access debug: p_sectors: 4, 50087
cdda access debug: p_sectors: 5, 62441
cdda access debug: p_sectors: 6, 74785
cdda access debug: p_sectors: 7, 87648
cdda access debug: p_sectors: 8, 102097
cdda access debug: p_sectors: 9, 114119
cdda access debug: p_sectors: 10, 126446
cdda access debug: p_sectors: 11, 138283
cdda access debug: p_sectors: 12, 152877
cdda access debug: p_sectors: 13, 166038
cdda access debug: p_sectors: 14, 178302
cdda access debug: p_sectors: 15, 191099
cdda access debug: p_sectors: 16, 203989
cdda access debug: p_sectors: 17, 215473
cdda access debug: p_sectors: 18, 228704
cdda access debug: p_sectors: 19, 241967
cdda access debug: p_sectors: 20, 254471
cdda access debug: p_sectors: 21, 266668
cdda access debug: p_sectors: 22, 279374
cdda access debug: p_sectors: 23, 293180
cdda access debug: p_sectors: 24, 305157
cdda access debug: fetching infos with CDDB
cdda access debug: Album art policy set to manual; no automatic fetching
cdda access debug: GetCDDBInfo failed
cdda access debug: CD-TEXT information missing
cdda access debug: track[0] start=0
cdda access debug: track[1] start=12004
cdda access debug: track[2] start=25222
cdda access debug: track[3] start=37452
cdda access debug: track[4] start=50087
cdda access debug: track[5] start=62441
cdda access debug: track[6] start=74785
cdda access debug: track[7] start=87648
cdda access debug: track[8] start=102097
cdda access debug: track[9] start=114119
cdda access debug: track[10] start=126446
cdda access debug: track[11] start=138283
cdda access debug: track[12] start=152877
cdda access debug: track[13] start=166038
cdda access debug: track[14] start=178302
cdda access debug: track[15] start=191099
cdda access debug: track[16] start=203989
cdda access debug: track[17] start=215473
cdda access debug: track[18] start=228704
cdda access debug: track[19] start=241967
cdda access debug: track[20] start=254471
cdda access debug: track[21] start=266668
cdda access debug: track[22] start=279374
cdda access debug: track[23] start=293180
core access debug: using access module "cdda"
core stream debug: Using block method for AStream*
core stream debug: starting pre-buffering
core stream error: cannot pre fill buffer
core access debug: removing module "cdda"
core input warning: cannot create a stream_t from access
core input debug: Destroying the input for 'Audio CD'
core audio output debug: removing module "directsound"

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby Rémi Denis-Courmont » 27 Jul 2015 16:17

This looks like an I/O error. Does the disc play properly on the computer at all? Starting from the first track?
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

deepars84
New Cone
New Cone
Posts: 7
Joined: 27 Jul 2015 09:06

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby deepars84 » 28 Jul 2015 10:30

Thanks for quick reply,

When i use standard VLC player everything is fine, it plays from 1'st track too.
am i missing something? like should i manage playlist? libvlc_media_new_location should be OK ??

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby Jean-Baptiste Kempf » 30 Jul 2015 00:06

Yes, your way seems correct, since it actually opens correct the CD.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby Rémi Denis-Courmont » 30 Jul 2015 11:14

You need a list player to open the "whole" Audio CD.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

deepars84
New Cone
New Cone
Posts: 7
Joined: 27 Jul 2015 09:06

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby deepars84 » 07 Sep 2015 08:21

Thanks for suggestion.
I got it working with libvlc_media_add_option(vlcMedia,":cdda-track=1"); it plays first track :-) .
As suggested by Rémi i couldn't get playlist working, following code doesn't yeild desired result.

QString mrl = "cdda:///D:/";
libvlc_media_t *vlcMedia = libvlc_media_new_location(vlcInstance, qtu(mrl));

vlcMediaList = libvlc_media_list_new(vlcInstance);
libvlc_media_list_add_media(vlcMediaList,vlcMedia);
vlcMediaListPlayer = libvlc_media_list_player_new (vlcInstance);
libvlc_media_list_player_set_media_list(vlcMediaListPlayer,vlcMediaList);
libvlc_media_list_player_next(vlcMediaListPlayer);

libvlc_media_list_player_play (vlcMediaListPlayer);

I think i need some more API calls to populate playlist from "Audio CD" ? let me know if you have some suggestion.

deepars84
New Cone
New Cone
Posts: 7
Joined: 27 Jul 2015 09:06

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby deepars84 » 13 Sep 2015 12:28

Got it Working !! Thanks, @ Kevin Hoang, @sherington
Refer: https://forum.videolan.org/viewtopic.ph ... ms#p293579

Code: Select all

//section -1 libvlc_media_t *vlcMedia = libvlc_media_new_location(vlcInstance, qtu(fileOpen)); /* Create a new libvlc player */ libvlc_media_parse(vlcMedia); vlcPlayer = libvlc_media_player_new_from_media (vlcMedia); /* Release the media */ libvlc_media_release(vlcMedia); libvlc_media_player_play (vlcPlayer);
call following on error from play, or call sleep (10) which is very bad idea, but it works!

Code: Select all

//section -2 pMediaList = libvlc_media_subitems(vlcMedia); libvlc_media_list_player_t *pListplayer = libvlc_media_list_player_new(vlcInstance); libvlc_media_list_player_set_media_list(pListplayer,pMediaList); libvlc_media_list_player_play(pListplayer);

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc : AudioCD not working with libvlc_media_new_location

Postby Jean-Baptiste Kempf » 08 Oct 2015 16:17

Oh boy. We should fixed VLC/Audio CD.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests