00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <stdlib.h>
00031 #include <string.h>
00032
00033 #include <vlc/vlc.h>
00034
00035
00036
00037
00038 extern int E_(Activate) ( vlc_object_t * );
00039 extern void E_(Deactivate) ( vlc_object_t * );
00040
00041
00042
00043
00044 #define ADAPTOR_TEXT N_("XVideo adaptor number")
00045 #define ADAPTOR_LONGTEXT N_( \
00046 "If you graphics card provides several adaptors, this option allows you " \
00047 "to choose which one will be used (you shouldn't have to change this).")
00048
00049 #define ALT_FS_TEXT N_("Alternate fullscreen method")
00050 #define ALT_FS_LONGTEXT N_( \
00051 "There are two ways to make a fullscreen window, unfortunately each one " \
00052 "has its drawbacks.\n" \
00053 "1) Let the window manager handle your fullscreen window (default), but " \
00054 "things like taskbars will likely show on top of the video.\n" \
00055 "2) Completely bypass the window manager, but then nothing will be able " \
00056 "to show on top of the video.")
00057
00058 #define DISPLAY_TEXT N_("X11 display name")
00059 #define DISPLAY_LONGTEXT N_( \
00060 "Specify the X11 hardware display you want to use. By default VLC will " \
00061 "use the value of the DISPLAY environment variable.")
00062
00063 #define CHROMA_TEXT N_("XVimage chroma format")
00064 #define CHROMA_LONGTEXT N_( \
00065 "Force the XVideo renderer to use a specific chroma format instead of " \
00066 "trying to improve performances by using the most efficient one.")
00067
00068 #define SHM_TEXT N_("Use shared memory")
00069 #define SHM_LONGTEXT N_( \
00070 "Use shared memory to communicate between VLC and the X server.")
00071
00072 #define SCREEN_TEXT N_("Screen to be used for fullscreen mode.")
00073 #define SCREEN_LONGTEXT N_( \
00074 "Choose the screen you want to use in fullscreen mode. For instance " \
00075 "set it to 0 for first screen, 1 for the second.")
00076
00077 vlc_module_begin();
00078 set_shortname( "XVideo" );
00079 set_category( CAT_VIDEO );
00080 set_subcategory( SUBCAT_VIDEO_VOUT );
00081 add_string( "xvideo-display", NULL, NULL, DISPLAY_TEXT, DISPLAY_LONGTEXT, VLC_TRUE );
00082 add_integer( "xvideo-adaptor", -1, NULL, ADAPTOR_TEXT, ADAPTOR_LONGTEXT, VLC_TRUE );
00083 add_bool( "xvideo-altfullscreen", 0, NULL, ALT_FS_TEXT, ALT_FS_LONGTEXT, VLC_TRUE );
00084 add_string( "xvideo-chroma", NULL, NULL, CHROMA_TEXT, CHROMA_LONGTEXT, VLC_TRUE );
00085 #ifdef HAVE_SYS_SHM_H
00086 add_bool( "xvideo-shm", 1, NULL, SHM_TEXT, SHM_LONGTEXT, VLC_TRUE );
00087 #endif
00088 #ifdef HAVE_XINERAMA
00089 add_integer ( "xvideo-xineramascreen", 0, NULL, SCREEN_TEXT, SCREEN_LONGTEXT, VLC_TRUE );
00090 #endif
00091
00092 set_description( _("XVideo extension video output") );
00093 set_capability( "video output", 150 );
00094 set_callbacks( E_(Activate), E_(Deactivate) );
00095 vlc_module_end();
00096
00097
00098
00099 #if 0
00100
00101
00102
00103
00104
00105
00106 static void XVideoSetAttribute( vout_thread_t *p_vout,
00107 char *attr_name, float f_value )
00108 {
00109 int i_attrib;
00110 XvAttribute *p_attrib;
00111 Display *p_display = p_vout->p_sys->p_display;
00112 int i_xvport = p_vout->p_sys->i_xvport;
00113
00114 p_attrib = XvQueryPortAttributes( p_display, i_xvport, &i_attrib );
00115
00116 do
00117 {
00118 i_attrib--;
00119
00120 if( i_attrib >= 0 && !strcmp( p_attrib[ i_attrib ].name, attr_name ) )
00121 {
00122 int i_sv = f_value * ( p_attrib[ i_attrib ].max_value
00123 - p_attrib[ i_attrib ].min_value + 1 )
00124 + p_attrib[ i_attrib ].min_value;
00125
00126 XvSetPortAttribute( p_display, i_xvport,
00127 XInternAtom( p_display, attr_name, False ), i_sv );
00128 break;
00129 }
00130
00131 } while( i_attrib > 0 );
00132
00133 if( p_attrib )
00134 XFree( p_attrib );
00135 }
00136 #endif
00137