macosx.m 5.37 KB
Newer Older
1
/*****************************************************************************
2
 * macosx.m: Mac OS X module for vlc
3
 *****************************************************************************
4
 * Copyright (C) 2001-2005 the VideoLAN team
5
 * $Id$
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
 *
 * Authors: Colin Delacroix <colin@zoy.org>
 *          Eugenio Jarosiewicz <ej0@cise.ufl.edu>
 *          Florian G. Pflug <fgp@phlo.org>
 *          Jon Lech Johansen <jon-vl@nanocrew.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
dionoea's avatar
dionoea committed
24
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
 *****************************************************************************/

/*****************************************************************************
 * Preamble
 *****************************************************************************/
#include <stdlib.h>                                      /* malloc(), free() */
#include <string.h>

#include <vlc/vlc.h>

/*****************************************************************************
 * External prototypes
 *****************************************************************************/
int  E_(OpenIntf)     ( vlc_object_t * );
void E_(CloseIntf)    ( vlc_object_t * );

Eric Petit's avatar
Eric Petit committed
41 42 43 44 45
int  E_(OpenVideoQT)  ( vlc_object_t * );
void E_(CloseVideoQT) ( vlc_object_t * );

int  E_(OpenVideoGL)  ( vlc_object_t * );
void E_(CloseVideoGL) ( vlc_object_t * );
46 47 48 49

/*****************************************************************************
 * Module descriptor
 *****************************************************************************/
50 51 52
#define EMBEDDED_TEXT N_("Embedded video output")
#define EMBEDDED_LONGTEXT N_("If enabled the video output will " \
    "be displayed in the controller window instead of a in separate window.")
53

Christophe Massiot's avatar
Christophe Massiot committed
54
#define VDEV_TEXT N_("Video device")
55 56 57
#define VDEV_LONGTEXT N_("Number of the screen to use by default to display " \
    "videos in 'fullscreen'. The screen number correspondance can be found in "\
    "the video device selection menu.")
58

Christophe Massiot's avatar
Christophe Massiot committed
59
#define OPAQUENESS_TEXT N_("Opaqueness")
60 61 62
#define OPAQUENESS_LONGTEXT N_( \
    "Set the transparency of the video output. 1 is non-transparent (default) " \
    "0 is fully transparent.")
hartman's avatar
hartman committed
63
    
64
#define STRETCH_TEXT N_("Stretch video to fill window")
65 66 67
#define STRETCH_LONGTEXT N_("Stretch the video to fill the entire window when "\
        "resizing the video instead of keeping the aspect ratio and "\
        "displaying black borders.")
68

69
#define FILL_TEXT N_("Crop borders in fullscreen")
Eric Petit's avatar
Eric Petit committed
70
#define FILL_LONGTEXT N_("In fullscreen mode, crop the picture if " \
71
        "necessary in order to fill the screen without black " \
Eric Petit's avatar
Eric Petit committed
72
        "borders (OpenGL only)." )
73 74

#define BLACK_TEXT N_("Black screens in fullscreen")
75 76
#define BLACK_LONGTEXT N_("In fullscreen mode, keep screen where there is no " \
        "video displayed black" )
77

78 79
#define BACKGROUND_TEXT N_("Use as Desktop Background")
#define BACKGROUND_LONGTEXT N_("Use the video as the Desktop Background " \
80
        "Desktop icons cannot be interacted with in this mode." )
81
        
82 83 84
#define WIZARD_OPTIONS_SAVING_TEXT N_("Remember wizard options")
#define WIZARD_OPTIONS_SAVING_LONGTEXT N_("Remember the options in the " \
        "wizard during one session of VLC.") 
Eric Petit's avatar
Eric Petit committed
85

86
vlc_module_begin();
hartman's avatar
hartman committed
87
    set_description( _("Mac OS X interface") );
gbazin's avatar
 
gbazin committed
88 89
    set_capability( "interface", 100 );
    set_callbacks( E_(OpenIntf), E_(CloseIntf) );
zorglub's avatar
zorglub committed
90
    set_category( CAT_INTERFACE );
zorglub's avatar
zorglub committed
91
    set_subcategory( SUBCAT_INTERFACE_MAIN );
92 93
    add_bool( "macosx-embedded", 1, NULL, EMBEDDED_TEXT, EMBEDDED_LONGTEXT,
                     VLC_FALSE );
94 95
    add_bool( "macosx-wizard-keep", 1, NULL, WIZARD_OPTIONS_SAVING_TEXT,
                WIZARD_OPTIONS_SAVING_LONGTEXT, VLC_TRUE );
96

97
    add_submodule();
hartman's avatar
hartman committed
98
        set_description( _("Quartz video") );
Eric Petit's avatar
Eric Petit committed
99
        set_capability( "video output", 100 );
100 101
        set_category( CAT_VIDEO);
        set_subcategory( SUBCAT_VIDEO_VOUT );
Eric Petit's avatar
Eric Petit committed
102
        set_callbacks( E_(OpenVideoQT), E_(CloseVideoQT) );
103

104 105
        add_integer( "macosx-vdev", 0, NULL, VDEV_TEXT, VDEV_LONGTEXT,
                     VLC_FALSE );
hartman's avatar
hartman committed
106 107
        add_bool( "macosx-stretch", 0, NULL, STRETCH_TEXT, STRETCH_LONGTEXT,
                     VLC_FALSE );
108 109
        add_float_with_range( "macosx-opaqueness", 1, 0, 1, NULL,
                OPAQUENESS_TEXT, OPAQUENESS_LONGTEXT, VLC_TRUE );
110 111
        add_bool( "macosx-black", 0, NULL, BLACK_TEXT, BLACK_LONGTEXT,
                  VLC_TRUE );
Eric Petit's avatar
Eric Petit committed
112 113
        add_bool( "macosx-fill", 0, NULL, FILL_TEXT, FILL_LONGTEXT,
                  VLC_TRUE );
114 115
        add_bool( "macosx-background", 0, NULL, BACKGROUND_TEXT, BACKGROUND_LONGTEXT,
                     VLC_FALSE );
Eric Petit's avatar
Eric Petit committed
116
    add_submodule();
117
        set_description( "Mac OS X OpenGL" );
Eric Petit's avatar
Eric Petit committed
118
        set_capability( "opengl provider", 100 );
119 120
        set_category( CAT_VIDEO);
        set_subcategory( SUBCAT_VIDEO_VOUT );
Eric Petit's avatar
Eric Petit committed
121
        set_callbacks( E_(OpenVideoGL), E_(CloseVideoGL) );
122 123
vlc_module_end();