dnl Autoconf settings for vlc
-dnl $Id: configure.ac,v 1.109 2003/11/08 14:54:03 massiot Exp $
+dnl $Id: configure.ac,v 1.110 2003/11/08 18:23:40 titer Exp $
AC_INIT(vlc,0.6.3-cvs)
AX_ADD_LDFLAGS([vlc beos],[-lbe])
AX_ADD_LDFLAGS([beos],[-lmedia -ltranslation -ltracker -lgame])
- dnl Check for BONE presence
- AC_CHECK_LIB(socket, connect,
- AX_ADD_LDFLAGS([vlc ipv4 access_http access_mms access_udp access_ftp sap http access_output_udp],
- [-lbind]))
-
dnl Ugly check for Zeta
if test -f /boot/beos/system/lib/libzeta.so; then
AX_ADD_LDFLAGS([beos],[-lzeta])
AC_CHECK_FUNCS(send,,[
AC_CHECK_LIB(socket,send,[
- AX_ADD_LDFLAGS([access_http access_mms access_udp access_ftp sap http access_output_udp],[-lsocket])
+ AX_ADD_LDFLAGS([access_http access_mms access_udp access_ftp sap httpd access_output_udp stream_out_standard],[-lsocket])
])
])
* hotkeys.h: keycode defines
*****************************************************************************
* Copyright (C) 2003 VideoLAN
- * $Id: vlc_keys.h,v 1.6 2003/10/30 17:58:07 gbazin Exp $
+ * $Id: vlc_keys.h,v 1.7 2003/11/08 18:23:40 titer Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
#define ADD_KEY(a) { a, *a }
-static const struct key_descriptor_s modifiers[] =
+static const struct key_descriptor_s vlc_modifiers[] =
{
{ "Alt", KEY_MODIFIER_ALT },
{ "Shift", KEY_MODIFIER_SHIFT },
{ "Command", KEY_MODIFIER_COMMAND }
};
-static const struct key_descriptor_s keys[] =
+static const struct key_descriptor_s vlc_keys[] =
{
{ "Unset", KEY_UNSET },
{ "Left", KEY_LEFT },
static inline char *KeyToString( int i_key )
{
unsigned int i = 0;
- for ( i = 0; i < sizeof(keys) / sizeof(key_descriptor_t); i++ )
+ for ( i = 0; i < sizeof(vlc_keys) / sizeof(key_descriptor_t); i++ )
{
- if ( keys[i].i_key_code == i_key )
+ if ( vlc_keys[i].i_key_code == i_key )
{
- return keys[i].psz_key_string;
+ return vlc_keys[i].psz_key_string;
}
}
return NULL;
* vout_beos.cpp: beos video output display method
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: VideoOutput.cpp,v 1.24 2003/11/04 11:11:30 titer Exp $
+ * $Id: VideoOutput.cpp,v 1.25 2003/11/08 18:23:40 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#include <vlc/vlc.h>
#include <vlc/intf.h>
#include <vlc/vout.h>
+#include <vlc_keys.h>
#include "InterfaceWindow.h" // for load/save_settings()
#include "DrawingTidbits.h"
return window;
}
+static int ConvertKey( int key )
+{
+ switch( key )
+ {
+ case B_SPACE:
+ return KEY_SPACE;
+ }
+ return key;
+}
+
/*****************************************************************************
* get_interface_window
*****************************************************************************/
/*****************************************************************************
* VLCVIew::KeyDown
*****************************************************************************/
-void
-VLCView::KeyDown(const char *bytes, int32_t numBytes)
+void VLCView::KeyDown( const char *bytes, int32 numBytes )
{
- VideoWindow *videoWindow = dynamic_cast<VideoWindow*>(Window());
- BWindow* interfaceWindow = get_interface_window();
- if (videoWindow && numBytes > 0) {
- uint32_t mods = modifiers();
- switch (*bytes) {
- case B_TAB:
- case 'f':
- case 'F':
- // toggle window and full screen mode
- // not passing on the tab key to the default KeyDown()
- // implementation also avoids loosing the keyboard focus
- videoWindow->PostMessage(TOGGLE_FULL_SCREEN);
- break;
- case B_ESCAPE:
- // go back to window mode
- if (videoWindow->IsFullScreen())
- videoWindow->PostMessage(TOGGLE_FULL_SCREEN);
- break;
- case B_SPACE:
- // toggle playback
- if (interfaceWindow)
- interfaceWindow->PostMessage(PAUSE_PLAYBACK);
- break;
- case B_RIGHT_ARROW:
- if (interfaceWindow)
- {
- if (mods & B_SHIFT_KEY)
- // next title
- interfaceWindow->PostMessage(NEXT_TITLE);
- else
- // next chapter
- interfaceWindow->PostMessage(NEXT_CHAPTER);
- }
- break;
- case B_LEFT_ARROW:
- if (interfaceWindow)
- {
- if (mods & B_SHIFT_KEY)
- // previous title
- interfaceWindow->PostMessage(PREV_TITLE);
- else
- // previous chapter
- interfaceWindow->PostMessage(PREV_CHAPTER);
- }
- break;
- case B_UP_ARROW:
- // previous file in playlist
- interfaceWindow->PostMessage(PREV_FILE);
- break;
- case B_DOWN_ARROW:
- // next file in playlist
- interfaceWindow->PostMessage(NEXT_FILE);
- break;
- case B_PRINT_KEY:
- case 's':
- case 'S':
- videoWindow->PostMessage( SCREEN_SHOT );
- break;
- default:
- BView::KeyDown(bytes, numBytes);
- break;
- }
- }
+ VideoWindow * videoWindow = (VideoWindow *) Window();
+
+ if( !videoWindow || numBytes < 1 )
+ {
+ return;
+ }
+
+ uint32_t mods = modifiers();
+ vlc_value_t val;
+
+ val.i_int = 0;
+
+ switch( *bytes )
+ {
+ default:
+ val.i_int |= ConvertKey( *bytes );
+ var_Set( p_vout->p_vlc, "key-pressed", val );
+ break;
+ }
}
/*****************************************************************************
* VideoWindow.h: BeOS video window class prototype
*****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN
- * $Id: VideoWindow.h,v 1.8 2003/11/04 11:11:30 titer Exp $
+ * $Id: VideoWindow.h,v 1.9 2003/11/08 18:23:40 titer Exp $
*
* Authors: Jean-Marc Dressler <polux@via.ecp.fr>
* Tony Castley <tcastley@mail.powerup.com.au>
const BMessage* dragMessage);
virtual void Pulse();
virtual void Draw(BRect updateRect);
- virtual void KeyDown(const char* bytes, int32_t numBytes);
+ virtual void KeyDown(const char* bytes, int32 numBytes);
private:
vout_thread_t *p_vout;
* configuration.c management of the modules configuration
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: configuration.c,v 1.69 2003/11/05 18:59:01 gbazin Exp $
+ * $Id: configuration.c,v 1.70 2003/11/08 18:23:40 titer Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
char *psz_parser = strchr( psz_key, '-' );
while( psz_parser && psz_parser != psz_key )
{
- for( i = 0; i < sizeof(modifiers) / sizeof(key_descriptor_t); i++ )
+ for( i = 0; i < sizeof(vlc_modifiers) / sizeof(key_descriptor_t); i++ )
{
- if( !strncasecmp( modifiers[i].psz_key_string, psz_key,
- strlen( modifiers[i].psz_key_string ) ) )
+ if( !strncasecmp( vlc_modifiers[i].psz_key_string, psz_key,
+ strlen( vlc_modifiers[i].psz_key_string ) ) )
{
- i_key |= modifiers[i].i_key_code;
+ i_key |= vlc_modifiers[i].i_key_code;
}
}
psz_key = psz_parser + 1;
psz_parser = strchr( psz_key, '-' );
}
- for( i = 0; i < sizeof(keys) / sizeof( key_descriptor_t ); i++ )
+ for( i = 0; i < sizeof(vlc_keys) / sizeof( key_descriptor_t ); i++ )
{
- if( !strcasecmp( keys[i].psz_key_string, psz_key ) )
+ if( !strcasecmp( vlc_keys[i].psz_key_string, psz_key ) )
{
- i_key |= keys[i].i_key_code;
+ i_key |= vlc_keys[i].i_key_code;
break;
}
}
}
*psz_key = '\0';
p = psz_key;
- for( index = 0; index < (sizeof(modifiers) / sizeof(key_descriptor_t));
+ for( index = 0; index < (sizeof(vlc_modifiers) / sizeof(key_descriptor_t));
index++ )
{
- if( i_key & modifiers[index].i_key_code )
+ if( i_key & vlc_modifiers[index].i_key_code )
{
- p += sprintf( p, "%s-", modifiers[index].psz_key_string );
+ p += sprintf( p, "%s-", vlc_modifiers[index].psz_key_string );
}
}
- for( index = 0; index < (sizeof(keys) / sizeof( key_descriptor_t));
+ for( index = 0; index < (sizeof(vlc_keys) / sizeof( key_descriptor_t));
index++)
{
- if( (int)( i_key & ~KEY_MODIFIER ) == keys[index].i_key_code )
+ if( (int)( i_key & ~KEY_MODIFIER ) == vlc_keys[index].i_key_code )
{
- p += sprintf( p, "%s", keys[index].psz_key_string );
+ p += sprintf( p, "%s", vlc_keys[index].psz_key_string );
break;
}
}