Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
9d9e1852
Commit
9d9e1852
authored
Feb 03, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more CDDA informations to the playlist node.
parent
67242bac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
12 deletions
+48
-12
modules/access/cdda.c
modules/access/cdda.c
+48
-12
No files found.
modules/access/cdda.c
View file @
9d9e1852
...
@@ -396,11 +396,54 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
...
@@ -396,11 +396,54 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
#ifdef HAVE_LIBCDDB
#ifdef HAVE_LIBCDDB
GetCDDBInfo
(
p_access
,
i_titles
,
p_sys
->
p_sectors
);
GetCDDBInfo
(
p_access
,
i_titles
,
p_sys
->
p_sectors
);
const
char
*
psz_album
=
NULL
;
const
char
*
psz_year
=
NULL
;
const
char
*
psz_genre
=
NULL
;
char
psz_year_buffer
[
4
+
1
];
if
(
p_sys
->
p_disc
)
if
(
p_sys
->
p_disc
)
{
{
const
char
*
psz_name
=
cddb_disc_get_title
(
p_sys
->
p_disc
);
psz_album
=
cddb_disc_get_title
(
p_sys
->
p_disc
);
if
(
psz_name
&&
*
psz_name
)
if
(
psz_album
&&
*
psz_album
)
input_item_SetName
(
p_current
,
psz_name
);
{
input_item_SetName
(
p_current
,
psz_album
);
input_item_SetAlbum
(
p_current
,
psz_album
);
}
const
unsigned
i_year
=
cddb_disc_get_year
(
p_sys
->
p_disc
);
if
(
i_year
>
0
)
{
psz_year
=
psz_year_buffer
;
snprintf
(
psz_year_buffer
,
sizeof
(
psz_year_buffer
),
"%u"
,
i_year
);
input_item_SetDate
(
p_current
,
psz_year
);
}
psz_genre
=
cddb_disc_get_genre
(
p_sys
->
p_disc
);
if
(
psz_genre
&&
*
psz_genre
)
input_item_SetGenre
(
p_current
,
psz_genre
);
/* Set artist only if unique */
const
char
*
psz_artist
=
NULL
;
for
(
int
i
=
0
;
i
<
i_titles
;
i
++
)
{
cddb_track_t
*
t
=
cddb_disc_get_track
(
p_sys
->
p_disc
,
i
);
if
(
!
t
)
continue
;
const
char
*
psz_track_artist
=
cddb_track_get_artist
(
t
);
if
(
psz_artist
&&
psz_track_artist
&&
strcmp
(
psz_artist
,
psz_track_artist
)
)
{
psz_artist
=
NULL
;
break
;
}
psz_artist
=
psz_track_artist
;
}
if
(
psz_artist
&&
*
psz_artist
)
input_item_SetArtist
(
p_current
,
psz_artist
);
const
mtime_t
i_duration
=
(
int64_t
)(
p_sys
->
p_sectors
[
i_titles
]
-
p_sys
->
p_sectors
[
0
]
)
*
CDDA_DATA_SIZE
*
1000000
/
44100
/
2
/
2
;
input_item_SetDuration
(
p_current
,
i_duration
);
}
}
#endif
#endif
...
@@ -458,19 +501,12 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
...
@@ -458,19 +501,12 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
input_item_SetArtist
(
p_input_item
,
psz_artist
);
input_item_SetArtist
(
p_input_item
,
psz_artist
);
}
}
const
char
*
psz_album
=
cddb_disc_get_title
(
p_sys
->
p_disc
);
if
(
psz_album
&&
*
psz_album
)
if
(
psz_album
&&
*
psz_album
)
input_item_SetAlbum
(
p_input_item
,
psz_album
);
input_item_SetAlbum
(
p_input_item
,
psz_album
);
const
unsigned
i_year
=
cddb_disc_get_year
(
p_sys
->
p_disc
);
if
(
psz_year
)
if
(
i_year
>
0
)
input_item_SetDate
(
p_input_item
,
psz_year
);
{
char
psz_date
[
4
+
1
];
snprintf
(
psz_date
,
sizeof
(
psz_date
),
"%u"
,
i_year
);
input_item_SetDate
(
p_input_item
,
psz_date
);
}
const
char
*
psz_genre
=
cddb_disc_get_genre
(
p_sys
->
p_disc
);
if
(
psz_genre
&&
*
psz_genre
)
if
(
psz_genre
&&
*
psz_genre
)
input_item_SetGenre
(
p_input_item
,
psz_genre
);
input_item_SetGenre
(
p_input_item
,
psz_genre
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment