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
15e2e50e
Commit
15e2e50e
authored
Aug 26, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vcdx: switch to ACCESS_GET_(TITLE|SEEKPOINT)
parent
3e5a8ba4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
23 deletions
+28
-23
modules/access/vcdx/access.c
modules/access/vcdx/access.c
+26
-23
modules/access/vcdx/vcdplayer.h
modules/access/vcdx/vcdplayer.h
+2
-0
No files found.
modules/access/vcdx/access.c
View file @
15e2e50e
...
...
@@ -242,7 +242,7 @@ VCDSeek( access_t * p_access, uint64_t i_pos )
if
(
!
p_access
||
!
p_access
->
p_sys
)
return
VLC_EGENERIC
;
{
vcdplayer_t
*
p_vcdplayer
=
(
vcdplayer_t
*
)
p_vcd_access
->
p_sys
;
const
input_title_t
*
t
=
p_vcdplayer
->
p_title
[
p_
access
->
info
.
i
_title
];
const
input_title_t
*
t
=
p_vcdplayer
->
p_title
[
p_
vcdplayer
->
i_cur
_title
];
unsigned
int
i_entry
=
VCDINFO_INVALID_ENTRY
;
int
i_seekpoint
;
...
...
@@ -297,13 +297,10 @@ VCDSeek( access_t * p_access, uint64_t i_pos )
}
/* Update current seekpoint */
if
(
i_seekpoint
!=
p_access
->
info
.
i_seekpoint
)
{
dbg_print
(
(
INPUT_DBG_SEEK
),
"seekpoint change %lu"
,
(
long
unsigned
int
)
i_seekpoint
);
p_access
->
info
.
i_update
|=
INPUT_UPDATE_SEEKPOINT
;
p_access
->
info
.
i_seekpoint
=
i_seekpoint
;
}
if
(
p_vcdplayer
->
i_cur_chapter
!=
i_seekpoint
)
dbg_print
(
(
INPUT_DBG_SEEK
),
"seekpoint change %d"
,
i_seekpoint
);
p_vcdplayer
->
i_cur_chapter
=
i_seekpoint
;
}
p_access
->
info
.
b_eof
=
false
;
return
VLC_SUCCESS
;
...
...
@@ -672,7 +669,7 @@ VCDSetOrigin( access_t *p_access, lsn_t i_lsn, track_t i_track,
case
VCDINFO_ITEM_TYPE_ENTRY
:
VCDUpdateVar
(
p_access
,
p_itemid
->
num
,
VLC_VAR_SETVALUE
,
"chapter"
,
_
(
"Entry"
),
"Setting entry/segment"
);
p_
access
->
info
.
i_title
=
i_track
-
1
;
p_
vcdplayer
->
i_cur_title
=
i_track
-
1
;
if
(
p_vcdplayer
->
b_track_length
)
{
p_vcdplayer
->
size
=
p_vcdplayer
->
p_title
[
i_track
-
1
]
->
i_size
;
...
...
@@ -685,7 +682,7 @@ VCDSetOrigin( access_t *p_access, lsn_t i_lsn, track_t i_track,
}
dbg_print
(
(
INPUT_DBG_LSN
|
INPUT_DBG_PBC
),
"size: %"
PRIu64
", pos: %"
PRIu64
,
p_vcdplayer
->
size
,
p_access
->
info
.
i_pos
);
p_
access
->
info
.
i_seekpoint
=
p_itemid
->
num
;
p_
vcdplayer
->
i_cur_chapter
=
p_itemid
->
num
;
break
;
case
VCDINFO_ITEM_TYPE_SEGMENT
:
...
...
@@ -695,18 +692,18 @@ VCDSetOrigin( access_t *p_access, lsn_t i_lsn, track_t i_track,
and they must here. The segment seekpoints are stored after
the entry seekpoints and (zeroed) lid seekpoints.
*/
p_
access
->
info
.
i_title
=
p_vcdplayer
->
i_titles
-
1
;
p_
vcdplayer
->
i_cur_title
=
p_vcdplayer
->
i_titles
-
1
;
p_vcdplayer
->
size
=
0
;
/* No seeking on stills, please. */
p_access
->
info
.
i_pos
=
0
;
p_
access
->
info
.
i_seekpoint
=
p_vcdplayer
->
i_entries
p_
vcdplayer
->
i_cur_chapter
=
p_vcdplayer
->
i_entries
+
p_vcdplayer
->
i_lids
+
p_itemid
->
num
;
break
;
case
VCDINFO_ITEM_TYPE_TRACK
:
p_
access
->
info
.
i_title
=
i_track
-
1
;
p_vcdplayer
->
size
=
p_vcdplayer
->
p_title
[
i_track
-
1
]
->
i_size
;
p_
vcdplayer
->
i_cur_title
=
i_track
-
1
;
p_vcdplayer
->
size
=
p_vcdplayer
->
p_title
[
i_track
-
1
]
->
i_size
;
p_access
->
info
.
i_pos
=
0
;
p_
access
->
info
.
i_seekpoint
=
vcdinfo_track_get_entry
(
p_vcdplayer
->
vcd
,
p_
vcdplayer
->
i_cur_chapter
=
vcdinfo_track_get_entry
(
p_vcdplayer
->
vcd
,
i_track
);
break
;
...
...
@@ -715,8 +712,6 @@ VCDSetOrigin( access_t *p_access, lsn_t i_lsn, track_t i_track,
p_vcdplayer
->
play_item
.
type
);
}
p_access
->
info
.
i_update
=
INPUT_UPDATE_TITLE
|
INPUT_UPDATE_SEEKPOINT
;
VCDUpdateTitle
(
p_access
);
}
...
...
@@ -854,8 +849,6 @@ VCDOpen ( vlc_object_t *p_this )
p_access
->
info
.
i_pos
=
0
;
p_access
->
info
.
b_eof
=
false
;
p_access
->
info
.
i_title
=
0
;
p_access
->
info
.
i_seekpoint
=
0
;
p_vcdplayer
=
malloc
(
sizeof
(
vcdplayer_t
)
);
...
...
@@ -893,6 +886,8 @@ VCDOpen ( vlc_object_t *p_this )
// p_vcdplayer->p_meta = vlc_meta_New();
p_vcdplayer
->
p_segments
=
NULL
;
p_vcdplayer
->
p_entries
=
NULL
;
p_vcdplayer
->
i_cur_title
=
0
;
p_vcdplayer
->
i_cur_chapter
=
0
;
/* set up input */
...
...
@@ -1082,14 +1077,22 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
if
(
p_vcdplayer
->
p_title
[
i
]
)
(
*
ppp_title
)[
i
]
=
vlc_input_title_Duplicate
(
p_vcdplayer
->
p_title
[
i
]);
break
;
}
case
ACCESS_GET_TITLE
:
*
va_arg
(
args
,
unsigned
*
)
=
p_vcdplayer
->
i_cur_title
;
break
;
case
ACCESS_GET_SEEKPOINT
:
*
va_arg
(
args
,
unsigned
*
)
=
p_vcdplayer
->
i_cur_chapter
;
break
;
case
ACCESS_SET_TITLE
:
i
=
(
int
)
va_arg
(
args
,
int
);
dbg_print
(
INPUT_DBG_EVENT
,
"set title %d"
,
i
);
if
(
i
!=
p_
access
->
info
.
i
_title
)
if
(
i
!=
p_
vcdplayer
->
i_cur
_title
)
{
vcdinfo_itemid_t
itemid
;
track_t
i_track
=
i
+
1
;
...
...
@@ -1123,13 +1126,13 @@ static int VCDControl( access_t *p_access, int i_query, va_list args )
case
ACCESS_SET_SEEKPOINT
:
{
input_title_t
*
t
=
p_vcdplayer
->
p_title
[
p_
access
->
info
.
i
_title
];
input_title_t
*
t
=
p_vcdplayer
->
p_title
[
p_
vcdplayer
->
i_cur
_title
];
unsigned
int
i
=
(
unsigned
int
)
va_arg
(
args
,
unsigned
int
);
dbg_print
(
INPUT_DBG_EVENT
,
"set seekpoint %d"
,
i
);
if
(
t
->
i_seekpoint
>
0
)
{
track_t
i_track
=
p_
access
->
info
.
i_title
+
1
;
track_t
i_track
=
p_
vcdplayer
->
i_cur_title
+
1
;
lsn_t
lsn
;
/* FIXME! For now we are assuming titles are only tracks and
...
...
modules/access/vcdx/vcdplayer.h
View file @
15e2e50e
...
...
@@ -147,6 +147,8 @@ typedef struct vcdplayer_input_s
vcdplayer_play_item_info_t
*
entry
;
unsigned
int
i_titles
;
/* # of navigatable titles. */
unsigned
int
i_cur_title
;
unsigned
int
i_cur_chapter
;
/*
# tracks + menu for segments + menu for LIDs
...
...
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