Commit 3acf7af3 authored by Christophe Massiot's avatar Christophe Massiot

* ./plugins/macosx/vout_vlc_wrapper.m : Arrow-up and arrow-down allow to

  control the sound volume ;
* ./plugins/access/http.c : For streams which are not seekable, we fall
  back on old HTTP/1.0 behavior ; on systems implementing atoll() we
  can also read files > 2 GB ;
* ./configure : atoll() detection.
parent 14717c52
...@@ -3290,7 +3290,7 @@ fi ...@@ -3290,7 +3290,7 @@ fi
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`" save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 for ac_func in gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:3297: checking for $ac_func" >&5 echo "configure:3297: checking for $ac_func" >&5
......
...@@ -113,7 +113,7 @@ dnl The -DSYS_FOO flag ...@@ -113,7 +113,7 @@ dnl The -DSYS_FOO flag
save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`" save_CFLAGS="${save_CFLAGS} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"
dnl Check for system libs needed dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2) AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll)
AC_CHECK_FUNC(connect,,[ AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect, AC_CHECK_LIB(socket,connect,
......
...@@ -125,8 +125,9 @@ ...@@ -125,8 +125,9 @@
/* Volume */ /* Volume */
#define VOLUME_DEFAULT 256 #define VOLUME_DEFAULT 256
#define VOLUME_STEP 128 #define VOLUME_STEP 32
#define VOLUME_MAX 1024 #define VOLUME_MAX 1024
#define VOLUME_MIN 0
/* Number of audio output frames contained in an audio output fifo. /* Number of audio output frames contained in an audio output fifo.
* (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the * (AOUT_FIFO_SIZE + 1) must be a power of 2, in order to optimise the
......
/* include/defs.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* include/defs.h.in. Generated automatically from configure.in by autoheader. */
/* Define if using alloca.c. */ /* Define if using alloca.c. */
#undef C_ALLOCA #undef C_ALLOCA
...@@ -55,6 +55,9 @@ ...@@ -55,6 +55,9 @@
/* Define if you have the __argz_stringify function. */ /* Define if you have the __argz_stringify function. */
#undef HAVE___ARGZ_STRINGIFY #undef HAVE___ARGZ_STRINGIFY
/* Define if you have the atoll function. */
#undef HAVE_ATOLL
/* Define if you have the dcgettext function. */ /* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT #undef HAVE_DCGETTEXT
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in * http.c: HTTP access plug-in
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.10 2002/05/22 23:11:00 massiot Exp $ * $Id: http.c,v 1.10.2.1 2002/06/18 23:18:05 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -142,11 +142,21 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) ...@@ -142,11 +142,21 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
# define HTTP_USERAGENT "User-Agent: " COPYRIGHT_MESSAGE "\r\n" # define HTTP_USERAGENT "User-Agent: " COPYRIGHT_MESSAGE "\r\n"
# define HTTP_END "\r\n" # define HTTP_END "\r\n"
snprintf( psz_buffer, sizeof(psz_buffer), if ( p_input->stream.b_seekable )
"%s" {
"Range: bytes=%lld-\r\n" snprintf( psz_buffer, sizeof(psz_buffer),
HTTP_USERAGENT HTTP_END, "%s"
p_access_data->psz_buffer, i_tell ); "Range: bytes=%lld-\r\n"
HTTP_USERAGENT HTTP_END,
p_access_data->psz_buffer, i_tell );
}
else
{
snprintf( psz_buffer, sizeof(psz_buffer),
"%s"
HTTP_USERAGENT HTTP_END,
p_access_data->psz_buffer, i_tell );
}
psz_buffer[sizeof(psz_buffer) - 1] = '\0'; psz_buffer[sizeof(psz_buffer) - 1] = '\0';
/* Send GET ... */ /* Send GET ... */
...@@ -194,10 +204,15 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) ...@@ -194,10 +204,15 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
strlen("Content-Length: ") ) ) strlen("Content-Length: ") ) )
{ {
psz_parser += strlen("Content-Length: "); psz_parser += strlen("Content-Length: ");
/* FIXME : this won't work for 64-bit lengths */
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
#ifdef HAVE_ATOLL
p_input->stream.p_selected_area->i_size = atoll( psz_parser )
+ i_tell;
#else
/* FIXME : this won't work for 64-bit lengths */
p_input->stream.p_selected_area->i_size = atoi( psz_parser ) p_input->stream.p_selected_area->i_size = atoi( psz_parser )
+ i_tell; + i_tell;
#endif
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
} }
...@@ -393,7 +408,7 @@ static int HTTPOpen( input_thread_t * p_input ) ...@@ -393,7 +408,7 @@ static int HTTPOpen( input_thread_t * p_input )
p_access_data->socket_desc.i_server_port = i_proxy_port; p_access_data->socket_desc.i_server_port = i_proxy_port;
snprintf( p_access_data->psz_buffer, sizeof(p_access_data->psz_buffer), snprintf( p_access_data->psz_buffer, sizeof(p_access_data->psz_buffer),
"GET http://%s:%d/%s HTTP/1.1\r\n", "GET http://%s:%d/%s\r\n HTTP/1.0\r\n",
psz_server_addr, i_server_port, psz_path ); psz_server_addr, i_server_port, psz_path );
} }
else else
...@@ -414,14 +429,21 @@ static int HTTPOpen( input_thread_t * p_input ) ...@@ -414,14 +429,21 @@ static int HTTPOpen( input_thread_t * p_input )
vlc_mutex_lock( &p_input->stream.stream_lock ); vlc_mutex_lock( &p_input->stream.stream_lock );
p_input->stream.b_pace_control = 1; p_input->stream.b_pace_control = 1;
p_input->stream.b_seekable = 0; p_input->stream.b_seekable = 1;
p_input->stream.p_selected_area->i_tell = 0; p_input->stream.p_selected_area->i_tell = 0;
p_input->stream.p_selected_area->i_size = 0; p_input->stream.p_selected_area->i_size = 0;
p_input->stream.i_method = INPUT_METHOD_NETWORK; p_input->stream.i_method = INPUT_METHOD_NETWORK;
vlc_mutex_unlock( &p_input->stream.stream_lock ); vlc_mutex_unlock( &p_input->stream.stream_lock );
p_input->i_mtu = 0; p_input->i_mtu = 0;
return( HTTPConnect( p_input, 0 ) ); if( HTTPConnect( p_input, 0 ) )
{
char * psz_pos = strstr(p_access_data->psz_buffer, "HTTP/1.1");
p_input->stream.b_seekable = 0;
psz_pos[7] = 0;
return( HTTPConnect( p_input, 0 ) );
}
return 0;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf_vlc_wrapper.c: MacOS X plugin for vlc * intf_vlc_wrapper.c: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: intf_vlc_wrapper.m,v 1.6.2.7 2002/06/18 22:29:02 massiot Exp $ * $Id: intf_vlc_wrapper.m,v 1.6.2.8 2002/06/18 23:18:05 massiot Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -487,7 +487,6 @@ static Intf_VLCWrapper *o_intf = nil; ...@@ -487,7 +487,6 @@ static Intf_VLCWrapper *o_intf = nil;
while( ( o_file = (NSString *)[o_enum nextObject] ) ) while( ( o_file = (NSString *)[o_enum nextObject] ) )
{ {
intf_Msg("Meuuh !");
intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END, intf_PlaylistAdd( p_main->p_playlist, PLAYLIST_END,
[o_file fileSystemRepresentation] ); [o_file fileSystemRepresentation] );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vout_vlc_wrapper.c: MacOS X plugin for vlc * vout_vlc_wrapper.c: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: vout_vlc_wrapper.m,v 1.2.2.1 2002/06/01 23:41:41 massiot Exp $ * $Id: vout_vlc_wrapper.m,v 1.2.2.2 2002/06/18 23:18:05 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "video.h" #include "video.h"
#include "video_output.h" #include "video_output.h"
#include "audio_output.h"
#include "interface.h" #include "interface.h"
#include "intf_playlist.h" #include "intf_playlist.h"
...@@ -116,6 +117,24 @@ static Vout_VLCWrapper *o_vout = nil; ...@@ -116,6 +117,24 @@ static Vout_VLCWrapper *o_vout = nil;
switch( key ) switch( key )
{ {
case (unichar)0xf700: /* up-arrow */
if ( !p_main->p_intf->p_sys->b_mute
&& p_aout_bank->pp_aout[0]->i_volume + VOLUME_STEP
<= VOLUME_MAX )
{
p_aout_bank->pp_aout[0]->i_volume += VOLUME_STEP;
}
break;
case (unichar)0xf701: /* down-arrow */
if ( !p_main->p_intf->p_sys->b_mute
&& p_aout_bank->pp_aout[0]->i_volume - VOLUME_STEP
>= VOLUME_MIN )
{
p_aout_bank->pp_aout[0]->i_volume -= VOLUME_STEP;
}
break;
case 'f': case 'F': case 'f': case 'F':
p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE;
break; break;
......
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