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
ca46a8b7
Commit
ca46a8b7
authored
Feb 06, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LibVLC: remove last exception
parent
1dd84033
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
30 deletions
+19
-30
include/vlc/libvlc_media_library.h
include/vlc/libvlc_media_library.h
+4
-7
include/vlc/libvlc_media_list.h
include/vlc/libvlc_media_list.h
+2
-3
src/control/media_library.c
src/control/media_library.c
+5
-10
src/control/media_list.c
src/control/media_list.c
+8
-10
No files found.
include/vlc/libvlc_media_library.h
View file @
ca46a8b7
...
...
@@ -79,22 +79,19 @@ VLC_PUBLIC_API void
* Load media library.
*
* \param p_mlib media library object
* \
param p_e an initialized exception object.
* \
return 0 on success, -1 on error
*/
VLC_PUBLIC_API
void
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
,
libvlc_exception_t
*
p_e
);
VLC_PUBLIC_API
int
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
);
/**
* Get media library subitems.
*
* \param p_mlib media library object
* \param p_e an initialized exception object.
* \return media list subitems
*/
VLC_PUBLIC_API
libvlc_media_list_t
*
libvlc_media_library_media_list
(
libvlc_media_library_t
*
p_mlib
,
libvlc_exception_t
*
p_e
);
libvlc_media_library_media_list
(
libvlc_media_library_t
*
p_mlib
);
/** @} */
...
...
include/vlc/libvlc_media_list.h
View file @
ca46a8b7
...
...
@@ -70,10 +70,9 @@ VLC_PUBLIC_API void
VLC_PUBLIC_API
void
libvlc_media_list_retain
(
libvlc_media_list_t
*
);
VLC_DEPRECATED_API
void
VLC_DEPRECATED_API
int
libvlc_media_list_add_file_content
(
libvlc_media_list_t
*
p_mlist
,
const
char
*
psz_uri
,
libvlc_exception_t
*
p_e
);
const
char
*
psz_uri
);
/**
* Associate media instance with this media list instance.
...
...
src/control/media_library.c
View file @
ca46a8b7
...
...
@@ -107,9 +107,7 @@ void libvlc_media_library_retain( libvlc_media_library_t * p_mlib )
*
* It doesn't yet load the playlists
**************************************************************************/
void
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
,
libvlc_exception_t
*
p_e
)
int
libvlc_media_library_load
(
libvlc_media_library_t
*
p_mlib
)
{
char
*
psz_datadir
=
config_GetUserDir
(
VLC_DATA_DIR
);
char
*
psz_uri
;
...
...
@@ -122,9 +120,8 @@ libvlc_media_library_load( libvlc_media_library_t * p_mlib,
if
(
psz_uri
==
NULL
)
{
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"Not enough memory"
);
return
;
return
-
1
;
}
if
(
p_mlib
->
p_mlist
)
...
...
@@ -132,19 +129,17 @@ libvlc_media_library_load( libvlc_media_library_t * p_mlib,
p_mlib
->
p_mlist
=
libvlc_media_list_new
(
p_mlib
->
p_libvlc_instance
);
libvlc_media_list_add_file_content
(
p_mlib
->
p_mlist
,
psz_uri
,
p_e
);
int
ret
=
libvlc_media_list_add_file_content
(
p_mlib
->
p_mlist
,
psz_uri
);
free
(
psz_uri
);
return
;
return
ret
;
}
/**************************************************************************
* media_list (Public)
**************************************************************************/
libvlc_media_list_t
*
libvlc_media_library_media_list
(
libvlc_media_library_t
*
p_mlib
,
libvlc_exception_t
*
p_e
)
libvlc_media_library_media_list
(
libvlc_media_library_t
*
p_mlib
)
{
(
void
)
p_e
;
if
(
p_mlib
->
p_mlist
)
libvlc_media_list_retain
(
p_mlib
->
p_mlist
);
return
p_mlib
->
p_mlist
;
...
...
src/control/media_list.c
View file @
ca46a8b7
...
...
@@ -242,10 +242,9 @@ void libvlc_media_list_retain( libvlc_media_list_t * p_mlist )
/**************************************************************************
* add_file_content (Public)
**************************************************************************/
void
int
libvlc_media_list_add_file_content
(
libvlc_media_list_t
*
p_mlist
,
const
char
*
psz_uri
,
libvlc_exception_t
*
p_e
)
const
char
*
psz_uri
)
{
input_item_t
*
p_input_item
;
libvlc_media_t
*
p_md
;
...
...
@@ -256,9 +255,8 @@ libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
if
(
!
p_input_item
)
{
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"Not enough memory"
);
return
;
return
-
1
;
}
p_md
=
libvlc_media_new_from_input_item
(
p_mlist
->
p_libvlc_instance
,
...
...
@@ -266,18 +264,18 @@ libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
if
(
!
p_md
)
{
vlc_gc_decref
(
p_input_item
);
return
;
return
-
1
;
}
if
(
libvlc_media_list_add_media
(
p_mlist
,
p_md
)
)
{
libvlc_exception_raise
(
p_e
);
return
;
#warning Missing error handling!
/* printerr and leaks */
return
-
1
;
}
input_Read
(
p_mlist
->
p_libvlc_instance
->
p_libvlc_int
,
p_input_item
);
return
;
return
0
;
}
/**************************************************************************
...
...
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