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
45668a24
Commit
45668a24
authored
Jun 16, 2015
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc: clean recent title and chapter API additions
Thanks to Rémi for the suggestions
parent
0ed21d15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
18 deletions
+13
-18
include/vlc/libvlc_media_player.h
include/vlc/libvlc_media_player.h
+8
-12
lib/media_player.c
lib/media_player.c
+2
-3
src/input/control.c
src/input/control.c
+3
-3
No files found.
include/vlc/libvlc_media_player.h
View file @
45668a24
...
...
@@ -55,27 +55,23 @@ typedef struct libvlc_track_description_t
}
libvlc_track_description_t
;
/**
* Description for titles. It contains name (description string),
* duration in milliseconds if known,
* and information if it was recognized as a menu by the demuxer.
* Description for titles
*/
typedef
struct
libvlc_title_description_t
{
int64_t
i_duration
;
char
*
psz_name
;
bool
b_menu
;
int64_t
i_duration
;
/**< duration in milliseconds */
char
*
psz_name
;
/**< title name */
bool
b_menu
;
/**< info if item was recognized as a menu by the demuxer */
}
libvlc_title_description_t
;
/**
* Description for chapters.
* It contains information about time offset, duration
* (both in milliseconds) as well as name (description string).
* Description for chapters
*/
typedef
struct
libvlc_chapter_description_t
{
int64_t
i_time_offset
;
int64_t
i_duration
;
char
*
psz_name
;
int64_t
i_time_offset
;
/**< time-offset of the chapter in milliseconds */
int64_t
i_duration
;
/**< duration of the chapter in milliseconds */
char
*
psz_name
;
/**< chapter name */
}
libvlc_chapter_description_t
;
/**
...
...
lib/media_player.c
View file @
45668a24
...
...
@@ -1368,7 +1368,7 @@ int libvlc_media_player_get_full_title_descriptions( libvlc_media_player_t *p_mi
/* fill array */
for
(
int
i
=
0
;
i
<
ci_title_count
;
i
++
)
{
libvlc_title_description_t
*
p_title
=
calloc
(
1
,
sizeof
(
*
p_title
)
);
libvlc_title_description_t
*
p_title
=
malloc
(
sizeof
(
*
p_title
)
);
if
(
unlikely
(
p_title
==
NULL
)
)
{
libvlc_title_descriptions_release
(
*
pp_titles
,
ci_title_count
);
...
...
@@ -1446,11 +1446,10 @@ int libvlc_media_player_get_full_chapter_descriptions( libvlc_media_player_t *p_
/* fill array */
for
(
int
i
=
0
;
i
<
ci_chapter_count
;
i
++
)
{
libvlc_chapter_description_t
*
p_chapter
=
calloc
(
1
,
sizeof
(
*
p_chapter
)
);
libvlc_chapter_description_t
*
p_chapter
=
malloc
(
sizeof
(
*
p_chapter
)
);
if
(
unlikely
(
p_chapter
==
NULL
)
)
{
libvlc_chapter_descriptions_release
(
*
pp_chapters
,
ci_chapter_count
);
free
(
p_chapter
);
return
-
1
;
}
(
*
pp_chapters
)[
i
]
=
p_chapter
;
...
...
src/input/control.c
View file @
45668a24
...
...
@@ -393,8 +393,8 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
case
INPUT_GET_SEEKPOINTS
:
{
seekpoint_t
***
array
=
(
seekpoint_t
***
)
va_arg
(
args
,
seekpoint_t
***
);
int
*
pi_title_to_fetch
=
(
int
*
)
va_arg
(
args
,
int
*
);
seekpoint_t
***
array
=
va_arg
(
args
,
seekpoint_t
***
);
int
*
pi_title_to_fetch
=
va_arg
(
args
,
int
*
);
vlc_mutex_lock
(
&
p_input
->
p
->
p_item
->
lock
);
...
...
@@ -420,7 +420,7 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
}
*
array
=
calloc
(
p_title
->
i_seekpoint
,
sizeof
(
**
array
)
);
if
(
!
array
)
if
(
unlikely
(
array
==
NULL
)
)
{
vlc_mutex_unlock
(
&
p_input
->
p
->
p_item
->
lock
);
return
VLC_ENOMEM
;
...
...
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