Commit 7ac430f6 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* End of backports:

  [16483],[16485],[16488],[16492],[16493],[16495],[16496],[16503],[16507],[16526],[16536]-[16538],[16545],[16558],[16562]-[16566]

  skipped:
  play-and-exit 16489
  seamonkeyconfig 507
  intermediate state 513,514,515,517,519
  opencv: 533
  mozilla: 516
  dscp
  network rewrites: 546-552,577,578
  duration calculation: 540,541

  To Do:
  - Finish the plugin backports: Quovodis
  - Check skins2 (ipkiss? )
  - Fix the .nibs
  - Check stability

  I advise everyone who has done some work lately, to check their 'own' areas, i might have missed something important. 
parent 542c814a
......@@ -60,6 +60,7 @@ Eurodata Computer Club <retron.info> - VLC icon design (v0.8.4)
François Seingier <francois.seingier at club-internet.fr> - TTL setting in the wx stream output dialog
Frank Chao <frank0624 at gmail.com> - Chinese Traditional translation
Fumio Nakayama <endymion at ca2.so-net.ne.jp> - Japanese translation
Georgi Chorbadzhiyski <gf at unixsol dot org> - HTTP access error handling fix
Greg Farrell <greg at gregfarell dot org> - rc interface "enqueue" command
Gregory Hazel <ghazel at gmail dot com> - wxWidgets fixes and improvements
Goetz Waschk <waschk at informatik.uni-rostock dot de> - Mandrake packages
......
......@@ -4919,15 +4919,15 @@ AC_ARG_ENABLE(gnutls,
[ --enable-gnutls gnutls TLS/SSL support (default enabled)])
AS_IF([test "${enable_gnutls}" != "no"], [
PKG_CHECK_EXISTS([gnutls >= 1.0.17], [have_gnutls="yes"], [have_gnutls="no"])
PKG_CHECK_MODULES(GNUTLS, [gnutls >= 1.2.9], [have_gnutls="yes"], [have_gnutls="no"])
AS_IF([test "${have_gnutls}" = "yes"], [
VLC_ADD_PLUGINS([gnutls])
VLC_ADD_CFLAGS([gnutls], [$("${PKG_CONFIG}" --cflags gnutls)])
VLC_ADD_LDFLAGS([gnutls], [$("${PKG_CONFIG}" --libs gnutls)])
VLC_ADD_CFLAGS([gnutls], [$GNUTLS_CFLAGS])
VLC_ADD_LDFLAGS([gnutls], [$GNUTLS_LIBS])
], [
AS_IF([test "${enable_gnutls}" = "yes"], [
AC_MSG_ERROR([gnutls not present or too old (version 1.0.17 required)])
AC_MSG_ERROR([gnutls not present or too old (version 1.2.9 required)])
])
])
])
......
......@@ -104,7 +104,7 @@ VLC_EXPORT( subpicture_region_t *,__spu_MakeRegion, ( vlc_object_t *, video_form
#define spu_DestroyRegion(a,b) __spu_DestroyRegion(VLC_OBJECT(a),b)
VLC_EXPORT( void, __spu_DestroyRegion, ( vlc_object_t *, subpicture_region_t * ) );
VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t ) );
VLC_EXPORT( subpicture_t *, spu_SortSubpictures, ( spu_t *, mtime_t, vlc_bool_t ) );
VLC_EXPORT( void, spu_RenderSubpictures, ( spu_t *, video_format_t *, picture_t *, picture_t *, subpicture_t *, int, int ) );
/** @}*/
......
......@@ -323,7 +323,7 @@ struct module_symbols_t
subpicture_region_t * (*__spu_CreateRegion_inner) (vlc_object_t *, video_format_t *);
subpicture_region_t * (*__spu_MakeRegion_inner) (vlc_object_t *, video_format_t *, picture_t *);
void (*__spu_DestroyRegion_inner) (vlc_object_t *, subpicture_region_t *);
subpicture_t * (*spu_SortSubpictures_inner) (spu_t *, mtime_t);
subpicture_t * (*spu_SortSubpictures_inner) (spu_t *, mtime_t, vlc_bool_t);
void (*spu_RenderSubpictures_inner) (spu_t *, video_format_t *, picture_t *, picture_t *, subpicture_t *, int, int);
char * (*stream_ReadLine_inner) (stream_t *);
stream_t * (*__stream_DemuxNew_inner) (vlc_object_t *p_obj, char *psz_demux, es_out_t *out);
......
......@@ -246,6 +246,8 @@ struct subpicture_t
vlc_bool_t b_ephemer; /**< If this flag is set to true the subtitle
will be displayed untill the next one appear */
vlc_bool_t b_fade; /**< enable fading */
vlc_bool_t b_pausable; /**< subpicture will be paused if
stream is paused */
/**@}*/
subpicture_region_t *p_region; /**< region list composing this subtitle */
......
......@@ -63,7 +63,7 @@ vlc_module_begin();
CACHING_TEXT, CACHING_LONGTEXT, VLC_TRUE );
add_string( "ftp-user", "anonymous", NULL, USER_TEXT, USER_LONGTEXT,
VLC_FALSE );
add_string( "ftp-pwd", "anonymous@dummy.org", NULL, PASS_TEXT,
add_string( "ftp-pwd", "anonymous@example.com", NULL, PASS_TEXT,
PASS_LONGTEXT, VLC_FALSE );
add_string( "ftp-account", "anonymous", NULL, ACCOUNT_TEXT,
ACCOUNT_LONGTEXT, VLC_FALSE );
......
......@@ -497,8 +497,9 @@ static int Read( access_t *p_access, uint8_t *p_buffer, int i_len )
/* read the chunk header */
if( psz == NULL )
{
/* fatal error - end of file */
msg_Dbg( p_access, "failed reading chunk-header line" );
return -1;
return 0;
}
p_sys->i_chunk = strtoll( psz, NULL, 16 );
free( psz );
......
......@@ -496,6 +496,8 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
p_spu->b_pausable = VLC_TRUE;
p_spu->i_x = p_sys->i_x_start;
p_spu->i_x = p_spu->i_x * 3 / 4; /* FIXME: use aspect ratio for x? */
p_spu->i_y = p_sys->i_y_start;
......
......@@ -71,6 +71,8 @@ subpicture_t * E_(ParsePacket)( decoder_t *p_dec )
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
p_spu->b_pausable = VLC_TRUE;
/* Rationale for the "p_spudec->i_rle_size * 4": we are going to
* expand the RLE stuff so that we won't need to read nibbles later
* on. This will speed things up a lot. Plus, we'll only need to do
......
......@@ -381,6 +381,8 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
return NULL;
}
p_spu->b_pausable = VLC_TRUE;
/* Create a new subpicture region */
memset( &fmt, 0, sizeof(video_format_t) );
fmt.i_chroma = VLC_FOURCC('T','E','X','T');
......
......@@ -466,6 +466,8 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
p_spu = p_dec->pf_spu_buffer_new( p_dec );
if( !p_spu ) return NULL;
p_spu->b_pausable = VLC_TRUE;
p_spu->i_x = p_sys->i_x_start;
p_spu->i_y = p_sys->i_y_start;
p_spu->i_start = p_data->i_pts;
......
......@@ -32,7 +32,7 @@ orbittypelib_DATA = MediaControl.so
orbittypelib_CFLAGS=`$(VLC_CONFIG) --cflags plugin corba`
orbittypelib_LIBS=`$(VLC_CONFIG) --libs plugin corba`
ORBIT_IDL=$(shell pkg-config --variable=orbit_idl ORBit-2.0)
ORBIT_IDL=`$(PKG_CONFIG) --variable=orbit_idl ORBit-2.0`
## MediaControl.so rules
MediaControl-imodule.o: MediaControl-imodule.c
......
......@@ -95,6 +95,8 @@ static int Volume ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int VolumeMove ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int VideoConfig ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int AudioConfig ( vlc_object_t *, char const *,
vlc_value_t, vlc_value_t, void * );
static int Menu ( vlc_object_t *, char const *,
......@@ -504,6 +506,14 @@ static void RegisterCallbacks( intf_thread_t *p_intf )
var_Create( p_intf, "strack", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "strack", Input, NULL );
/* video commands */
var_Create( p_intf, "vratio", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "vratio", VideoConfig, NULL );
var_Create( p_intf, "vcrop", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "vcrop", VideoConfig, NULL );
var_Create( p_intf, "vzoom", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "vzoom", VideoConfig, NULL );
/* audio commands */
var_Create( p_intf, "volume", VLC_VAR_STRING | VLC_VAR_ISCOMMAND );
var_AddCallback( p_intf, "volume", Volume, NULL );
......@@ -928,6 +938,9 @@ static void Help( intf_thread_t *p_intf, vlc_bool_t b_longhelp)
msg_rc(_("| achan [X]. . . . . . . . set/get audio channels"));
msg_rc(_("| atrack [X] . . . . . . . . . set/get audio track"));
msg_rc(_("| vtrack [X] . . . . . . . . . set/get video track"));
msg_rc(_("| vratio [X] . . . . . set/get video aspect ratio"));
msg_rc(_("| vcrop [X] . . . . . . . . . set/get video crop"));
msg_rc(_("| vzoom [X] . . . . . . . . . set/get video zoom"));
msg_rc(_("| strack [X] . . . . . . . set/get subtitles track"));
msg_rc(_("| menu [on|off|up|down|left|right|select] use menu"));
msg_rc( "| ");
......@@ -1927,6 +1940,126 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd,
return i_error;
}
static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
intf_thread_t *p_intf = (intf_thread_t*)p_this;
input_thread_t *p_input = NULL;
vout_thread_t * p_vout;
const char * psz_variable;
vlc_value_t val_name;
int i_error;
p_input = vlc_object_find( p_this, VLC_OBJECT_INPUT, FIND_ANYWHERE );
if( !p_input )
return VLC_ENOOBJ;
p_vout = vlc_object_find( p_input, VLC_OBJECT_VOUT, FIND_CHILD );
vlc_object_release( p_input );
if( !p_vout )
return VLC_ENOOBJ;
if( !strcmp( psz_cmd, "vcrop" ) )
{
psz_variable = "crop";
}
else if( !strcmp( psz_cmd, "vratio" ) )
{
psz_variable = "aspect-ratio";
}
else /* if( !strcmp( psz_cmd, "vzoom" ) ) */
{
psz_variable = "zoom";
}
/* Get the descriptive name of the variable */
var_Change( p_vout, psz_variable, VLC_VAR_GETTEXT,
&val_name, NULL );
if( !val_name.psz_string ) val_name.psz_string = strdup(psz_variable);
if( newval.psz_string && *newval.psz_string )
{
/* set */
if( !strcmp( psz_variable, "zoom" ) )
{
vlc_value_t val;
val.f_float = atof( newval.psz_string );
i_error = var_Set( p_vout, psz_variable, val );
}
else
{
i_error = var_Set( p_vout, psz_variable, newval );
}
}
else
{
/* get */
vlc_value_t val, text;
int i;
float f_value;
char *psz_value = NULL;
if ( var_Get( p_vout, psz_variable, &val ) < 0 )
{
vlc_object_release( p_vout );
return VLC_EGENERIC;
}
if( !strcmp( psz_variable, "zoom" ) )
{
f_value = val.f_float;
}
else
{
psz_value = strdup( val.psz_string );
}
if ( var_Change( p_vout, psz_variable,
VLC_VAR_GETLIST, &val, &text ) < 0 )
{
vlc_object_release( p_vout );
return VLC_EGENERIC;
}
msg_rc( "+----[ %s ]", val_name.psz_string );
if( !strcmp( psz_variable, "zoom" ) )
{
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( f_value == val.p_list->p_values[i].f_float )
msg_rc( "| %f - %s *", val.p_list->p_values[i].f_float,
text.p_list->p_values[i].psz_string );
else
msg_rc( "| %f - %s", val.p_list->p_values[i].f_float,
text.p_list->p_values[i].psz_string );
}
}
else
{
for ( i = 0; i < val.p_list->i_count; i++ )
{
if ( !strcmp( psz_value, val.p_list->p_values[i].psz_string ) )
msg_rc( "| %s - %s *", val.p_list->p_values[i].psz_string,
text.p_list->p_values[i].psz_string );
else
msg_rc( "| %s - %s", val.p_list->p_values[i].psz_string,
text.p_list->p_values[i].psz_string );
}
free( psz_value );
}
var_Change( p_vout, psz_variable, VLC_VAR_FREELIST,
&val, &text );
msg_rc( "+----[ end of %s ]", val_name.psz_string );
if( val_name.psz_string ) free( val_name.psz_string );
i_error = VLC_SUCCESS;
}
vlc_object_release( p_vout );
return i_error;
}
static int AudioConfig( vlc_object_t *p_this, char const *psz_cmd,
vlc_value_t oldval, vlc_value_t newval, void *p_data )
{
......
......@@ -161,10 +161,12 @@
if( val.b_bool )
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Random On" ) );
config_PutInt( p_playlist, "random", 1 );
}
else
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Random Off" ) );
config_PutInt( p_playlist, "random", 0 );
}
p_intf->p_sys->b_playmode_update = VLC_TRUE;
......@@ -193,12 +195,14 @@
if( val.b_bool )
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat One" ) );
config_PutInt( p_playlist, "repeat", 1 );
}
else
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
config_PutInt( p_playlist, "repeat", 0 );
}
p_intf->p_sys->b_playmode_update = VLC_TRUE;
p_intf->p_sys->b_intf_update = VLC_TRUE;
vlc_object_release( p_playlist );
......@@ -225,10 +229,12 @@
if( val.b_bool )
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat All" ) );
config_PutInt( p_playlist, "loop", 1 );
}
else
{
vout_OSDMessage( p_intf, DEFAULT_CHAN, _( "Repeat Off" ) );
config_PutInt( p_playlist, "loop", 0 );
}
p_intf->p_sys->b_playmode_update = VLC_TRUE;
......
......@@ -174,6 +174,7 @@ int VideoAutoMenuBuilder( vlc_object_t *p_object, vector<int> &ri_objects,
FIND_PARENT );
if( p_dec_obj != NULL )
{
vlc_object_t *p_object = p_dec_obj;
PUSH_VAR( "ffmpeg-pp-q" );
vlc_object_release( p_dec_obj );
}
......
......@@ -21,17 +21,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*
* TODO:
* - fix FIXMEs
*/
/*****************************************************************************
* Preamble
*****************************************************************************/
#include <stdlib.h>
#include <errno.h>
#include <time.h>
#include <vlc/vlc.h>
#include <sys/types.h>
......@@ -305,56 +300,127 @@ gnutls_VerifyHostname( vlc_object_t *p_this, gnutls_session session,
return 0;
}
typedef struct
{
int flag;
const char *msg;
} error_msg_t;
static const error_msg_t cert_errors[] =
{
{ GNUTLS_CERT_INVALID,
"Certificate could not be verified" },
{ GNUTLS_CERT_REVOKED,
"Certificate was revoked" },
{ GNUTLS_CERT_SIGNER_NOT_FOUND,
"Certificate's signer was not found" },
{ GNUTLS_CERT_SIGNER_NOT_CA,
"Certificate's signer is not a CA" },
{ GNUTLS_CERT_INSECURE_ALGORITHM,
"Insecure certificate signature algorithm" },
{ 0, NULL }
};
static int
gnutls_HandshakeAndValidate( tls_session_t *p_session )
gnutls_HandshakeAndValidate( tls_session_t *session )
{
int val;
int val = gnutls_ContinueHandshake( session );
if( val )
return val;
val = gnutls_ContinueHandshake( p_session );
if( val == 0 )
{
unsigned status;
tls_session_sys_t *p_sys;
tls_session_sys_t *p_sys = (tls_session_sys_t *)(session->p_sys);
p_sys = (tls_session_sys_t *)(p_session->p_sys);
/* certificates chain verification */
val = gnutls_certificate_verify_peers2( p_sys->session, &status );
/* certificates chain verification */
unsigned status;
val = gnutls_certificate_verify_peers2( p_sys->session, &status );
if( val )
{
msg_Err( session, "Certificate verification failed: %s",
gnutls_strerror( val ) );
goto error;
}
if( val )
if( status )
{
msg_Err( session, "TLS session: access denied" );
for( const error_msg_t *e = cert_errors; e->flag; e++ )
{
msg_Err( p_session, "TLS certificate verification failed: %s",
gnutls_strerror( val ) );
p_session->pf_close( p_session );
return -1;
if( status & e->flag )
{
msg_Err( session, e->msg );
status &= ~e->flag;
}
}
if( status )
{
msg_Warn( p_session, "TLS session: access denied" );
if( status & GNUTLS_CERT_INVALID )
msg_Dbg( p_session, "certificate could not be verified" );
if( status & GNUTLS_CERT_REVOKED )
msg_Dbg( p_session, "certificate was revoked" );
if( status & GNUTLS_CERT_SIGNER_NOT_FOUND )
msg_Dbg( p_session, "certificate's signer was not found" );
if( status & GNUTLS_CERT_SIGNER_NOT_CA )
msg_Dbg( p_session, "certificate's signer is not a CA" );
p_session->pf_close( p_session );
return -1;
}
msg_Err( session,
"unknown certificate error (you found a bug in VLC)" );
goto error;
}
/* certificate (host)name verification */
const gnutls_datum *data = gnutls_certificate_get_peers( p_sys->session,
&(size_t){ 0 } );
if( data == NULL )
{
msg_Err( session, "Peer certificate not available" );
goto error;
}
gnutls_x509_crt cert;
val = gnutls_x509_crt_init( &cert );
if( val )
{
msg_Err( session, "x509 fatal error: %s", gnutls_strerror( val ) );
goto error;
}
msg_Dbg( p_session, "TLS certificate verified" );
if( ( p_sys->psz_hostname != NULL )
&& gnutls_VerifyHostname( (vlc_object_t *)p_session, p_sys->session,
p_sys->psz_hostname ) )
val = gnutls_x509_crt_import( cert, data, GNUTLS_X509_FMT_DER );
if( val )
{
msg_Err( session, "Certificate import error: %s",
gnutls_strerror( val ) );
gnutls_x509_crt_deinit( cert );
goto crt_error;
}
if( p_sys->psz_hostname != NULL )
{
if ( !gnutls_x509_crt_check_hostname( cert, p_sys->psz_hostname ) )
{
p_session->pf_close( p_session );
return -1;
msg_Err( session, "Certificate does not match \"%s\"",
p_sys->psz_hostname );
goto crt_error;
}
return 0;
}
else
msg_Warn( session, "Certificate and hostname were not verified" );
if( gnutls_x509_crt_get_expiration_time( cert ) < time( NULL ) )
{
msg_Err( session, "Certificate expired" );
goto crt_error;
}
return val;
if( gnutls_x509_crt_get_activation_time( cert ) > time ( NULL ) )
{
msg_Err( session, "Certificate not yet valid" );
goto crt_error;
}
gnutls_x509_crt_deinit( cert );
msg_Dbg( session, "TLS/x509 certificate verified" );
return 0;
crt_error:
gnutls_x509_crt_deinit( cert );
error:
session->pf_close( session );
return -1;
}
/**
......@@ -1009,7 +1075,6 @@ gnutls_ServerCreate( tls_t *p_tls, const char *psz_cert_path,
/* No certificate validation by default */
p_sys->pf_handshake2 = gnutls_ContinueHandshake;
/* FIXME: check for errors */
vlc_mutex_init( p_server, &p_sys->cache_lock );
/* Sets server's credentials */
......@@ -1069,10 +1134,16 @@ error:
}
#ifdef LIBVLC_USE_PTHREAD
GCRY_THREAD_OPTION_PTHREAD_IMPL;
# define gcry_threads_vlc gcry_threads_pthread
#else
/**
* gcrypt thread option VLC implementation
*/
vlc_object_t *__p_gcry_data;
# define NEED_THREAD_CONTEXT 1
static vlc_object_t *__p_gcry_data;
static int gcry_vlc_mutex_init( void **p_sys )
{
......@@ -1119,6 +1190,7 @@ static struct gcry_thread_cbs gcry_threads_vlc =
gcry_vlc_mutex_lock,
gcry_vlc_mutex_unlock
};
#endif
/*****************************************************************************
......@@ -1141,9 +1213,9 @@ Open( vlc_object_t *p_this )
if( count.i_int == 0)
{
const char *psz_version;
#ifdef NEED_THREAD_CONTEXT
__p_gcry_data = VLC_OBJECT( p_this->p_vlc );
#endif
gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_vlc);
if( gnutls_global_init( ) )
......@@ -1152,11 +1224,8 @@ Open( vlc_object_t *p_this )
vlc_mutex_unlock( lock.p_address );
return VLC_EGENERIC;
}
/*
* FIXME: in fact, we currently depends on 1.0.17, but it breaks on
* Debian which as a patched 1.0.16 (which we can use).
*/
psz_version = gnutls_check_version( "1.0.16" );
const char *psz_version = gnutls_check_version( "1.2.9" );
if( psz_version == NULL )
{
gnutls_global_deinit( );
......
......@@ -1193,9 +1193,9 @@ static char *SDPGenerate( const vod_media_t *p_media, httpd_client_t *cl )
sizeof( "i=*\r\n" ) + strlen( p_media->psz_session_description ) +
sizeof( "u=*\r\n" ) + strlen( p_media->psz_session_url ) +
sizeof( "e=*\r\n" ) + strlen( p_media->psz_session_email ) +
sizeof( "c=IN IP4 0.0.0.0\r\n" ) + 20 + 10 +
sizeof( "t=0 0\r\n" ) + /* FIXME */
sizeof( "a=tool:"PACKAGE_STRING"\r\n" ) +
sizeof( "c=IN IP4 0.0.0.0\r\n" ) + 20 + 10 +
sizeof( "a=range:npt=0-1000000000.000\r\n" );
psz_control = (ipv == '6') ? p_media->psz_rtsp_control_v6
......@@ -1231,11 +1231,10 @@ static char *SDPGenerate( const vod_media_t *p_media, httpd_client_t *cl )
if( *p_media->psz_session_email )
p += sprintf( p, "e=%s\r\n", p_media->psz_session_email );
p += sprintf( p, "c=IN IP%c %s\r\n", ipv, ipv == '6' ? "::" : "0.0.0.0" );
p += sprintf( p, "t=0 0\r\n" ); /* FIXME */
p += sprintf( p, "a=tool:"PACKAGE_STRING"\r\n" );
p += sprintf( p, "c=IN IP%c %s\r\n", ipv, ipv == '6' ? "::" : "0.0.0.0" );
if( p_media->i_length > 0 )
{
lldiv_t d = lldiv( p_media->i_length / 1000, 1000 );
......
......@@ -524,17 +524,11 @@ static int Open( vlc_object_t *p_this )
}
/* create the SDP for a muxed stream (only once) */
/* FIXME http://www.faqs.org/rfcs/rfc2327.html
All text fields should be UTF-8 encoded. Use global a:charset to announce this.
/* FIXME http://www.faqs.org/rfcs/rfc4566.html
o= - should be local username (no spaces allowed)
o= time should be hashed with some other value to garantue uniqueness
o= we need IP6 support?
o= time should be hashed with some other value to garantee uniqueness
o= don't use the localhost address. use fully qualified domain name or IP4 address
p= international phone number (pass via vars?)
c= IP6 support
a= recvonly (missing)
a= type:broadcast (missing)
a= charset: (normally charset should be UTF-8, this can be used to override s= and i=)
a= source-filter: we need our source address
a= x-plgroup: (missing)
RTP packets need to get the correct src IP address */
if( net_AddressIsMulticast( (vlc_object_t *)p_stream, p_sys->psz_destination ) )
......@@ -555,9 +549,11 @@ static int Open( vlc_object_t *p_this )
"i=%s\r\n"
"u=%s\r\n"
"e=%s\r\n"
"c=IN IP%c %s%s\r\n"
"t=0 0\r\n" /* permanent stream */ /* when scheduled from vlm, we should set this info correctly */
"a=tool:"PACKAGE_STRING"\r\n"
"c=IN IP%c %s%s\r\n"
"a=recvonly\r\n"
"a=type:broadcast\r\n"
"m=video %d RTP/AVP %d\r\n"
"a=rtpmap:%d %s\r\n",
p_sys->i_sdp_id, p_sys->i_sdp_version,
......
......@@ -2237,7 +2237,8 @@ static int transcode_video_process( sout_stream_t *p_stream,
/* Check if we have a subpicture to overlay */
if( p_sys->p_spu )
{
p_subpic = spu_SortSubpictures( p_sys->p_spu, p_pic->date );
p_subpic = spu_SortSubpictures( p_sys->p_spu, p_pic->date,
VLC_FALSE /* Fixme: check if stream is paused */ );
/* TODO: get another pic */
}
......@@ -2812,7 +2813,7 @@ static int transcode_osd_process( sout_stream_t *p_stream,
/* Check if we have a subpicture to send */
if( p_sys->p_spu && in->i_dts > 0)
{
p_subpic = spu_SortSubpictures( p_sys->p_spu, in->i_dts );
p_subpic = spu_SortSubpictures( p_sys->p_spu, in->i_dts, VLC_FALSE );
}
else
{
......
......@@ -256,7 +256,9 @@ DIST_applications = \
applications/vlc.desktop \
$(NULL)
skins2/%.vlt:
skins2/default.vlt:
mkdir -p skins2
tar cvvzf $@ --exclude .svn -C $(srcdir)/skins2 $*/
tar cvvzf skins2/default.vlt --exclude .svn -C $(srcdir)/skins2 default/
.PHONY: $(nobase_pkgdata_DATA)
......@@ -585,6 +585,8 @@ static char *CheckUTF8( char *str, char rep )
{
unsigned char *ptr, c;
assert (str != NULL);
ptr = (unsigned char *)str;
while( (c = *ptr) != '\0' )
{
......
......@@ -622,6 +622,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
httpd_message_t *query )
{
httpd_redirect_t *rdir = (httpd_redirect_t*)p_sys;
char *p_body;
if( answer == NULL || query == NULL )
{
......@@ -633,7 +634,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
answer->i_status = 301;
answer->psz_status = strdup( "Moved Permanently" );
answer->i_body = asprintf( (char **)&answer->p_body,
answer->i_body = asprintf( &p_body,
"<?xml version=\"1.0\" encoding=\"ascii\" ?>\n"
"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" "
"\"http://www.w3.org/TR/xhtml10/DTD/xhtml10strict.dtd\">\n"
......@@ -649,6 +650,7 @@ static int httpd_RedirectCallBack( httpd_callback_sys_t *p_sys,
"<hr />\n"
"</body>\n"
"</html>\n", rdir->psz_dst );
answer->p_body = (unsigned char *)p_body;
/* XXX check if it's ok or we need to set an absolute url */
httpd_MsgAdd( answer, "Location", "%s", rdir->psz_dst );
......
......@@ -619,17 +619,20 @@ static char *SDPGenerate( sap_handler_t *p_sap,
"v=0\r\n"
"o=- "I64Fd" %d IN IP%c %s\r\n"
"s=%s\r\n"
"t=0 0\r\n"
"c=IN IP%c %s/%d\r\n"
"m=video %d %s %d\r\n"
"t=0 0\r\n"
"a=tool:"PACKAGE_STRING"\r\n"
"a=type:broadcast\r\n"
"a=recvonly\r\n"
"a=type:broadcast\n"
"a=source-filter: incl IN IP%c * %s\r\n"
"m=video %d %s %d\r\n"
"%s%s%s",
i_sdp_id, i_sdp_version,
ipv, p_addr->psz_machine,
psz_name, ipv, psz_uri,
/* FIXME: 1 is IPv4 default TTL, not that of IPv6 */
p_session->i_ttl ?: (config_GetInt( p_sap, "ttl" ) ?: 1),
ipv, psz_uri,
p_session->i_port,
p_session->b_rtp ? "RTP/AVP" : "udp",
p_session->i_payload,
......
......@@ -895,7 +895,11 @@ static void RunThread( vout_thread_t *p_vout)
*/
if( display_date > 0 )
{
p_subpic = spu_SortSubpictures( p_vout->p_spu, display_date );
if( !p_input )
p_input = vlc_object_find( p_vout, VLC_OBJECT_INPUT,
FIND_PARENT );
p_subpic = spu_SortSubpictures( p_vout->p_spu, display_date,
p_input ? var_GetBool( p_input, "state" ) == PAUSE_S : VLC_FALSE );
}
/*
......@@ -1044,6 +1048,11 @@ static void RunThread( vout_thread_t *p_vout)
}
}
if( p_input )
{
vlc_object_release( p_input );
}
/*
* Error loop - wait until the thread destruction is requested
*/
......
......@@ -445,7 +445,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
picture_t *p_pif;
vlc_value_t val, format;
DIR *path;
int i_ret;
var_Get( p_vout, "snapshot-path", &val );
......
......@@ -401,6 +401,7 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
memset( p_subpic, 0, sizeof(subpicture_t) );
p_subpic->i_status = RESERVED_SUBPICTURE;
p_subpic->b_absolute = VLC_TRUE;
p_subpic->b_pausable = VLC_FALSE;
p_subpic->b_fade = VLC_FALSE;
p_subpic->i_alpha = 0xFF;
p_subpic->p_region = 0;
......@@ -412,7 +413,7 @@ subpicture_t *spu_CreateSubpicture( spu_t *p_spu )
p_subpic->pf_create_region = __spu_CreateRegion;
p_subpic->pf_make_region = __spu_MakeRegion;
p_subpic->pf_destroy_region = __spu_DestroyRegion;
return p_subpic;
}
......@@ -823,7 +824,8 @@ void spu_RenderSubpictures( spu_t *p_spu, video_format_t *p_fmt,
* to be removed if a newer one is available), which makes it a lot
* more difficult to guess if a subpicture has to be rendered or not.
*****************************************************************************/
subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date )
subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date,
vlc_bool_t b_paused )
{
int i_index, i_channel;
subpicture_t *p_subpic = NULL;
......@@ -869,7 +871,9 @@ subpicture_t *spu_SortSubpictures( spu_t *p_spu, mtime_t display_date )
if( display_date > p_spu->p_subpicture[i_index].i_stop &&
( !p_spu->p_subpicture[i_index].b_ephemer ||
p_spu->p_subpicture[i_index].i_stop >
p_spu->p_subpicture[i_index].i_start ) )
p_spu->p_subpicture[i_index].i_start ) &&
!( p_spu->p_subpicture[i_index].b_pausable &&
b_paused ) )
{
/* Too late, destroy the subpic */
spu_DestroySubpicture( p_spu, &p_spu->p_subpicture[i_index] );
......
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