Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
f4ad83ef
Commit
f4ad83ef
authored
Feb 24, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added CD-TEXT support to our cdda module (linux/win32).
parent
9fd326a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
modules/access/cdda.c
modules/access/cdda.c
+42
-0
No files found.
modules/access/cdda.c
View file @
f4ad83ef
...
...
@@ -390,6 +390,7 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
return
VLC_EGENERIC
;;
}
/* */
input_item_SetName
(
p_current
,
"Audio CD"
);
const
char
*
psz_album
=
NULL
;
...
...
@@ -438,6 +439,27 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
}
#endif
/* */
vlc_meta_t
**
pp_cd_text
;
int
i_cd_text
;
if
(
ioctl_GetCdText
(
VLC_OBJECT
(
p_access
),
p_sys
->
vcddev
,
&
pp_cd_text
,
&
i_cd_text
)
)
{
msg_Dbg
(
p_access
,
"CD-TEXT information missing"
);
i_cd_text
=
0
;
pp_cd_text
=
NULL
;
}
/* Retreive CD-TEXT informations but prefer CDDB */
if
(
i_cd_text
>
0
&&
pp_cd_text
[
0
]
)
{
const
vlc_meta_t
*
p_disc
=
pp_cd_text
[
0
];
ON_EMPTY
(
psz_album
,
vlc_meta_Get
(
p_disc
,
vlc_meta_Album
)
);
ON_EMPTY
(
psz_genre
,
vlc_meta_Get
(
p_disc
,
vlc_meta_Genre
)
);
ON_EMPTY
(
psz_artist
,
vlc_meta_Get
(
p_disc
,
vlc_meta_Artist
)
);
ON_EMPTY
(
psz_description
,
vlc_meta_Get
(
p_disc
,
vlc_meta_Description
)
);
}
if
(
NONEMPTY
(
psz_album
)
)
{
input_item_SetName
(
p_current
,
psz_album
);
...
...
@@ -513,6 +535,17 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
}
#endif
/* Retreive CD-TEXT informations but prefer CDDB */
if
(
i
+
1
<
i_cd_text
&&
pp_cd_text
[
i
+
1
]
)
{
const
vlc_meta_t
*
t
=
pp_cd_text
[
i
+
1
];
ON_EMPTY
(
psz_track_title
,
vlc_meta_Get
(
t
,
vlc_meta_Title
)
);
ON_EMPTY
(
psz_track_artist
,
vlc_meta_Get
(
t
,
vlc_meta_Artist
)
);
ON_EMPTY
(
psz_track_genre
,
vlc_meta_Get
(
t
,
vlc_meta_Genre
)
);
ON_EMPTY
(
psz_track_description
,
vlc_meta_Get
(
t
,
vlc_meta_Description
)
);
}
/* */
ON_EMPTY
(
psz_track_artist
,
psz_artist
);
ON_EMPTY
(
psz_track_genre
,
psz_genre
);
...
...
@@ -552,6 +585,15 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
#undef ON_EMPTY
#undef NONEMPTY
/* */
for
(
int
i
=
0
;
i
<
i_cd_text
;
i
++
)
{
vlc_meta_t
*
p_meta
=
pp_cd_text
[
i
];
if
(
!
p_meta
)
continue
;
vlc_meta_Delete
(
p_meta
);
}
free
(
pp_cd_text
);
#ifdef HAVE_LIBCDDB
if
(
p_disc
)
...
...
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