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
11d6de98
Commit
11d6de98
authored
Sep 04, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: remove byte offset from seekpoints/chapters
The input thread and input manager have no use for this.
parent
4234264c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
25 deletions
+11
-25
include/vlc_input.h
include/vlc_input.h
+0
-3
modules/access/vcdx/access.c
modules/access/vcdx/access.c
+8
-12
src/input/control.c
src/input/control.c
+1
-3
src/input/input.c
src/input/input.c
+2
-7
No files found.
include/vlc_input.h
View file @
11d6de98
...
...
@@ -47,7 +47,6 @@
*****************************************************************************/
struct
seekpoint_t
{
int64_t
i_byte_offset
;
int64_t
i_time_offset
;
char
*
psz_name
;
};
...
...
@@ -57,7 +56,6 @@ static inline seekpoint_t *vlc_seekpoint_New( void )
seekpoint_t
*
point
=
(
seekpoint_t
*
)
malloc
(
sizeof
(
seekpoint_t
)
);
if
(
!
point
)
return
NULL
;
point
->
i_byte_offset
=
point
->
i_time_offset
=
-
1
;
point
->
psz_name
=
NULL
;
return
point
;
...
...
@@ -75,7 +73,6 @@ static inline seekpoint_t *vlc_seekpoint_Duplicate( const seekpoint_t *src )
seekpoint_t
*
point
=
vlc_seekpoint_New
();
if
(
src
->
psz_name
)
point
->
psz_name
=
strdup
(
src
->
psz_name
);
point
->
i_time_offset
=
src
->
i_time_offset
;
point
->
i_byte_offset
=
src
->
i_byte_offset
;
return
point
;
}
...
...
modules/access/vcdx/access.c
View file @
11d6de98
...
...
@@ -231,9 +231,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_vcdplayer
->
i_cur_title
];
unsigned
int
i_entry
=
VCDINFO_INVALID_ENTRY
;
int
i_seekpoint
;
/* Next sector to read */
p_vcdplayer
->
i_lsn
=
(
i_pos
/
(
uint64_t
)
M2F2_SECTOR_SIZE
)
+
...
...
@@ -276,11 +274,15 @@ VCDSeek( access_t * p_access, uint64_t i_pos )
(
long
unsigned
int
)
p_vcdplayer
->
origin_lsn
,
(
long
unsigned
int
)
p_vcdplayer
->
i_lsn
,
i_pos
,
i_entry
);
#if 0
/* Find seekpoint */
const input_title_t *t = p_vcdplayer->p_title[p_vcdplayer->i_cur_title];
int i_seekpoint;
for( i_seekpoint = 0; i_seekpoint < t->i_seekpoint; i_seekpoint++ )
{
if( i_seekpoint + 1 >= t->i_seekpoint ) break;
if( i_pos < t->seekpoint[i_seekpoint + 1]->i_byte_offset ) break;
}
...
...
@@ -289,6 +291,7 @@ VCDSeek( access_t * p_access, uint64_t i_pos )
dbg_print( (INPUT_DBG_SEEK), "seekpoint change %d",
i_seekpoint );
p_vcdplayer->i_cur_chapter = i_seekpoint;
#endif
}
p_access
->
info
.
b_eof
=
false
;
return
VLC_SUCCESS
;
...
...
@@ -340,13 +343,9 @@ VCDEntryPoints( access_t * p_access )
vcdinfo_get_entry_lsn
(
p_vcdplayer
->
vcd
,
i
);
s
->
psz_name
=
strdup
(
psz_entry
);
s
->
i_byte_offset
=
(
p_vcdplayer
->
p_entries
[
i
]
-
vcdinfo_get_track_lsn
(
p_vcdplayer
->
vcd
,
i_track
))
*
M2F2_SECTOR_SIZE
;
dbg_print
(
INPUT_DBG_MRL
,
"%s, lsn %d, byte_offset %"
PRId64
""
,
s
->
psz_name
,
p_vcdplayer
->
p_entries
[
i
],
s
->
i_byte_offset
);
dbg_print
(
INPUT_DBG_MRL
,
"%s, lsn %d"
,
s
->
psz_name
,
p_vcdplayer
->
p_entries
[
i
]);
TAB_APPEND
(
p_vcdplayer
->
p_title
[
i_track
-
1
]
->
i_seekpoint
,
p_vcdplayer
->
p_title
[
i_track
-
1
]
->
seekpoint
,
s
);
...
...
@@ -398,7 +397,6 @@ VCDSegments( access_t * p_access )
snprintf
(
psz_segment
,
sizeof
(
psz_segment
),
"%s %02d"
,
_
(
"Segment"
),
i
);
s
->
i_byte_offset
=
0
;
/* Not sure what this would mean here */
s
->
psz_name
=
strdup
(
psz_segment
);
TAB_APPEND
(
t
->
i_seekpoint
,
t
->
seekpoint
,
s
);
}
...
...
@@ -494,8 +492,6 @@ VCDLIDs( access_t * p_access )
snprintf
(
psz_lid
,
sizeof
(
psz_lid
),
"%s %02d"
,
_
(
"LID"
),
i_lid
);
s
->
i_byte_offset
=
0
;
/* A lid doesn't have an offset
size associated with it */
s
->
psz_name
=
strdup
(
psz_lid
);
TAB_APPEND
(
t
->
i_seekpoint
,
t
->
seekpoint
,
s
);
}
...
...
src/input/control.c
View file @
11d6de98
...
...
@@ -586,7 +586,7 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
}
/* Create the "bookmarks" option value */
const
char
*
psz_format
=
"{name=%s,
bytes=%"
PRId64
",
time=%"
PRId64
"}"
;
const
char
*
psz_format
=
"{name=%s,time=%"
PRId64
"}"
;
int
i_len
=
strlen
(
"bookmarks="
);
for
(
int
i
=
0
;
i
<
p_input
->
p
->
i_bookmark
;
i
++
)
{
...
...
@@ -594,7 +594,6 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
i_len
+=
snprintf
(
NULL
,
0
,
psz_format
,
p_bookmark
->
psz_name
,
p_bookmark
->
i_byte_offset
,
p_bookmark
->
i_time_offset
/
1000000
);
}
...
...
@@ -612,7 +611,6 @@ static void UpdateBookmarksOption( input_thread_t *p_input )
psz_next
+=
sprintf
(
psz_next
,
psz_format
,
p_bookmark
->
psz_name
,
p_bookmark
->
i_byte_offset
,
p_bookmark
->
i_time_offset
/
1000000
);
if
(
i
<
p_input
->
p
->
i_bookmark
-
1
)
...
...
src/input/input.c
View file @
11d6de98
...
...
@@ -453,10 +453,6 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
{
p_seekpoint
->
psz_name
=
strdup
(
psz_start
+
5
);
}
else
if
(
!
strncmp
(
psz_start
,
"bytes="
,
6
)
)
{
p_seekpoint
->
i_byte_offset
=
atoll
(
psz_start
+
6
);
}
else
if
(
!
strncmp
(
psz_start
,
"time="
,
5
)
)
{
p_seekpoint
->
i_time_offset
=
atoll
(
psz_start
+
5
)
*
...
...
@@ -464,8 +460,8 @@ static input_thread_t *Create( vlc_object_t *p_parent, input_item_t *p_item,
}
psz_start
=
psz_end
+
1
;
}
msg_Dbg
(
p_input
,
"adding bookmark: %s,
bytes=%"
PRId64
",
time=%"
PRId64
,
p_seekpoint
->
psz_name
,
p_seekpoint
->
i_byte_offset
,
msg_Dbg
(
p_input
,
"adding bookmark: %s, time=%"
PRId64
,
p_seekpoint
->
psz_name
,
p_seekpoint
->
i_time_offset
);
input_Control
(
p_input
,
INPUT_ADD_BOOKMARK
,
p_seekpoint
);
vlc_seekpoint_Delete
(
p_seekpoint
);
...
...
@@ -662,7 +658,6 @@ static void MainLoopStatistics( input_thread_t *p_input )
/* update current bookmark */
vlc_mutex_lock
(
&
p_input
->
p
->
p_item
->
lock
);
p_input
->
p
->
bookmark
.
i_time_offset
=
i_time
;
p_input
->
p
->
bookmark
.
i_byte_offset
=
-
1
;
vlc_mutex_unlock
(
&
p_input
->
p
->
p_item
->
lock
);
stats_ComputeInputStats
(
p_input
,
p_input
->
p
->
p_item
->
p_stats
);
...
...
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