Commit 03b85ce3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove crap that calls vout_Control from outside the vout thread

parent f1582740
...@@ -1067,40 +1067,6 @@ VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc ...@@ -1067,40 +1067,6 @@ VLC_PUBLIC_API void libvlc_video_set_track( libvlc_media_player_t *, int, libvlc
*/ */
VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * ); VLC_PUBLIC_API void libvlc_video_take_snapshot( libvlc_media_player_t *, const char *,unsigned int, unsigned int, libvlc_exception_t * );
/**
* Resize the current video output window.
*
* \param p_mi media player instance
* \param width new width for video output window
* \param height new height for video output window
* \param p_e an initialized exception pointer
* \return the success status (boolean)
*/
VLC_PUBLIC_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
/**
* Tell windowless video output to redraw rectangular area (MacOS X only).
*
* \param p_mi media player instance
* \param area coordinates within video drawable
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
/**
* Set the default video output viewport for a windowless video output
* (MacOS X only).
*
* This setting will be used as default for all video outputs.
*
* \param p_instance libvlc instance
* \param p_mi media player instance
* \param view coordinates within video drawable
* \param clip coordinates within video drawable
* \param p_e an initialized exception pointer
*/
VLC_PUBLIC_API void libvlc_video_set_viewport( libvlc_instance_t *, libvlc_media_player_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
/** @} video */ /** @} video */
/** \defgroup libvlc_audio libvlc_audio /** \defgroup libvlc_audio libvlc_audio
......
...@@ -187,83 +187,6 @@ int libvlc_media_player_has_vout( libvlc_media_player_t *p_mi, ...@@ -187,83 +187,6 @@ int libvlc_media_player_has_vout( libvlc_media_player_t *p_mi,
return has_vout; return has_vout;
} }
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 );
if( p_vout )
{
vout_Control( p_vout, VOUT_SET_SIZE, width, height );
vlc_object_release( p_vout );
}
}
void libvlc_video_redraw_rectangle( libvlc_media_player_t *p_mi,
const libvlc_rectangle_t *area,
libvlc_exception_t *p_e )
{
#ifdef __APPLE__
if( (NULL != area)
&& ((area->bottom - area->top) > 0)
&& ((area->right - area->left) > 0) )
{
vout_thread_t *p_vout = GetVout( p_mi, p_e );
if( p_vout )
{
/* tell running vout to redraw area */
vout_Control( p_vout , VOUT_REDRAW_RECT,
area->top, area->left, area->bottom, area->right );
vlc_object_release( p_vout );
}
}
#else
(void) p_mi; (void) area; (void) p_e;
#endif
}
/* global video settings */
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 )
{
#ifdef __APPLE__
if( !view )
{
libvlc_exception_raise( p_e, "viewport is NULL" );
return;
}
/* if clip is NULL, then use view rectangle as clip */
if( !clip )
clip = view;
/* set as default for future vout instances */
var_SetInteger( p_instance->p_libvlc_int, "drawable-view-top", view->top );
var_SetInteger( p_instance->p_libvlc_int, "drawable-view-left", view->left );
var_SetInteger( p_instance->p_libvlc_int, "drawable-view-bottom", view->bottom );
var_SetInteger( p_instance->p_libvlc_int, "drawable-view-right", view->right );
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-top", clip->top );
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-left", clip->left );
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-bottom", clip->bottom );
var_SetInteger( p_instance->p_libvlc_int, "drawable-clip-right", clip->right );
if( p_mi )
{
vout_thread_t *p_vout = GetVout( p_mi, p_e );
if( p_vout )
{
/* change viewport for running vout */
vout_Control( p_vout, VOUT_SET_VIEWPORT,
view->top, view->left, view->bottom, view->right,
clip->top, clip->left, clip->bottom, clip->right );
vlc_object_release( p_vout );
}
}
#else
(void) p_instance; (void) view; (void) clip; (void) p_e; (void) p_mi;
#endif
}
char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi, char *libvlc_video_get_aspect_ratio( libvlc_media_player_t *p_mi,
libvlc_exception_t *p_e ) libvlc_exception_t *p_e )
{ {
......
...@@ -188,15 +188,12 @@ libvlc_video_get_track ...@@ -188,15 +188,12 @@ libvlc_video_get_track
libvlc_video_get_track_count libvlc_video_get_track_count
libvlc_video_get_track_description libvlc_video_get_track_description
libvlc_video_get_width libvlc_video_get_width
libvlc_video_redraw_rectangle
libvlc_video_resize
libvlc_video_set_aspect_ratio libvlc_video_set_aspect_ratio
libvlc_video_set_crop_geometry libvlc_video_set_crop_geometry
libvlc_video_set_spu libvlc_video_set_spu
libvlc_video_set_subtitle_file libvlc_video_set_subtitle_file
libvlc_video_set_teletext libvlc_video_set_teletext
libvlc_video_set_track libvlc_video_set_track
libvlc_video_set_viewport
libvlc_video_take_snapshot libvlc_video_take_snapshot
libvlc_vlm_add_broadcast libvlc_vlm_add_broadcast
libvlc_vlm_add_vod libvlc_vlm_add_vod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment