Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
be751112
Commit
be751112
authored
Dec 16, 2005
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert
parent
c660fbd1
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
65 additions
and
22 deletions
+65
-22
modules/access/cdda.c
modules/access/cdda.c
+63
-22
modules/access/cdda/cddax/Modules.am
modules/access/cdda/cddax/Modules.am
+0
-0
modules/access/cdda/cddax/access.c
modules/access/cdda/cddax/access.c
+0
-0
modules/access/cdda/cddax/access.h
modules/access/cdda/cddax/access.h
+0
-0
modules/access/cdda/cddax/callback.c
modules/access/cdda/cddax/callback.c
+0
-0
modules/access/cdda/cddax/callback.h
modules/access/cdda/cddax/callback.h
+0
-0
modules/access/cdda/cddax/cdda.c
modules/access/cdda/cddax/cdda.c
+0
-0
modules/access/cdda/cddax/cdda.h
modules/access/cdda/cddax/cdda.h
+0
-0
modules/access/cdda/cddax/info.c
modules/access/cdda/cddax/info.c
+0
-0
modules/access/cdda/cddax/info.h
modules/access/cdda/cddax/info.h
+0
-0
modules/access/file.c
modules/access/file.c
+2
-0
No files found.
modules/access/cdda.c
View file @
be751112
...
...
@@ -100,6 +100,10 @@ static int Open( vlc_object_t *p_this )
char
*
psz_name
;
int
i
;
vlc_bool_t
b_separate_requested
;
vlc_bool_t
b_play
;
input_thread_t
*
p_input
;
if
(
!
p_access
->
psz_path
||
!*
p_access
->
psz_path
)
{
/* Only when selected */
...
...
@@ -139,36 +143,28 @@ static int Open( vlc_object_t *p_this )
p_sys
->
vcddev
=
vcddev
;
p_sys
->
b_header
=
VLC_FALSE
;
/* We read the Table Of Content information */
p_sys
->
i_titles
=
ioctl_GetTracksMap
(
VLC_OBJECT
(
p_access
),
p_sys
->
vcddev
,
&
p_sys
->
p_sectors
);
if
(
p_sys
->
i_titles
<
0
)
b_separate_requested
=
var_CreateGetBool
(
p_access
,
"cdda-separate-tracks"
);
/* We only do separate items if the whole disc is requested - Dirty hack we access
* some private data ! */
p_input
=
(
input_thread_t
*
)(
p_access
->
p_parent
);
if
(
b_separate_requested
&&
p_input
->
input
.
i_title_start
==
-
1
)
{
msg_Err
(
p_access
,
"unable to count tracks"
);
goto
error
;
p_sys
->
b_separate_items
=
VLC_TRUE
;
}
else
if
(
p_sys
->
i_titles
<=
0
)
if
(
p_sys
->
b_separate_items
)
{
msg_Err
(
p_access
,
"no audio tracks found"
);
goto
error
;
/* Let's check if we need to play */
}
/* Build title table */
for
(
i
=
0
;
i
<
p_sys
->
i_titles
;
i
++
)
/* We read the Table Of Content information */
i_ret
=
GetTracks
(
p_access
,
p_sys
->
b_separate_items
);
if
(
i_ret
<
0
)
{
input_title_t
*
t
=
p_sys
->
title
[
i
]
=
vlc_input_title_New
();
msg_Dbg
(
p_access
,
"title[%d] start=%d"
,
i
,
p_sys
->
p_sectors
[
i
]
);
msg_Dbg
(
p_access
,
"title[%d] end=%d"
,
i
,
p_sys
->
p_sectors
[
i
+
1
]
);
asprintf
(
&
t
->
psz_name
,
_
(
"Track %i"
),
i
+
1
);
t
->
i_size
=
(
p_sys
->
p_sectors
[
i
+
1
]
-
p_sys
->
p_sectors
[
i
]
)
*
(
int64_t
)
CDDA_DATA_SIZE
;
t
->
i_length
=
I64C
(
1000000
)
*
t
->
i_size
/
44100
/
4
;
goto
error
;
}
p_sys
->
i_sector
=
p_sys
->
p_sectors
[
0
];
p_access
->
info
.
i_size
=
p_sys
->
title
[
0
]
->
i_size
;
/* Build a WAV header for the output data */
...
...
@@ -397,3 +393,48 @@ static int Control( access_t *p_access, int i_query, va_list args )
}
return
VLC_SUCCESS
;
}
static
int
GetTracks
(
access_t
*
p_access
,
vlc_bool_t
b_separate
)
{
p_sys
->
i_titles
=
ioctl_GetTracksMap
(
VLC_OBJECT
(
p_access
),
p_sys
->
vcddev
,
&
p_sys
->
p_sectors
);
if
(
p_sys
->
i_titles
<
0
)
{
msg_Err
(
p_access
,
"unable to count tracks"
);
return
VLC_EGENERIC
;;
}
else
if
(
p_sys
->
i_titles
<=
0
)
{
msg_Err
(
p_access
,
"no audio tracks found"
);
return
VLC_EGENERIC
;
}
/* Build title table */
for
(
i
=
0
;
i
<
p_sys
->
i_titles
;
i
++
)
{
if
(
!
b_separate
)
{
input_title_t
*
t
=
p_sys
->
title
[
i
]
=
vlc_input_title_New
();
msg_Dbg
(
p_access
,
"title[%d] start=%d"
,
i
,
p_sys
->
p_sectors
[
i
]
);
msg_Dbg
(
p_access
,
"title[%d] end=%d"
,
i
,
p_sys
->
p_sectors
[
i
+
1
]
);
asprintf
(
&
t
->
psz_name
,
_
(
"Track %i"
),
i
+
1
);
t
->
i_size
=
(
p_sys
->
p_sectors
[
i
+
1
]
-
p_sys
->
p_sectors
[
i
]
)
*
(
int64_t
)
CDDA_DATA_SIZE
;
t
->
i_length
=
I64C
(
1000000
)
*
t
->
i_size
/
44100
/
4
;
}
else
{
/* Create playlist items */
}
}
p_sys
->
i_sector
=
p_sys
->
p_sectors
[
0
];
return
VLC_SUCCESS
;
}
modules/access/cddax/Modules.am
→
modules/access/cdda
/cdda
x/Modules.am
View file @
be751112
File moved
modules/access/cddax/access.c
→
modules/access/cdda
/cdda
x/access.c
View file @
be751112
File moved
modules/access/cddax/access.h
→
modules/access/cdda
/cdda
x/access.h
View file @
be751112
File moved
modules/access/cddax/callback.c
→
modules/access/cdda
/cdda
x/callback.c
View file @
be751112
File moved
modules/access/cddax/callback.h
→
modules/access/cdda
/cdda
x/callback.h
View file @
be751112
File moved
modules/access/cddax/cdda.c
→
modules/access/cdda
/cdda
x/cdda.c
View file @
be751112
File moved
modules/access/cddax/cdda.h
→
modules/access/cdda
/cdda
x/cdda.h
View file @
be751112
File moved
modules/access/cddax/info.c
→
modules/access/cdda
/cdda
x/info.c
View file @
be751112
File moved
modules/access/cddax/info.h
→
modules/access/cdda
/cdda
x/info.h
View file @
be751112
File moved
modules/access/file.c
View file @
be751112
...
...
@@ -160,6 +160,8 @@ static int Open( vlc_object_t *p_this )
b_stdin
=
psz_name
[
0
]
==
'-'
&&
psz_name
[
1
]
==
'\0'
;
fprintf
(
stderr
,
"---%s
\n
"
,
p_access
->
psz_path
);
if
(
!
b_stdin
)
{
if
(
psz_name
[
0
]
==
'~'
&&
psz_name
[
1
]
==
'/'
)
...
...
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