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
d1cbbc19
Commit
d1cbbc19
authored
Jun 05, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* cdda: converted to access2. It seems stable.
* access2: added/fixed title support.
parent
4d342851
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
307 additions
and
239 deletions
+307
-239
modules/access/access2.c
modules/access/access2.c
+45
-29
modules/access/cdda.c
modules/access/cdda.c
+262
-210
No files found.
modules/access/access2.c
View file @
d1cbbc19
...
@@ -56,6 +56,9 @@ vlc_module_begin();
...
@@ -56,6 +56,9 @@ vlc_module_begin();
add_shortcut
(
"rtp"
);
add_shortcut
(
"rtp"
);
add_shortcut
(
"rtp4"
);
add_shortcut
(
"rtp4"
);
add_shortcut
(
"rtp6"
);
add_shortcut
(
"rtp6"
);
add_shortcut
(
"cdda"
);
add_shortcut
(
"cddasimple"
);
vlc_module_end
();
vlc_module_end
();
/*****************************************************************************
/*****************************************************************************
...
@@ -123,6 +126,11 @@ static int Access2Open( vlc_object_t * p_this )
...
@@ -123,6 +126,11 @@ static int Access2Open( vlc_object_t * p_this )
p_input
->
pf_set_area
=
Access2SetArea
;
p_input
->
pf_set_area
=
Access2SetArea
;
p_input
->
pf_access_control
=
Access2Control
;
p_input
->
pf_access_control
=
Access2Control
;
p_input
->
p_access_data
=
(
access_sys_t
*
)
p_sys
;
p_input
->
p_access_data
=
(
access_sys_t
*
)
p_sys
;
p_sys
->
p_access
=
p_access
;
p_sys
->
p_block
=
NULL
;
p_sys
->
b_first_read
=
VLC_TRUE
;
/* mtu */
/* mtu */
access2_Control
(
p_access
,
ACCESS_GET_MTU
,
&
i_int
);
access2_Control
(
p_access
,
ACCESS_GET_MTU
,
&
i_int
);
p_input
->
i_mtu
=
i_int
;
p_input
->
i_mtu
=
i_int
;
...
@@ -151,8 +159,11 @@ static int Access2Open( vlc_object_t * p_this )
...
@@ -151,8 +159,11 @@ static int Access2Open( vlc_object_t * p_this )
int64_t
i_start
=
0
;
int64_t
i_start
=
0
;
int
i
;
int
i
;
/* Initialize ES structures */
input_InitStream
(
p_input
,
0
);
#define area p_input->stream.pp_areas
#define area p_input->stream.pp_areas
for
(
i
=
0
;
i
<
=
p_sys
->
i_title
;
i
++
)
for
(
i
=
0
;
i
<
p_sys
->
i_title
;
i
++
)
{
{
input_title_t
*
t
=
p_sys
->
title
[
i
];
input_title_t
*
t
=
p_sys
->
title
[
i
];
...
@@ -168,7 +179,7 @@ static int Access2Open( vlc_object_t * p_this )
...
@@ -168,7 +179,7 @@ static int Access2Open( vlc_object_t * p_this )
#undef area
#undef area
/* Set the area */
/* Set the area */
Access2SetArea
(
p_input
,
p_input
->
stream
.
pp_areas
[
1
]
);
Access2SetArea
(
p_input
,
p_input
->
stream
.
pp_areas
[
1
+
p_access
->
info
.
i_title
]
);
}
}
/* size */
/* size */
...
@@ -188,11 +199,6 @@ static int Access2Open( vlc_object_t * p_this )
...
@@ -188,11 +199,6 @@ static int Access2Open( vlc_object_t * p_this )
p_input
->
stream
.
p_selected_area
->
i_tell
=
p_access
->
info
.
i_pos
;
p_input
->
stream
.
p_selected_area
->
i_tell
=
p_access
->
info
.
i_pos
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
p_sys
->
p_access
=
p_access
;
p_sys
->
p_block
=
NULL
;
p_sys
->
b_first_read
=
VLC_TRUE
;
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
...
@@ -288,6 +294,23 @@ update:
...
@@ -288,6 +294,23 @@ update:
}
}
p_sys
->
b_first_read
=
VLC_FALSE
;
p_sys
->
b_first_read
=
VLC_FALSE
;
}
}
/* Title change */
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_TITLE
)
{
vlc_value_t
val
;
msg_Dbg
(
p_input
,
"INPUT_UPDATE_TITLE"
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
p_input
->
stream
.
p_selected_area
=
p_input
->
stream
.
pp_areas
[
p_access
->
info
.
i_title
+
1
];
p_input
->
stream
.
b_changed
=
VLC_TRUE
;
vlc_mutex_unlock
(
&
p_input
->
stream
.
stream_lock
);
val
.
i_int
=
p_access
->
info
.
i_title
+
1
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_TITLE
;
}
/* Size change */
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SIZE
)
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SIZE
)
{
{
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
vlc_mutex_lock
(
&
p_input
->
stream
.
stream_lock
);
...
@@ -298,11 +321,6 @@ update:
...
@@ -298,11 +321,6 @@ update:
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_SIZE
;
}
}
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_TITLE
)
{
/* TODO */
msg_Err
(
p_input
,
"INPUT_UPDATE_TITLE to do"
);
}
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SEEKPOINT
)
if
(
p_access
->
info
.
i_update
&
INPUT_UPDATE_SEEKPOINT
)
{
{
/* TODO */
/* TODO */
...
@@ -318,36 +336,34 @@ update:
...
@@ -318,36 +336,34 @@ update:
****************************************************************************/
****************************************************************************/
static
int
Access2SetArea
(
input_thread_t
*
p_input
,
input_area_t
*
p_area
)
static
int
Access2SetArea
(
input_thread_t
*
p_input
,
input_area_t
*
p_area
)
{
{
#if 0
access2_sys_t
*
p_sys
=
(
access2_sys_t
*
)
p_input
->
p_access_data
;
access_
sys_t *p_sys = p_input->p_access_data
;
access_
t
*
p_access
=
p_sys
->
p_access
;
vlc_value_t
val
;
vlc_value_t
val
;
/* we can't use the interface slider until initilization is complete */
/* we can't use the interface slider until initilization is complete */
p_input
->
stream
.
b_seekable
=
0
;
p_input
->
stream
.
b_seekable
=
0
;
if
(
p_area
!=
p_input
->
stream
.
p_selected_area
)
if
(
p_area
!=
p_input
->
stream
.
p_selected_area
)
{
{
/* Change the default area */
/* Call access2 control */
p_input->stream.p_selected_area = p_area;
if
(
access2_Control
(
p_access
,
ACCESS_SET_TITLE
,
(
int
)(
p_area
->
i_id
-
1
)
)
)
return
VLC_EGENERIC
;
/* Change the
current track
*/
/* Change the
default area
*/
p_
sys->i_track = p_area->i_id - 1
;
p_
input
->
stream
.
p_selected_area
=
p_input
->
stream
.
pp_areas
[
p_access
->
info
.
i_title
+
1
]
;
p_
sys->i_sector = p_sys->p_sectors[p_sys->i_track]
;
p_
input
->
stream
.
p_selected_area
->
i_tell
=
p_access
->
info
.
i_pos
;
/* Update the navigation variables without triggering a callback */
/* Update the navigation variables without triggering a callback */
val.i_int = p_a
rea->i_id
;
val
.
i_int
=
p_a
ccess
->
info
.
i_title
+
1
;
;
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
var_Change
(
p_input
,
"title"
,
VLC_VAR_SETVALUE
,
&
val
,
NULL
);
}
p_sys->i_sector = p_sys->p_sectors[p_sys->i_track];
p_input->stream.p_selected_area->i_tell =
/* Clear the flag */
(off_t)p_sys->i_sector * (off_t)CDDA_DATA_SIZE
p_access
->
info
.
i_update
&=
~
INPUT_UPDATE_TITLE
;
- p_input->stream.p_selected_area->i_start;
}
/* warn interface that something has changed */
/* warn interface that something has changed */
p_input->stream.b_seekable = 1;
p_input
->
stream
.
b_seekable
=
VLC_TRUE
;
p_input->stream.b_changed = 1;
p_input
->
stream
.
b_changed
=
VLC_TRUE
;
#endif
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
...
modules/access/cdda.c
View file @
d1cbbc19
This diff is collapsed.
Click to expand it.
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