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
2fa0b5fa
Commit
2fa0b5fa
authored
Oct 05, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvlc_media_*: remove a bunch of useless exception parameters
parent
0102564f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
46 additions
and
84 deletions
+46
-84
include/vlc/libvlc_media.h
include/vlc/libvlc_media.h
+12
-30
projects/activex/plugin.cpp
projects/activex/plugin.cpp
+1
-8
projects/macosx/framework/Sources/VLCMedia.m
projects/macosx/framework/Sources/VLCMedia.m
+1
-1
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcplugin.cpp
+1
-8
src/control/flat_media_list_view.c
src/control/flat_media_list_view.c
+1
-1
src/control/hierarchical_media_list_view.c
src/control/hierarchical_media_list_view.c
+1
-1
src/control/hierarchical_node_media_list_view.c
src/control/hierarchical_node_media_list_view.c
+5
-5
src/control/media.c
src/control/media.c
+3
-7
src/control/media_discoverer.c
src/control/media_discoverer.c
+1
-1
src/control/media_internal.h
src/control/media_internal.h
+1
-3
src/control/media_list_path.h
src/control/media_list_path.h
+4
-4
src/control/media_list_view.c
src/control/media_list_view.c
+4
-4
src/control/media_player.c
src/control/media_player.c
+7
-7
src/control/mediacontrol_core.c
src/control/mediacontrol_core.c
+4
-4
No files found.
include/vlc/libvlc_media.h
View file @
2fa0b5fa
...
...
@@ -136,12 +136,11 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_new_as_node(
*
* \param p_instance the instance
* \param ppsz_options the options (as a string)
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_media_add_option
(
libvlc_media_t
*
p_md
,
const
char
*
ppsz_options
,
libvlc_exception_t
*
p_e
);
const
char
*
ppsz_options
);
/**
* Add an option to the media with configurable flags.
*
...
...
@@ -154,13 +153,11 @@ VLC_PUBLIC_API void libvlc_media_add_option(
* \param p_instance the instance
* \param ppsz_options the options (as a string)
* \param i_flags the flags for this option
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_media_add_option_flag
(
libvlc_media_t
*
p_md
,
const
char
*
ppsz_options
,
libvlc_media_option_t
i_flags
,
libvlc_exception_t
*
p_e
);
libvlc_media_option_t
i_flags
);
/**
...
...
@@ -190,11 +187,9 @@ VLC_PUBLIC_API void libvlc_media_release(
* Get the media resource locator (mrl) from a media descriptor object
*
* \param p_md a media descriptor object
* \param p_e an initialized exception object
* \return string with mrl of media descriptor object
*/
VLC_PUBLIC_API
char
*
libvlc_media_get_mrl
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
);
VLC_PUBLIC_API
char
*
libvlc_media_get_mrl
(
libvlc_media_t
*
p_md
);
/**
* Duplicate a media descriptor object.
...
...
@@ -208,13 +203,12 @@ VLC_PUBLIC_API libvlc_media_t * libvlc_media_duplicate( libvlc_media_t * );
*
* \param p_meta_desc the media to read
* \param e_meta the meta to read
* \param p_e an initialized exception pointer
* \return the media's meta
*/
VLC_PUBLIC_API
char
*
libvlc_media_get_meta
(
libvlc_media_t
*
p_meta_desc
,
libvlc_meta_t
e_meta
,
libvlc_exception_t
*
p_e
);
libvlc_meta_t
e_meta
);
/**
* Get current state of media descriptor object. Possible media states
* are defined in libvlc_structures.c ( libvlc_NothingSpecial=0,
...
...
@@ -224,12 +218,10 @@ VLC_PUBLIC_API char * libvlc_media_get_meta(
*
* @see libvlc_state_t
* \param p_meta_desc a media descriptor object
* \param p_e an initialized exception object
* \return state of media descriptor object
*/
VLC_PUBLIC_API
libvlc_state_t
libvlc_media_get_state
(
libvlc_media_t
*
p_meta_desc
,
libvlc_exception_t
*
p_e
);
libvlc_media_t
*
p_meta_desc
);
/**
...
...
@@ -238,7 +230,6 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
* libvlc_media_list_release() to decrement the reference counting.
*
* \param p_md media descriptor object
* \param p_e initalized exception object
* \return list of media descriptor subitems or NULL
*/
...
...
@@ -247,20 +238,17 @@ VLC_PUBLIC_API libvlc_state_t libvlc_media_get_state(
#define VLC_FORWARD_DECLARE_OBJECT(a) struct a
VLC_PUBLIC_API
VLC_FORWARD_DECLARE_OBJECT
(
libvlc_media_list_t
*
)
libvlc_media_subitems
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
);
libvlc_media_subitems
(
libvlc_media_t
*
p_md
);
/**
* Get event manager from media descriptor object.
* NOTE: this function doesn't increment reference counting.
*
* \param p_md a media descriptor object
* \param p_e an initialized exception object
* \return event manager object
*/
VLC_PUBLIC_API
libvlc_event_manager_t
*
libvlc_media_event_manager
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
);
libvlc_media_event_manager
(
libvlc_media_t
*
p_md
);
/**
* Get duration (in ms) of media descriptor object item.
...
...
@@ -277,12 +265,10 @@ VLC_PUBLIC_API libvlc_time_t
* Get preparsed status for media descriptor object.
*
* \param p_md media descriptor object
* \param p_e an initialized exception object
* \return true if media object has been preparsed otherwise it returns false
*/
VLC_PUBLIC_API
int
libvlc_media_is_preparsed
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
);
libvlc_media_is_preparsed
(
libvlc_media_t
*
p_md
);
/**
* Sets media descriptor's user_data. user_data is specialized data
...
...
@@ -291,12 +277,10 @@ VLC_PUBLIC_API int
*
* \param p_md media descriptor object
* \param p_new_user_data pointer to user data
* \param p_e an initialized exception object
*/
VLC_PUBLIC_API
void
libvlc_media_set_user_data
(
libvlc_media_t
*
p_md
,
void
*
p_new_user_data
,
libvlc_exception_t
*
p_e
);
void
*
p_new_user_data
);
/**
* Get media descriptor's user_data. user_data is specialized data
...
...
@@ -304,11 +288,9 @@ VLC_PUBLIC_API void
* an native object that references a libvlc_media_t pointer
*
* \param p_md media descriptor object
* \param p_e an initialized exception object
*/
VLC_PUBLIC_API
void
*
libvlc_media_get_user_data
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
);
libvlc_media_get_user_data
(
libvlc_media_t
*
p_md
);
/** @}*/
...
...
projects/activex/plugin.cpp
View file @
2fa0b5fa
...
...
@@ -1070,14 +1070,7 @@ int VLCPlugin::playlist_add_extended_untrusted(const char *mrl, int optc, const
return
-
1
;
for
(
int
i
=
0
;
i
<
optc
;
++
i
)
{
libvlc_media_add_option_flag
(
p_m
,
optv
[
i
],
libvlc_media_option_unique
,
ex
);
if
(
libvlc_exception_raised
(
ex
)
)
{
libvlc_media_release
(
p_m
);
return
-
1
;
}
}
libvlc_media_add_option_flag
(
p_m
,
optv
[
i
],
libvlc_media_option_unique
);
libvlc_media_list_lock
(
_p_mlist
);
libvlc_media_list_add_media
(
_p_mlist
,
p_m
,
ex
);
...
...
projects/macosx/framework/Sources/VLCMedia.m
View file @
2fa0b5fa
...
...
@@ -358,7 +358,7 @@ static void HandleMediaSubItemAdded(const libvlc_event_t * event, void * self)
p_md
=
libvlc_media_duplicate
(
[
media
libVLCMediaDescriptor
]
);
for
(
NSString
*
key
in
[
options
allKeys
]
)
{
libvlc_media_add_option
(
p_md
,
[[
NSString
stringWithFormat
:
@"%@=#%@"
,
key
,
[
options
objectForKey
:
key
]]
UTF8String
]
,
NULL
);
libvlc_media_add_option
(
p_md
,
[[
NSString
stringWithFormat
:
@"%@=#%@"
,
key
,
[
options
objectForKey
:
key
]]
UTF8String
]);
}
return
[
VLCMedia
mediaWithLibVLCMediaDescriptor
:
p_md
];
}
...
...
projects/mozilla/vlcplugin.cpp
View file @
2fa0b5fa
...
...
@@ -328,14 +328,7 @@ int VlcPlugin::playlist_add_extended_untrusted( const char *mrl, const char *nam
return
-
1
;
for
(
int
i
=
0
;
i
<
optc
;
++
i
)
{
libvlc_media_add_option_flag
(
p_m
,
optv
[
i
],
libvlc_media_option_unique
,
ex
);
if
(
libvlc_exception_raised
(
ex
)
)
{
libvlc_media_release
(
p_m
);
return
-
1
;
}
}
libvlc_media_add_option_flag
(
p_m
,
optv
[
i
],
libvlc_media_option_unique
);
libvlc_media_list_lock
(
libvlc_media_list
);
libvlc_media_list_add_media
(
libvlc_media_list
,
p_m
,
ex
);
...
...
src/control/flat_media_list_view.c
View file @
2fa0b5fa
...
...
@@ -155,7 +155,7 @@ import_mlist_rec( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_t
*
p_submlist
;
p_md
=
libvlc_media_list_item_at_index
(
p_mlist
,
i
,
p_e
);
vlc_array_append
(
&
p_mlv
->
p_this_view_data
->
array
,
p_md
);
p_submlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
if
(
p_submlist
)
{
libvlc_media_list_lock
(
p_submlist
);
...
...
src/control/hierarchical_media_list_view.c
View file @
2fa0b5fa
...
...
@@ -82,7 +82,7 @@ hierarch_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_view_t
*
p_ret
;
p_md
=
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
index
,
p_e
);
if
(
!
p_md
)
return
NULL
;
p_submlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
if
(
!
p_submlist
)
return
NULL
;
p_ret
=
libvlc_media_list_hierarchical_view
(
p_submlist
,
p_e
);
...
...
src/control/hierarchical_node_media_list_view.c
View file @
2fa0b5fa
...
...
@@ -68,7 +68,7 @@ hierarch_node_media_list_view_count( libvlc_media_list_view_t * p_mlv,
{
p_md
=
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
i
,
p_e
);
if
(
!
p_md
)
continue
;
p_submlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
if
(
!
p_submlist
)
continue
;
libvlc_media_release
(
p_md
);
libvlc_media_list_release
(
p_submlist
);
...
...
@@ -96,7 +96,7 @@ hierarch_node_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv,
{
p_md
=
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
i
,
p_e
);
if
(
!
p_md
)
continue
;
p_submlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
if
(
!
p_submlist
)
continue
;
libvlc_media_list_release
(
p_submlist
);
current_index
++
;
...
...
@@ -124,7 +124,7 @@ hierarch_node_media_list_view_children_at_index( libvlc_media_list_view_t * p_ml
libvlc_media_list_view_t
*
p_ret
;
p_md
=
hierarch_node_media_list_view_item_at_index
(
p_mlv
,
index
,
p_e
);
if
(
!
p_md
)
return
NULL
;
p_submlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
if
(
!
p_submlist
)
return
NULL
;
p_ret
=
libvlc_media_list_hierarchical_node_view
(
p_submlist
,
p_e
);
...
...
@@ -146,7 +146,7 @@ index_of_item( libvlc_media_list_view_t * p_mlv, libvlc_media_t * p_md )
{
p_iter_md
=
libvlc_media_list_item_at_index
(
p_mlv
->
p_mlist
,
i
,
NULL
);
if
(
!
p_iter_md
)
continue
;
p_submlist
=
libvlc_media_subitems
(
p_iter_md
,
NULL
);
p_submlist
=
libvlc_media_subitems
(
p_iter_md
);
if
(
!
p_submlist
)
continue
;
libvlc_media_list_release
(
p_submlist
);
libvlc_media_release
(
p_iter_md
);
...
...
@@ -162,7 +162,7 @@ item_is_already_added( libvlc_media_t * p_md )
{
libvlc_media_list_t
*
p_submlist
;
p_submlist
=
libvlc_media_subitems
(
p_md
,
NULL
);
p_submlist
=
libvlc_media_subitems
(
p_md
);
if
(
!
p_submlist
)
return
false
;
int
count
=
libvlc_media_list_count
(
p_submlist
,
NULL
);
libvlc_media_list_release
(
p_submlist
);
...
...
src/control/media.c
View file @
2fa0b5fa
...
...
@@ -25,6 +25,8 @@
# include "config.h"
#endif
#include <assert.h>
#include <vlc/libvlc.h>
#include <vlc/libvlc_media.h>
#include <vlc/libvlc_media_list.h> // For the subitems, here for convenience
...
...
@@ -491,7 +493,6 @@ libvlc_media_set_state( libvlc_media_t *p_md,
libvlc_state_t
state
)
{
libvlc_event_t
event
;
VLC_UNUSED
(
p_e
);
p_md
->
state
=
state
;
...
...
@@ -529,7 +530,7 @@ libvlc_media_event_manager( libvlc_media_t * p_md )
* Get duration of media object (in ms)
**************************************************************************/
int64_t
libvlc_media_get_duration
(
libvlc_media_t
*
p_md
)
libvlc_media_get_duration
(
libvlc_media_t
*
p_md
,
libvlc_exception_t
*
p_e
)
{
assert
(
p_md
);
...
...
@@ -550,14 +551,9 @@ int
libvlc_media_is_preparsed
(
libvlc_media_t
*
p_md
)
{
assert
(
p_md
);
VLC_UNUSED
(
p_e
);
if
(
!
p_md
->
p_input_item
)
{
libvlc_exception_raise
(
p_e
);
libvlc_printerr
(
"No input item"
);
return
false
;
}
return
input_item_IsPreparsed
(
p_md
->
p_input_item
);
}
...
...
src/control/media_discoverer.c
View file @
2fa0b5fa
...
...
@@ -80,7 +80,7 @@ static void services_discovery_item_added( const vlc_event_t * p_event,
{
libvlc_media_t
*
p_catmd
;
p_catmd
=
libvlc_media_new_as_node
(
p_mdis
->
p_libvlc_instance
,
psz_cat
,
NULL
);
p_mlist
=
libvlc_media_subitems
(
p_catmd
,
NULL
);
p_mlist
=
libvlc_media_subitems
(
p_catmd
);
p_mlist
->
b_read_only
=
true
;
/* Insert the newly created mlist in our dictionary */
...
...
src/control/media_internal.h
View file @
2fa0b5fa
...
...
@@ -48,8 +48,6 @@ libvlc_media_t * libvlc_media_new_from_input_item(
libvlc_instance_t
*
,
input_item_t
*
,
libvlc_exception_t
*
);
void
libvlc_media_set_state
(
libvlc_media_t
*
,
libvlc_state_t
,
libvlc_exception_t
*
);
void
libvlc_media_set_state
(
libvlc_media_t
*
,
libvlc_state_t
);
#endif
src/control/media_list_path.h
View file @
2fa0b5fa
...
...
@@ -127,7 +127,7 @@ get_path_rec( const libvlc_media_list_path_t path, libvlc_media_list_t * p_curre
if
(
p_md
==
p_searched_md
)
return
libvlc_media_list_path_copy_by_appending
(
path
,
i
);
/* Found! */
libvlc_media_list_t
*
p_subitems
=
libvlc_media_subitems
(
p_md
,
NULL
);
libvlc_media_list_t
*
p_subitems
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
if
(
p_subitems
)
{
...
...
@@ -175,7 +175,7 @@ libvlc_media_list_item_at_path( libvlc_media_list_t * p_mlist, const libvlc_medi
if
(
path
[
i
+
1
]
==
-
1
)
return
p_md
;
p_current_mlist
=
libvlc_media_subitems
(
p_md
,
NULL
);
p_current_mlist
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
if
(
!
p_current_mlist
)
...
...
@@ -211,7 +211,7 @@ libvlc_media_list_parentlist_at_path( libvlc_media_list_t * p_mlist, const libvl
p_md
=
libvlc_media_list_item_at_index
(
p_current_mlist
,
path
[
i
],
NULL
);
p_current_mlist
=
libvlc_media_subitems
(
p_md
,
NULL
);
p_current_mlist
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
if
(
!
p_current_mlist
)
...
...
@@ -236,7 +236,7 @@ libvlc_media_list_sublist_at_path( libvlc_media_list_t * p_mlist, const libvlc_m
if
(
!
p_md
)
return
NULL
;
ret
=
libvlc_media_subitems
(
p_md
,
NULL
);
ret
=
libvlc_media_subitems
(
p_md
);
libvlc_media_release
(
p_md
);
return
ret
;
...
...
src/control/media_list_view.c
View file @
2fa0b5fa
...
...
@@ -61,7 +61,7 @@ install_md_listener( libvlc_media_list_view_t * p_mlv,
libvlc_media_t
*
p_md
)
{
libvlc_media_list_t
*
p_mlist
;
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
,
NULL
)))
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
)))
{
libvlc_media_list_lock
(
p_mlist
);
int
i
,
count
=
libvlc_media_list_count
(
p_mlist
,
NULL
);
...
...
@@ -110,7 +110,7 @@ uninstall_md_listener( libvlc_media_list_view_t * p_mlv,
media_list_subitem_added
,
p_mlv
,
&
ignored_exception
);
if
(
libvlc_exception_raised
(
&
ignored_exception
)
)
libvlc_exception_clear
(
&
ignored_exception
);
/* We don't care if we encounter an exception */
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
,
NULL
)))
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
)))
{
libvlc_media_list_lock
(
p_mlist
);
libvlc_event_detach
(
p_mlist
->
p_event_manager
,
...
...
@@ -160,7 +160,7 @@ media_list_subitem_added( const libvlc_event_t * p_event, void * p_user_data )
libvlc_media_t
*
p_submd
=
p_event
->
u
.
media_subitem_added
.
new_child
;
libvlc_media_t
*
p_md
=
p_event
->
p_obj
;
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
,
NULL
)))
if
((
p_mlist
=
libvlc_media_subitems
(
p_md
)))
{
/* We have a mlist to which we're going to listen to events
* thus, no need to wait for SubItemAdded events */
...
...
@@ -449,7 +449,7 @@ libvlc_media_list_view_children_for_item( libvlc_media_list_view_t * p_mlv,
libvlc_media_list_t
*
p_mlist
;
libvlc_media_list_view_t
*
ret
;
p_mlist
=
libvlc_media_subitems
(
p_md
,
p_e
);
p_mlist
=
libvlc_media_subitems
(
p_md
);
if
(
!
p_mlist
)
return
NULL
;
ret
=
p_mlv
->
pf_constructor
(
p_mlist
,
p_e
);
...
...
src/control/media_player.c
View file @
2fa0b5fa
...
...
@@ -166,7 +166,7 @@ input_seekable_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_player_t
*
p_mi
=
p_userdata
;
libvlc_event_t
event
;
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
);
event
.
type
=
libvlc_MediaPlayerSeekableChanged
;
event
.
u
.
media_player_seekable_changed
.
new_seekable
=
newval
.
b_bool
;
...
...
@@ -185,7 +185,7 @@ input_pausable_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_media_player_t
*
p_mi
=
p_userdata
;
libvlc_event_t
event
;
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
);
event
.
type
=
libvlc_MediaPlayerPausableChanged
;
event
.
u
.
media_player_pausable_changed
.
new_pausable
=
newval
.
b_bool
;
...
...
@@ -240,7 +240,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
return
VLC_SUCCESS
;
}
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
else
if
(
newval
.
i_int
==
INPUT_EVENT_ABORT
)
...
...
@@ -248,7 +248,7 @@ input_event_changed( vlc_object_t * p_this, char const * psz_cmd,
libvlc_state_t
libvlc_state
=
libvlc_Stopped
;
event
.
type
=
libvlc_MediaPlayerStopped
;
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
,
NULL
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_state
);
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
else
if
(
newval
.
i_int
==
INPUT_EVENT_POSITION
)
...
...
@@ -486,7 +486,7 @@ void libvlc_media_player_set_media(
!
p_mi
->
p_input_thread
->
b_error
);
if
(
p_mi
->
p_md
)
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
,
p_e
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_NothingSpecial
);
libvlc_media_release
(
p_mi
->
p_md
);
...
...
@@ -659,7 +659,7 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
{
/* Send a stop notification event only if we are in playing,
* buffering or paused states */
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Stopped
,
p_e
);
libvlc_media_set_state
(
p_mi
->
p_md
,
libvlc_Stopped
);
/* Construct and send the event */
libvlc_event_t
event
;
...
...
@@ -1091,7 +1091,7 @@ libvlc_state_t libvlc_media_player_get_state(
return
state
;
}
state
=
libvlc_media_get_state
(
p_mi
->
p_md
,
NULL
);
state
=
libvlc_media_get_state
(
p_mi
->
p_md
);
if
(
state
==
libvlc_Playing
)
{
float
caching
;
...
...
src/control/mediacontrol_core.c
View file @
2fa0b5fa
...
...
@@ -208,7 +208,7 @@ mediacontrol_start( mediacontrol_Instance *self,
{
/* A media was defined. Get its mrl to reuse it, but reset the options
(because start-time may have been set on the previous invocation */
psz_name
=
libvlc_media_get_mrl
(
p_media
,
&
ex
);
psz_name
=
libvlc_media_get_mrl
(
p_media
);
HANDLE_LIBVLC_EXCEPTION_VOID
(
&
ex
);
/* Create a new media */
...
...
@@ -224,7 +224,7 @@ mediacontrol_start( mediacontrol_Instance *self,
psz_from
=
(
char
*
)
malloc
(
20
*
sizeof
(
char
)
);
i_from
=
private_mediacontrol_position2microsecond
(
self
->
p_media_player
,
a_position
)
/
1000000
;
snprintf
(
psz_from
,
20
,
"start-time=%"
PRId64
,
i_from
);
libvlc_media_add_option
(
p_media
,
psz_from
,
&
ex
);
libvlc_media_add_option
(
p_media
,
psz_from
);
HANDLE_LIBVLC_EXCEPTION_VOID
(
&
ex
);
}
...
...
@@ -315,7 +315,7 @@ mediacontrol_get_mrl( mediacontrol_Instance *self,
{
char
*
psz_mrl
;
psz_mrl
=
libvlc_media_get_mrl
(
p_media
,
&
ex
);
psz_mrl
=
libvlc_media_get_mrl
(
p_media
);
HANDLE_LIBVLC_EXCEPTION_NULL
(
&
ex
);
return
psz_mrl
;
}
...
...
@@ -406,7 +406,7 @@ mediacontrol_get_stream_information( mediacontrol_Instance *self,
break
;
}
retval
->
url
=
libvlc_media_get_mrl
(
p_media
,
&
ex
);
retval
->
url
=
libvlc_media_get_mrl
(
p_media
);
retval
->
position
=
libvlc_media_player_get_time
(
self
->
p_media_player
,
&
ex
);
if
(
libvlc_exception_raised
(
&
ex
)
)
...
...
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