Commit 8ef6e5c7 authored by FUJISAWA Tooru's avatar FUJISAWA Tooru Committed by Felix Paul Kühne

access_screen: added support for OS X Lion

Signed-off-by: default avatarFelix Paul Kühne <fkuehne@videolan.org>
parent c2c7ca26
This diff is collapsed.
...@@ -74,6 +74,15 @@ ...@@ -74,6 +74,15 @@
"capture." ) "capture." )
#endif #endif
#ifdef SCREEN_DISPLAY_ID
#define DISPLAY_ID_TEXT N_( "Display ID" )
#define DISPLAY_ID_LONGTEXT N_( \
"Display ID. If not specified, main display ID is used. " )
#define INDEX_TEXT N_( "Screen index" )
#define INDEX_LONGTEXT N_( \
"Index of screen (1, 2, 3, ...). Alternative to Display ID." )
#endif
static int Open ( vlc_object_t * ); static int Open ( vlc_object_t * );
static void Close( vlc_object_t * ); static void Close( vlc_object_t * );
...@@ -109,6 +118,11 @@ vlc_module_begin () ...@@ -109,6 +118,11 @@ vlc_module_begin ()
add_integer( "screen-fragment-size", 0, FRAGS_TEXT, FRAGS_LONGTEXT, true ) add_integer( "screen-fragment-size", 0, FRAGS_TEXT, FRAGS_LONGTEXT, true )
#endif #endif
#ifdef SCREEN_DISPLAY_ID
add_integer( "screen-display-id", 0, DISPLAY_ID_TEXT, DISPLAY_ID_LONGTEXT, true )
add_integer( "screen-index", 0, INDEX_TEXT, INDEX_LONGTEXT, true )
#endif
set_capability( "access_demux", 0 ) set_capability( "access_demux", 0 )
add_shortcut( "screen" ) add_shortcut( "screen" )
set_callbacks( Open, Close ) set_callbacks( Open, Close )
...@@ -153,6 +167,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -153,6 +167,11 @@ static int Open( vlc_object_t *p_this )
p_sys->i_height ); p_sys->i_height );
#endif #endif
#ifdef SCREEN_DISPLAY_ID
p_sys->i_display_id = var_CreateGetInteger( p_demux, "screen-display-id" );
p_sys->i_screen_index = var_CreateGetInteger( p_demux, "screen-index" );
#endif
if( screen_InitCapture( p_demux ) != VLC_SUCCESS ) if( screen_InitCapture( p_demux ) != VLC_SUCCESS )
{ {
free( p_sys ); free( p_sys );
...@@ -181,7 +200,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -181,7 +200,7 @@ static int Open( vlc_object_t *p_this )
p_sys->fmt.video.i_width = p_sys->i_width; p_sys->fmt.video.i_width = p_sys->i_width;
p_sys->fmt.video.i_visible_height = p_sys->fmt.video.i_visible_height =
p_sys->fmt.video.i_height = p_sys->i_height; p_sys->fmt.video.i_height = p_sys->i_height;
p_sys->b_follow_mouse = var_CreateGetInteger( p_demux, p_sys->b_follow_mouse = var_CreateGetBool( p_demux,
"screen-follow-mouse" ); "screen-follow-mouse" );
if( p_sys->b_follow_mouse ) if( p_sys->b_follow_mouse )
msg_Dbg( p_demux, "mouse following enabled" ); msg_Dbg( p_demux, "mouse following enabled" );
......
...@@ -26,11 +26,13 @@ ...@@ -26,11 +26,13 @@
#include <vlc_access.h> #include <vlc_access.h>
#include <vlc_demux.h> #include <vlc_demux.h>
#if !defined( HAVE_DARWIN ) #ifdef __APPLE__
# define SCREEN_SUBSCREEN # define SCREEN_DISPLAY_ID
# define SCREEN_MOUSE
#endif #endif
#define SCREEN_SUBSCREEN
#define SCREEN_MOUSE
#ifdef SCREEN_MOUSE #ifdef SCREEN_MOUSE
# include <vlc_image.h> # include <vlc_image.h>
#endif #endif
...@@ -63,6 +65,11 @@ struct demux_sys_t ...@@ -63,6 +65,11 @@ struct demux_sys_t
picture_t dst; picture_t dst;
#endif #endif
#ifdef SCREEN_DISPLAY_ID
unsigned int i_display_id;
unsigned int i_screen_index;
#endif
screen_data_t *p_data; screen_data_t *p_data;
}; };
......
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