Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
922aad51
Commit
922aad51
authored
May 13, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated functions
parent
7ba508f8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
641 deletions
+23
-641
include/vlc/deprecated.h
include/vlc/deprecated.h
+0
-203
include/vlc/libvlc.h
include/vlc/libvlc.h
+0
-12
src/control/libvlc_internal.h
src/control/libvlc_internal.h
+0
-2
src/control/media_player.c
src/control/media_player.c
+17
-73
src/control/playlist.c
src/control/playlist.c
+5
-234
src/control/video.c
src/control/video.c
+1
-86
src/libvlc.sym
src/libvlc.sym
+0
-21
test/libvlc/core.c
test/libvlc/core.c
+0
-10
No files found.
include/vlc/deprecated.h
View file @
922aad51
...
...
@@ -71,46 +71,6 @@ VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *,
VLC_PUBLIC_API
libvlc_drawable_t
libvlc_media_player_get_drawable
(
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
/**
* Set the default video output's parent.
*
* This setting will be used as default for any video output.
*
* \param p_instance libvlc instance
* \param drawable the new parent window
* (see libvlc_media_player_set_drawable() for details)
* \param p_e an initialized exception pointer
* @deprecated Use libvlc_media_player_set_drawable
*/
VLC_PUBLIC_API
void
libvlc_video_set_parent
(
libvlc_instance_t
*
,
libvlc_drawable_t
,
libvlc_exception_t
*
);
/**
* Set the default video output parent.
*
* This setting will be used as default for all video outputs.
*
* \param p_instance libvlc instance
* \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
* \param p_e an initialized exception pointer
* @deprecated Use libvlc_media_player_get_drawable
*/
VLC_PUBLIC_API
libvlc_drawable_t
libvlc_video_get_parent
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Change the parent for the current the video output.
*
* \param p_instance libvlc instance
* \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
* \param p_e an initialized exception pointer
* \return the success status (boolean)
*/
VLC_PUBLIC_API
int
libvlc_video_reparent
(
libvlc_media_player_t
*
,
libvlc_drawable_t
,
libvlc_exception_t
*
);
/*
* This function shall not be used at all. It may lead to crash and race condition.
*/
VLC_DEPRECATED_API
int
libvlc_video_destroy
(
libvlc_media_player_t
*
,
libvlc_exception_t
*
);
/*****************************************************************************
* Playlist (Deprecated)
*****************************************************************************/
...
...
@@ -121,17 +81,6 @@ VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exc
* @{
*/
/**
* Set the playlist's loop attribute. If set, the playlist runs continuously
* and wraps around when it reaches the end.
*
* \param p_instance the playlist instance
* \param loop the loop attribute. 1 sets looping, 0 disables it
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_loop
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/**
* Start playing.
*
...
...
@@ -149,158 +98,6 @@ VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
VLC_DEPRECATED_API
void
libvlc_playlist_play
(
libvlc_instance_t
*
,
int
,
int
,
char
**
,
libvlc_exception_t
*
);
/**
* Toggle the playlist's pause status.
*
* If the playlist was running, it is paused. If it was paused, it is resumed.
*
* \param p_instance the playlist instance to pause
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_pause
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Checks whether the playlist is running
*
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
* \return 0 if the playlist is stopped or paused, 1 if it is running
*/
VLC_DEPRECATED_API
int
libvlc_playlist_isplaying
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Get the number of items in the playlist
*
* Expects the playlist instance to be locked already.
*
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
* \return the number of items
*/
VLC_DEPRECATED_API
int
libvlc_playlist_items_count
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
VLC_DEPRECATED_API
int
libvlc_playlist_get_current_index
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Lock the playlist.
*
* \param p_instance the playlist instance
*/
VLC_DEPRECATED_API
void
libvlc_playlist_lock
(
libvlc_instance_t
*
);
/**
* Unlock the playlist.
*
* \param p_instance the playlist instance
*/
VLC_DEPRECATED_API
void
libvlc_playlist_unlock
(
libvlc_instance_t
*
);
/**
* Stop playing.
*
* \param p_instance the playlist instance to stop
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_stop
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Go to the next playlist item. If the playlist was stopped, playback
* is started.
*
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_next
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Go to the previous playlist item. If the playlist was stopped, playback
* is started.
*
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_prev
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Empty a playlist. All items in the playlist are removed.
*
* \param p_instance the playlist instance
* \param p_e an initialized exception pointer
*/
VLC_DEPRECATED_API
void
libvlc_playlist_clear
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
* Append an item to the playlist. The item is added at the end. If more
* advanced options are required, \see libvlc_playlist_add_extended instead.
*
* \param p_instance the playlist instance
* \param psz_uri the URI to open, using VLC format
* \param psz_name a name that you might want to give or NULL
* \param p_e an initialized exception pointer
* \return the identifier of the new item
*/
VLC_DEPRECATED_API
int
libvlc_playlist_add
(
libvlc_instance_t
*
,
const
char
*
,
const
char
*
,
libvlc_exception_t
*
);
/**
* Append an item to the playlist. The item is added at the end, with
* additional input options.
*
* \param p_instance the playlist instance
* \param psz_uri the URI to open, using VLC format
* \param psz_name a name that you might want to give or NULL
* \param i_options the number of options to add
* \param ppsz_options strings representing the options to add
* \param p_e an initialized exception pointer
* \return the identifier of the new item
*/
VLC_DEPRECATED_API
int
libvlc_playlist_add_extended
(
libvlc_instance_t
*
,
const
char
*
,
const
char
*
,
int
,
const
char
**
,
libvlc_exception_t
*
);
/**
* Append an item to the playlist. The item is added at the end, with
* additional input options from an untrusted source.
*
* \param p_instance the playlist instance
* \param psz_uri the URI to open, using VLC format
* \param psz_name a name that you might want to give or NULL
* \param i_options the number of options to add
* \param ppsz_options strings representing the options to add
* \param p_e an initialized exception pointer
* \return the identifier of the new item
*/
VLC_DEPRECATED_API
int
libvlc_playlist_add_extended_untrusted
(
libvlc_instance_t
*
,
const
char
*
,
const
char
*
,
int
,
const
char
**
,
libvlc_exception_t
*
);
/**
* Delete the playlist item with the given ID.
*
* \param p_instance the playlist instance
* \param i_id the id to remove
* \param p_e an initialized exception pointer
* \return 0 in case of success, a non-zero value otherwise
*/
VLC_DEPRECATED_API
int
libvlc_playlist_delete_item
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/** Get the input that is currently being played by the playlist.
*
* \param p_instance the playlist instance to use
* \param p_e an initialized exception pointern
* \return a media instance object
*/
VLC_DEPRECATED_API
libvlc_media_player_t
*
libvlc_playlist_get_media_player
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/** @}*/
# ifdef __cplusplus
...
...
include/vlc/libvlc.h
View file @
922aad51
...
...
@@ -1087,18 +1087,6 @@ VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libv
*/
VLC_PUBLIC_API
void
libvlc_video_redraw_rectangle
(
libvlc_media_player_t
*
,
const
libvlc_rectangle_t
*
,
libvlc_exception_t
*
);
/**
* Set the default video output size.
*
* This setting will be used as default for all video outputs.
*
* \param p_instance libvlc instance
* \param width new width for video drawable
* \param height new height for video drawable
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API
void
libvlc_video_set_size
(
libvlc_instance_t
*
,
int
,
int
,
libvlc_exception_t
*
);
/**
* Set the default video output viewport for a windowless video output
* (MacOS X only).
...
...
src/control/libvlc_internal.h
View file @
922aad51
...
...
@@ -161,8 +161,6 @@ struct libvlc_media_player_t
uint32_t
xid
;
uint32_t
agl
;
}
drawable
;
bool
b_own_its_input_thread
;
};
struct
libvlc_media_list_player_t
...
...
src/control/media_player.c
View file @
922aad51
...
...
@@ -78,24 +78,20 @@ static void release_input_thread( libvlc_media_player_t *p_mi, bool b_input_abor
p_input_thread
=
p_mi
->
p_input_thread
;
/* No one is tracking this input_thread apart from us. Destroy it. */
if
(
p_mi
->
b_own_its_input_thread
)
{
var_DelCallback
(
p_input_thread
,
"can-seek"
,
input_seekable_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"can-pause"
,
input_pausable_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-event"
,
input_event_changed
,
p_mi
);
/* We owned this one */
input_Stop
(
p_input_thread
,
b_input_abort
);
vlc_thread_join
(
p_input_thread
);
var_Destroy
(
p_input_thread
,
"drawable-hwnd"
);
var_Destroy
(
p_input_thread
,
"drawable-xid"
);
var_Destroy
(
p_input_thread
,
"drawable-agl"
);
}
var_DelCallback
(
p_input_thread
,
"can-seek"
,
input_seekable_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"can-pause"
,
input_pausable_changed
,
p_mi
);
var_DelCallback
(
p_input_thread
,
"intf-event"
,
input_event_changed
,
p_mi
);
/* We owned this one */
input_Stop
(
p_input_thread
,
b_input_abort
);
vlc_thread_join
(
p_input_thread
);
var_Destroy
(
p_input_thread
,
"drawable-hwnd"
);
var_Destroy
(
p_input_thread
,
"drawable-xid"
);
var_Destroy
(
p_input_thread
,
"drawable-agl"
);
vlc_object_release
(
p_input_thread
);
...
...
@@ -280,7 +276,6 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
p_mi
->
p_libvlc_instance
=
p_libvlc_instance
;
p_mi
->
p_input_thread
=
NULL
;
p_mi
->
i_refcount
=
1
;
p_mi
->
b_own_its_input_thread
=
true
;
vlc_mutex_init
(
&
p_mi
->
object_lock
);
p_mi
->
p_event_manager
=
libvlc_event_manager_new
(
p_mi
,
p_libvlc_instance
,
p_e
);
...
...
@@ -359,44 +354,6 @@ libvlc_media_player_new_from_media(
return
p_mi
;
}
/**************************************************************************
* Create a new media instance object from an input_thread (Libvlc Internal).
**************************************************************************/
libvlc_media_player_t
*
libvlc_media_player_new_from_input_thread
(
struct
libvlc_instance_t
*
p_libvlc_instance
,
input_thread_t
*
p_input
,
libvlc_exception_t
*
p_e
)
{
libvlc_media_player_t
*
p_mi
;
if
(
!
p_input
)
{
libvlc_exception_raise
(
p_e
,
"invalid input thread"
);
return
NULL
;
}
p_mi
=
libvlc_media_player_new
(
p_libvlc_instance
,
p_e
);
if
(
!
p_mi
)
return
NULL
;
p_mi
->
p_md
=
libvlc_media_new_from_input_item
(
p_libvlc_instance
,
input_GetItem
(
p_input
),
p_e
);
if
(
!
p_mi
->
p_md
)
{
libvlc_media_player_destroy
(
p_mi
);
return
NULL
;
}
/* will be released in media_player_release() */
vlc_object_hold
(
p_input
);
p_mi
->
p_input_thread
=
p_input
;
p_mi
->
b_own_its_input_thread
=
false
;
return
p_mi
;
}
/**************************************************************************
* Destroy a Media Instance object (libvlc internal)
*
...
...
@@ -714,22 +671,9 @@ void libvlc_media_player_stop( libvlc_media_player_t *p_mi,
libvlc_event_send
(
p_mi
->
p_event_manager
,
&
event
);
}
if
(
p_mi
->
b_own_its_input_thread
)
{
vlc_mutex_lock
(
&
p_mi
->
object_lock
);
release_input_thread
(
p_mi
,
true
);
/* This will stop the input thread */
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
}
else
{
input_thread_t
*
p_input_thread
=
libvlc_get_input_thread
(
p_mi
,
p_e
);
if
(
!
p_input_thread
)
return
;
input_Stop
(
p_input_thread
,
true
);
vlc_object_release
(
p_input_thread
);
p_mi
->
p_input_thread
=
NULL
;
}
vlc_mutex_lock
(
&
p_mi
->
object_lock
);
release_input_thread
(
p_mi
,
true
);
/* This will stop the input thread */
vlc_mutex_unlock
(
&
p_mi
->
object_lock
);
}
/**************************************************************************
...
...
src/control/playlist.c
View file @
922aad51
...
...
@@ -29,243 +29,14 @@
#include <assert.h>
#define PL (libvlc_priv (p_instance->p_libvlc_int)->p_playlist)
static
inline
int
playlist_was_locked
(
libvlc_instance_t
*
p_instance
)
{
int
was_locked
;
vlc_mutex_lock
(
&
p_instance
->
instance_lock
);
was_locked
=
p_instance
->
b_playlist_locked
;
vlc_mutex_unlock
(
&
p_instance
->
instance_lock
);
return
was_locked
;
}
static
inline
void
playlist_mark_locked
(
libvlc_instance_t
*
p_instance
,
int
locked
)
{
vlc_mutex_lock
(
&
p_instance
->
instance_lock
);
p_instance
->
b_playlist_locked
=
locked
;
vlc_mutex_unlock
(
&
p_instance
->
instance_lock
);
}
void
libvlc_playlist_loop
(
libvlc_instance_t
*
p_instance
,
int
loop
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
assert
(
PL
);
var_SetBool
(
PL
,
"loop"
,
loop
);
}
void
libvlc_playlist_play
(
libvlc_instance_t
*
p_instance
,
int
i_id
,
int
i_options
,
char
**
ppsz_options
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
VLC_UNUSED
(
i_options
);
VLC_UNUSED
(
ppsz_options
);
int
did_lock
=
0
;
assert
(
PL
);
///\todo Handle additionnal options
if
(
PL
->
items
.
i_size
==
0
)
RAISEVOID
(
"Empty playlist"
);
if
(
i_id
>
0
)
{
playlist_item_t
*
p_item
;
if
(
!
playlist_was_locked
(
p_instance
)
)
{
playlist_mark_locked
(
p_instance
,
1
);
playlist_Lock
(
PL
);
did_lock
=
1
;
}
p_item
=
playlist_ItemGetByInputId
(
PL
,
i_id
,
PL
->
p_root_category
);
if
(
p_item
)
playlist_Control
(
PL
,
PLAYLIST_VIEWPLAY
,
pl_Locked
,
PL
->
p_root_category
,
p_item
);
else
RAISEVOID
(
"Unable to find item"
);
if
(
did_lock
==
1
)
{
playlist_Unlock
(
PL
);
playlist_mark_locked
(
p_instance
,
0
);
}
}
else
{
playlist_Control
(
PL
,
PLAYLIST_PLAY
,
playlist_was_locked
(
p_instance
)
);
}
}
void
libvlc_playlist_pause
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
assert
(
PL
);
if
(
playlist_Control
(
PL
,
PLAYLIST_PAUSE
,
playlist_was_locked
(
p_instance
)
)
!=
VLC_SUCCESS
)
RAISEVOID
(
"Empty playlist"
);
}
void
libvlc_playlist_stop
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
assert
(
PL
);
if
(
playlist_Control
(
PL
,
PLAYLIST_STOP
,
playlist_was_locked
(
p_instance
)
)
!=
VLC_SUCCESS
)
RAISEVOID
(
"Empty playlist"
);
}
void
libvlc_playlist_clear
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
assert
(
PL
);
playlist_Clear
(
PL
,
playlist_was_locked
(
p_instance
)
);
}
void
libvlc_playlist_next
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
assert
(
PL
);
if
(
playlist_Control
(
PL
,
PLAYLIST_SKIP
,
playlist_was_locked
(
p_instance
),
1
)
!=
VLC_SUCCESS
)
RAISEVOID
(
"Empty playlist"
);
}
playlist_t
*
pl
=
libvlc_priv
(
p_instance
->
p_libvlc_int
)
->
p_playlist
;
VLC_UNUSED
(
i_id
);
VLC_UNUSED
(
i_options
);
VLC_UNUSED
(
ppsz_options
);
void
libvlc_playlist_prev
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
if
(
playlist_Control
(
PL
,
PLAYLIST_SKIP
,
playlist_was_locked
(
p_instance
),
-
1
)
!=
VLC_SUCCESS
)
RAISEVOID
(
"Empty playlist"
);
assert
(
pl
);
if
(
pl
->
items
.
i_size
==
0
)
RAISEVOID
(
"Empty playlist"
);
playlist_Control
(
pl
,
PLAYLIST_PLAY
,
false
);
}
int
libvlc_playlist_add
(
libvlc_instance_t
*
p_instance
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
libvlc_exception_t
*
p_e
)
{
return
libvlc_playlist_add_extended
(
p_instance
,
psz_uri
,
psz_name
,
0
,
NULL
,
p_e
);
}
static
int
PlaylistAddExtended
(
libvlc_instance_t
*
p_instance
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
**
ppsz_options
,
unsigned
i_option_flags
,
libvlc_exception_t
*
p_e
)
{
assert
(
PL
);
if
(
playlist_was_locked
(
p_instance
)
)
{
libvlc_exception_raise
(
p_e
,
"You must unlock playlist before "
"calling libvlc_playlist_add"
);
return
VLC_EGENERIC
;
}
return
playlist_AddExt
(
PL
,
psz_uri
,
psz_name
,
PLAYLIST_INSERT
,
PLAYLIST_END
,
-
1
,
i_options
,
ppsz_options
,
i_option_flags
,
true
,
pl_Unlocked
);
}
int
libvlc_playlist_add_extended
(
libvlc_instance_t
*
p_instance
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
**
ppsz_options
,
libvlc_exception_t
*
p_e
)
{
return
PlaylistAddExtended
(
p_instance
,
psz_uri
,
psz_name
,
i_options
,
ppsz_options
,
VLC_INPUT_OPTION_TRUSTED
,
p_e
);
}
int
libvlc_playlist_add_extended_untrusted
(
libvlc_instance_t
*
p_instance
,
const
char
*
psz_uri
,
const
char
*
psz_name
,
int
i_options
,
const
char
**
ppsz_options
,
libvlc_exception_t
*
p_e
)
{
return
PlaylistAddExtended
(
p_instance
,
psz_uri
,
psz_name
,
i_options
,
ppsz_options
,
0
,
p_e
);
}
int
libvlc_playlist_delete_item
(
libvlc_instance_t
*
p_instance
,
int
i_id
,
libvlc_exception_t
*
p_e
)
{
assert
(
PL
);
if
(
playlist_DeleteFromInput
(
PL
,
i_id
,
playlist_was_locked
(
p_instance
)
)
)
{
libvlc_exception_raise
(
p_e
,
"deletion failed"
);
return
VLC_ENOITEM
;
}
return
VLC_SUCCESS
;
}
int
libvlc_playlist_isplaying
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
assert
(
PL
);
return
playlist_Status
(
PL
)
==
PLAYLIST_RUNNING
;
}
int
libvlc_playlist_items_count
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
assert
(
PL
);
return
playlist_CurrentSize
(
PL
);
}
int
libvlc_playlist_get_current_index
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
assert
(
PL
);
playlist_item_t
*
p_item
=
playlist_CurrentPlayingItem
(
PL
);
if
(
!
p_item
)
return
-
1
;
return
p_item
->
i_id
;
}
void
libvlc_playlist_lock
(
libvlc_instance_t
*
p_instance
)
{
assert
(
PL
);
playlist_Lock
(
PL
);
p_instance
->
b_playlist_locked
=
1
;
}
void
libvlc_playlist_unlock
(
libvlc_instance_t
*
p_instance
)
{
assert
(
PL
);
p_instance
->
b_playlist_locked
=
0
;
playlist_Unlock
(
PL
);
}
libvlc_media_player_t
*
libvlc_playlist_get_media_player
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
libvlc_media_player_t
*
p_mi
;
assert
(
PL
);
input_thread_t
*
input
=
playlist_CurrentInput
(
PL
);
if
(
input
)
{
p_mi
=
libvlc_media_player_new_from_input_thread
(
p_instance
,
input
,
p_e
);
vlc_object_release
(
input
);
}
else
{
/* no active input */
p_mi
=
NULL
;
libvlc_exception_raise
(
p_e
,
"No active input"
);
}
return
p_mi
;
}
src/control/video.c
View file @
922aad51
...
...
@@ -187,14 +187,6 @@ int libvlc_media_player_has_vout( libvlc_media_player_t *p_mi,
return
has_vout
;
}
int
libvlc_video_reparent
(
libvlc_media_player_t
*
p_mi
,
libvlc_drawable_t
d
,
libvlc_exception_t
*
p_e
)
{
(
void
)
p_mi
;
(
void
)
d
;
libvlc_exception_raise
(
p_e
,
"Reparenting not supported"
);
return
-
1
;
}
void
libvlc_video_resize
(
libvlc_media_player_t
*
p_mi
,
int
width
,
int
height
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
...
...
@@ -230,72 +222,6 @@ void libvlc_video_redraw_rectangle( libvlc_media_player_t *p_mi,
/* global video settings */
/* Deprecated use libvlc_media_player_set_drawable() */
void
libvlc_video_set_parent
(
libvlc_instance_t
*
p_instance
,
libvlc_drawable_t
d
,
libvlc_exception_t
*
p_e
)
{
/* set as default for future vout instances */
#ifdef WIN32
vlc_value_t
val
;
if
(
sizeof
(
HWND
)
>
sizeof
(
libvlc_drawable_t
)
)
return
;
/* BOOM! we told you not to use this function! */
val
.
p_address
=
(
void
*
)(
uintptr_t
)
d
;
var_Set
(
p_instance
->
p_libvlc_int
,
"drawable-hwnd"
,
val
);
#elif defined(__APPLE__)
var_SetInteger
(
p_instance
->
p_libvlc_int
,
"drawable-agl"
,
d
);
#else
var_SetInteger
(
p_instance
->
p_libvlc_int
,
"drawable-xid"
,
d
);
#endif
libvlc_media_player_t
*
p_mi
=
libvlc_playlist_get_media_player
(
p_instance
,
p_e
);
if
(
p_mi
)
{
libvlc_media_player_set_drawable
(
p_mi
,
d
,
p_e
);
libvlc_media_player_release
(
p_mi
);
}
}
/* Deprecated use libvlc_media_player_get_drawable() */
libvlc_drawable_t
libvlc_video_get_parent
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_e
)
{
VLC_UNUSED
(
p_e
);
#ifdef WIN32
vlc_value_t
val
;
if
(
sizeof
(
HWND
)
>
sizeof
(
libvlc_drawable_t
)
)
return
0
;
var_Get
(
p_instance
->
p_libvlc_int
,
"drawable-hwnd"
,
&
val
);
return
(
uintptr_t
)
val
.
p_address
;
#elif defined(__APPLE__)
return
var_GetInteger
(
p_instance
->
p_libvlc_int
,
"drawable-agl"
);
#else
return
var_GetInteger
(
p_instance
->
p_libvlc_int
,
"drawable-xid"
);
#endif
}
void
libvlc_video_set_size
(
libvlc_instance_t
*
p_instance
,
int
width
,
int
height
,
libvlc_exception_t
*
p_e
)
{
/* set as default for future vout instances */
config_PutInt
(
p_instance
->
p_libvlc_int
,
"width"
,
width
);
config_PutInt
(
p_instance
->
p_libvlc_int
,
"height"
,
height
);
libvlc_media_player_t
*
p_mi
=
libvlc_playlist_get_media_player
(
p_instance
,
p_e
);
if
(
p_mi
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
if
(
p_vout
)
{
/* tell running vout to re-size */
vout_Control
(
p_vout
,
VOUT_SET_SIZE
,
width
,
height
);
vlc_object_release
(
p_vout
);
}
libvlc_media_player_release
(
p_mi
);
}
}
void
libvlc_video_set_viewport
(
libvlc_instance_t
*
p_instance
,
libvlc_media_player_t
*
p_mi
,
const
libvlc_rectangle_t
*
view
,
const
libvlc_rectangle_t
*
clip
,
libvlc_exception_t
*
p_e
)
...
...
@@ -334,7 +260,7 @@ void libvlc_video_set_viewport( libvlc_instance_t *p_instance, libvlc_media_play
}
}
#else
(
void
)
p_instance
;
(
void
)
view
;
(
void
)
clip
;
(
void
)
p_e
;
(
void
)
p_instance
;
(
void
)
view
;
(
void
)
clip
;
(
void
)
p_e
;
(
void
)
p_mi
;
#endif
}
...
...
@@ -704,14 +630,3 @@ void libvlc_video_set_track( libvlc_media_player_t *p_mi, int i_track,
libvlc_exception_raise
(
p_e
,
"Video track out of range"
);
vlc_object_release
(
p_input_thread
);
}
int
libvlc_video_destroy
(
libvlc_media_player_t
*
p_mi
,
libvlc_exception_t
*
p_e
)
{
vout_thread_t
*
p_vout
=
GetVout
(
p_mi
,
p_e
);
vlc_object_detach
(
p_vout
);
vlc_object_release
(
p_vout
);
vlc_object_release
(
p_vout
);
return
0
;
}
src/libvlc.sym
View file @
922aad51
...
...
@@ -168,23 +168,7 @@ libvlc_media_set_state
libvlc_media_set_user_data
libvlc_media_subitems
libvlc_new
libvlc_playlist_add
libvlc_playlist_add_extended
libvlc_playlist_add_extended_untrusted
libvlc_playlist_clear
libvlc_playlist_delete_item
libvlc_playlist_get_media_player
libvlc_playlist_isplaying
libvlc_playlist_items_count
libvlc_playlist_get_current_index
libvlc_playlist_lock
libvlc_playlist_loop
libvlc_playlist_next
libvlc_playlist_pause
libvlc_playlist_play
libvlc_playlist_prev
libvlc_playlist_stop
libvlc_playlist_unlock
libvlc_release
libvlc_retain
libvlc_set_fullscreen
...
...
@@ -192,12 +176,10 @@ libvlc_set_log_verbosity
libvlc_toggle_fullscreen
libvlc_toggle_teletext
libvlc_track_description_release
libvlc_video_destroy
libvlc_video_get_aspect_ratio
libvlc_video_get_chapter_description
libvlc_video_get_crop_geometry
libvlc_video_get_height
libvlc_video_get_parent
libvlc_video_get_spu
libvlc_video_get_spu_count
libvlc_video_get_spu_description
...
...
@@ -208,12 +190,9 @@ libvlc_video_get_track_count
libvlc_video_get_track_description
libvlc_video_get_width
libvlc_video_redraw_rectangle
libvlc_video_reparent
libvlc_video_resize
libvlc_video_set_aspect_ratio
libvlc_video_set_crop_geometry
libvlc_video_set_parent
libvlc_video_set_size
libvlc_video_set_spu
libvlc_video_set_subtitle_file
libvlc_video_set_teletext
...
...
test/libvlc/core.c
View file @
922aad51
...
...
@@ -34,16 +34,6 @@ static void test_core (const char ** argv, int argc)
vlc
=
libvlc_new
(
argc
,
argv
,
&
ex
);
catch
();
libvlc_playlist_clear
(
vlc
,
&
ex
);
catch
();
id
=
libvlc_playlist_add_extended
(
vlc
,
"/dev/null"
,
"Test"
,
0
,
NULL
,
&
ex
);
catch
();
libvlc_playlist_clear
(
vlc
,
&
ex
);
catch
();
libvlc_retain
(
vlc
);
libvlc_release
(
vlc
);
libvlc_release
(
vlc
);
...
...
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