*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
#include <string.h> /* strerror() */
#include <vlc/vlc.h>
-#include <vlc/intf.h>
-#include <vlc/vout.h>
-#include <vlc/aout.h>
+#include <vlc_interface.h>
+#include <vlc_vout.h>
+#include <vlc_aout.h>
#include <sys/types.h>
#ifndef WIN32
#include SDL_INCLUDE_FILE
-#define SDL_MAX_DIRECTBUFFERS 10
+/* SDL is not able to crop overlays - so use only 1 direct buffer */
+#define SDL_MAX_DIRECTBUFFERS 1
#define SDL_DEFAULT_BPP 16
/*****************************************************************************
add_shortcut( "sdl" );
set_callbacks( Open, Close );
/* XXX: check for conflicts with the SDL audio output */
- var_Create( p_module->p_libvlc, "sdl", VLC_VAR_MUTEX );
+ var_Create( p_module->p_libvlc_global, "sdl", VLC_VAR_MUTEX );
#if defined( __i386__ ) || defined( __x86_64__ )
/* On i386, SDL is linked against svgalib */
linked_with_a_crap_library_which_uses_atexit();
char *psz_method;
#endif
- var_Get( p_this->p_libvlc, "sdl", &lockval );
+ var_Get( p_this->p_libvlc_global, "sdl", &lockval );
vlc_mutex_lock( lockval.p_address );
if( SDL_WasInit( SDL_INIT_VIDEO ) != 0 )
{
SDL_Event event; /* SDL event */
vlc_value_t val;
- int i_width, i_height, i_x, i_y;
+ unsigned int i_width, i_height, i_x, i_y;
/* Process events */
while( SDL_PollEvent(&event) )
break;
case SDL_QUIT:
- p_vout->p_vlc->b_die = 1;
+ p_vout->p_libvlc->b_die = 1;
break;
case SDL_KEYDOWN: /* if a key is pressed */
}
else
{
- p_vout->p_vlc->b_die = 1;
+ p_vout->p_libvlc->b_die = 1;
}
break;
case SDLK_q: /* quit */
- p_vout->p_vlc->b_die = 1;
+ p_vout->p_libvlc->b_die = 1;
break;
case SDLK_f: /* switch to fullscreen */
*****************************************************************************/
static void Display( vout_thread_t *p_vout, picture_t *p_pic )
{
- int x, y, w, h;
+ unsigned int x, y, w, h;
SDL_Rect disp;
vout_PlacePicture( p_vout, p_vout->p_sys->i_width, p_vout->p_sys->i_height,
/* Set palette */
if( SDL_SetColors( p_vout->p_sys->p_display, colors, 0, 256 ) == 0 )
{
- msg_Err( p_vout, "failed setting palette" );
+ msg_Err( p_vout, "failed to set palette" );
}
}