Update to 1.0.3-rc

el8
Nicolas Chauvet 15 years ago
parent 34582f81a9
commit 2125e051ae

2
.gitignore vendored

@ -1 +1 @@
vlc-1.0.2.tar.bz2 vlc-1.0.3-rc.tar.bz2

@ -1 +1 @@
69d4e30fe4fc2691780fbeacd40359d2 vlc-1.0.2.tar.bz2 a83fc8d8a4bc804b27da6bd60b091967 vlc-1.0.3-rc.tar.bz2

@ -1,905 +0,0 @@
diff --git a/modules/access/dvb/en50221.c b/modules/access/dvb/en50221.c
index b2d8991..fbf2147 100644
--- a/modules/access/dvb/en50221.c
+++ b/modules/access/dvb/en50221.c
@@ -151,7 +151,7 @@ static uint8_t *SetLength( uint8_t *p_data, int i_length )
* Transport layer
*/
-#define MAX_TPDU_SIZE 2048
+#define MAX_TPDU_SIZE 4096
#define MAX_TPDU_DATA (MAX_TPDU_SIZE - 4)
#define DATA_INDICATOR 0x80
diff --git a/modules/access/v4l2.c b/modules/access/v4l2.c
index 4b1c67c..113162d 100644
--- a/modules/access/v4l2.c
+++ b/modules/access/v4l2.c
@@ -204,7 +204,11 @@ static void AccessClose( vlc_object_t * );
"please use 'v4l2:/""/ :input-slave=alsa:/""/' or " \
"'v4l2:/""/ :input-slave=oss:/""/' instead." )
+#define ASPECT_TEXT N_("Picture aspect-ratio n:m")
+#define ASPECT_LONGTEXT N_("Define input picture aspect-ratio to use. Default is 4:3" )
+
typedef enum {
+ IO_METHOD_AUTO,
IO_METHOD_READ,
IO_METHOD_MMAP,
IO_METHOD_USERPTR,
@@ -216,9 +220,9 @@ static const char *const psz_standards_list_text[] =
{ N_("Default"), N_("SECAM"), N_("PAL"), N_("NTSC") };
static const int i_iomethod_list[] =
- { IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR };
+ { IO_METHOD_AUTO, IO_METHOD_READ, IO_METHOD_MMAP, IO_METHOD_USERPTR };
static const char *const psz_iomethod_list_text[] =
- { N_("READ"), N_("MMAP"), N_("USERPTR") };
+ { N_("AUTO"), N_("READ"), N_("MMAP"), N_("USERPTR") };
static const int i_tuner_audio_modes_list[] =
{ V4L2_TUNER_MODE_MONO, V4L2_TUNER_MODE_STEREO,
@@ -251,13 +255,15 @@ vlc_module_begin ()
true )
add_integer( CFG_PREFIX "audio-input", 0, NULL, AUDIO_INPUT_TEXT,
AUDIO_INPUT_LONGTEXT, true )
- add_integer( CFG_PREFIX "io", IO_METHOD_MMAP, NULL, IOMETHOD_TEXT,
+ add_integer( CFG_PREFIX "io", IO_METHOD_AUTO, NULL, IOMETHOD_TEXT,
IOMETHOD_LONGTEXT, true )
change_integer_list( i_iomethod_list, psz_iomethod_list_text, NULL )
add_integer( CFG_PREFIX "width", -1, NULL, WIDTH_TEXT,
WIDTH_LONGTEXT, true )
add_integer( CFG_PREFIX "height", -1, NULL, HEIGHT_TEXT,
HEIGHT_LONGTEXT, true )
+ add_string( CFG_PREFIX "aspect-ratio", "4:3", NULL, ASPECT_TEXT,
+ ASPECT_LONGTEXT, true )
add_float( CFG_PREFIX "fps", 0, NULL, FPS_TEXT, FPS_LONGTEXT, true )
add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL,
CACHING_TEXT, CACHING_LONGTEXT, true )
@@ -363,6 +369,7 @@ static int AccessControl( access_t *, int, va_list );
static int Demux( demux_t * );
static block_t *AccessRead( access_t * );
+static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len );
static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys );
static block_t* ProcessVideoFrame( vlc_object_t *p_demux, uint8_t *p_frame, size_t );
@@ -525,6 +532,7 @@ struct demux_sys_t
int i_width;
int i_height;
+ unsigned int i_aspect;
float f_fps; /* <= 0.0 mean to grab at full rate */
mtime_t i_video_pts; /* only used when f_fps > 0 */
int i_fourcc;
@@ -687,6 +695,19 @@ static void GetV4L2Params( demux_sys_t *p_sys, vlc_object_t *p_obj )
p_sys->psz_set_ctrls = var_CreateGetString( p_obj, "v4l2-set-ctrls" );
+ char *psz_aspect = var_CreateGetString( p_obj, "v4l2-aspect-ratio" );
+ if( psz_aspect && *psz_aspect && strchr( psz_aspect, ":" ) )
+ {
+ char psz_delim = strchr( psz_aspect, ":" );
+ p_sys->i_aspect = atoi( psz_aspect ) * VOUT_ASPECT_FACTOR / atoi( psz_delim + 1 );
+ }
+ else
+ {
+ p_sys->i_aspect = 4 * VOUT_ASPECT_FACTOR / 3 ;
+
+ }
+ free( psz_aspect );
+
p_sys->psz_device = NULL;
p_sys->i_fd = -1;
@@ -793,6 +814,11 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
p_sys->io = IO_METHOD_USERPTR;
psz_parser += strlen( "userptr" );
}
+ else if( !strncmp( psz_parser, "auto", strlen( "auto" ) ) )
+ {
+ p_sys->io = IO_METHOD_AUTO;
+ psz_parser += strlen( "auto" );
+ }
else
{
p_sys->io = strtol( psz_parser, &psz_parser, 0 );
@@ -812,6 +838,17 @@ static void ParseMRL( demux_sys_t *p_sys, char *psz_path, vlc_object_t *p_obj )
strtol( psz_parser + strlen( "height=" ),
&psz_parser, 0 );
}
+ else if( !strncmp( psz_parser, "aspect-ratio=",
+ strlen( "aspect-ratio=" ) ) )
+ {
+ unsigned int num,den;
+ num = strtol( psz_parser + strlen( "aspect-ratio=" ),
+ &psz_parser, 0 );
+ den = strtol( psz_parser + strlen( ":" ),
+ &psz_parser, 0 );
+ if( num && den )
+ p_sys->i_aspect = num * VOUT_ASPECT_FACTOR / den;
+ }
else if( !strncmp( psz_parser, "controls-reset",
strlen( "controls-reset" ) ) )
{
@@ -990,6 +1027,9 @@ static void DemuxClose( vlc_object_t *p_this )
}
break;
+
+ default:
+ break;
}
}
@@ -1017,6 +1057,9 @@ static void DemuxClose( vlc_object_t *p_this )
free( p_sys->p_buffers[i].start );
}
break;
+
+ default:
+ break;
}
free( p_sys->p_buffers );
}
@@ -1056,7 +1099,6 @@ static int AccessOpen( vlc_object_t * p_this )
if( *p_access->psz_access == '\0' ) return VLC_EGENERIC;
access_InitFields( p_access );
- ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL );
p_sys = calloc( 1, sizeof( demux_sys_t ));
if( !p_sys ) return VLC_ENOMEM;
p_access->p_sys = (access_sys_t*)p_sys;
@@ -1071,14 +1113,34 @@ static int AccessOpen( vlc_object_t * p_this )
msg_Dbg( p_this, "Trying direct kernel v4l2" );
use_kernel_v4l2( p_sys );
if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS)
+ {
+ if( p_sys->io == IO_METHOD_READ )
+ {
+ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL );
+ }
+ else
+ {
+ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL );
+ }
return VLC_SUCCESS;
+ }
}
msg_Dbg( p_this, "Trying libv4l2 wrapper" );
use_libv4l2( p_sys );
#endif
if( FindMainDevice( p_this, p_sys, false ) == VLC_SUCCESS )
+ {
+ if( p_sys->io == IO_METHOD_READ )
+ {
+ ACCESS_SET_CALLBACKS( AccessReadStream, NULL, AccessControl, NULL );
+ }
+ else
+ {
+ ACCESS_SET_CALLBACKS( NULL, AccessRead, AccessControl, NULL );
+ }
return VLC_SUCCESS;
+ }
AccessClose( p_this );
return VLC_EGENERIC;
@@ -1199,6 +1261,46 @@ static block_t *AccessRead( access_t * p_access )
return NULL;
}
+static ssize_t AccessReadStream( access_t * p_access, uint8_t * p_buffer, size_t i_len )
+{
+ demux_sys_t *p_sys = (demux_sys_t *) p_access->p_sys;
+ struct pollfd ufd;
+ int i_ret;
+
+ ufd.fd = p_sys->i_fd;
+ ufd.events = POLLIN;
+
+ if( p_access->info.b_eof )
+ return 0;
+
+ do
+ {
+ if( !vlc_object_alive (p_access) )
+ return 0;
+
+ ufd.revents = 0;
+ }
+ while( ( i_ret = poll( &ufd, 1, 500 ) ) == 0 );
+
+ if( i_ret < 0 )
+ {
+ msg_Err( p_access, "Polling error (%m)." );
+ return -1;
+ }
+
+ i_ret = v4l2_read( p_sys->i_fd, p_buffer, i_len );
+ if( i_ret == 0 )
+ {
+ p_access->info.b_eof = true;
+ }
+ else if( i_ret > 0 )
+ {
+ p_access->info.i_pos += i_ret;
+ }
+
+ return i_ret;
+}
+
/*****************************************************************************
* Demux: Processes the audio or video frame
*****************************************************************************/
@@ -1357,6 +1459,8 @@ static block_t* GrabVideo( vlc_object_t *p_demux, demux_sys_t *p_sys )
break;
+ default:
+ break;
}
/* Timestamp */
@@ -1843,6 +1947,7 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
msg_Err( p_obj, "device does not support read i/o" );
goto open_failed;
}
+ msg_Dbg( p_obj, "using read i/o" );
break;
case IO_METHOD_MMAP:
@@ -1852,6 +1957,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
msg_Err( p_obj, "device does not support streaming i/o" );
goto open_failed;
}
+ if( p_sys->io == IO_METHOD_MMAP )
+ msg_Dbg( p_obj, "using streaming i/o (mmap)" );
+ else
+ msg_Dbg( p_obj, "using streaming i/o (userptr)" );
break;
default:
@@ -1866,16 +1975,19 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
{
crop.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
crop.c = cropcap.defrect; /* reset to default */
- if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 )
+ if( crop.c.width > 0 && crop.c.height > 0 ) /* Fix for fm tuners */
{
- switch( errno )
+ if( v4l2_ioctl( i_fd, VIDIOC_S_CROP, &crop ) < 0 )
{
- case EINVAL:
- /* Cropping not supported. */
- break;
- default:
- /* Errors ignored. */
- break;
+ switch( errno )
+ {
+ case EINVAL:
+ /* Cropping not supported. */
+ break;
+ default:
+ /* Errors ignored. */
+ break;
+ }
}
}
}
@@ -1911,8 +2023,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
msg_Dbg( p_obj, "trying specified size %dx%d", p_sys->i_width, p_sys->i_height );
}
- fmt.fmt.pix.width = p_sys->i_width;
- fmt.fmt.pix.height = p_sys->i_height;
+ fmt.fmt.pix.width = __MAX(0, p_sys->i_width);
+ fmt.fmt.pix.height = __MAX(0, p_sys->i_height);
fmt.fmt.pix.field = V4L2_FIELD_NONE;
if (b_demux)
@@ -2129,7 +2241,8 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
switch( p_sys->io )
{
case IO_METHOD_READ:
- if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed;
+ if( b_demux )
+ if( InitRead( p_obj, p_sys, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed;
break;
case IO_METHOD_MMAP:
@@ -2140,15 +2253,20 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
if( InitUserP( p_obj, p_sys, i_fd, fmt.fmt.pix.sizeimage ) != VLC_SUCCESS ) goto open_failed;
break;
+ default:
+ goto open_failed;
+ break;
}
- /* Add */
- es_fmt.video.i_width = p_sys->i_width;
- es_fmt.video.i_height = p_sys->i_height;
- es_fmt.video.i_aspect = 4 * VOUT_ASPECT_FACTOR / 3;
-
if( b_demux )
{
+ /* Add */
+ es_fmt.video.i_width = p_sys->i_width;
+ es_fmt.video.i_height = p_sys->i_height;
+
+ /* Get aspect-ratio */
+ es_fmt.video.i_aspect = p_sys->i_aspect;
+
demux_t *p_demux = (demux_t *) p_obj;
msg_Dbg( p_demux, "added new video es %4.4s %dx%d",
(char*)&es_fmt.i_codec, es_fmt.video.i_width, es_fmt.video.i_height );
@@ -2216,6 +2334,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
}
break;
+
+ default:
+ goto open_failed;
+ break;
}
/* report fps */
@@ -2283,10 +2405,12 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
msg_Dbg( p_obj, "the device has the capabilities: (%c) Video Capure, "
"(%c) Audio, "
- "(%c) Tuner",
+ "(%c) Tuner, "
+ "(%c) Radio",
( p_sys->dev_cap.capabilities & V4L2_CAP_VIDEO_CAPTURE ? 'X':' '),
( p_sys->dev_cap.capabilities & V4L2_CAP_AUDIO ? 'X':' '),
- ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' ') );
+ ( p_sys->dev_cap.capabilities & V4L2_CAP_TUNER ? 'X':' '),
+ ( p_sys->dev_cap.capabilities & V4L2_CAP_RADIO ? 'X':' ') );
msg_Dbg( p_obj, "supported I/O methods are: (%c) Read/Write, "
"(%c) Streaming, "
@@ -2295,6 +2419,30 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING ? 'X':' ' ),
( p_sys->dev_cap.capabilities & V4L2_CAP_ASYNCIO ? 'X':' ' ) );
+ if( p_sys->io == IO_METHOD_AUTO )
+ {
+ if( p_sys->dev_cap.capabilities & V4L2_CAP_STREAMING )
+ p_sys->io = IO_METHOD_MMAP;
+ else if( p_sys->dev_cap.capabilities & V4L2_CAP_READWRITE )
+ p_sys->io = IO_METHOD_READ;
+ else
+ msg_Err( p_obj, "No known I/O method supported" );
+ }
+
+ if( p_sys->dev_cap.capabilities & V4L2_CAP_RDS_CAPTURE )
+ msg_Dbg( p_obj, "device supports RDS" );
+
+#ifdef V4L2_CAP_HW_FREQ_SEEK
+ if( p_sys->dev_cap.capabilities & V4L2_CAP_HW_FREQ_SEEK )
+ msg_Dbg( p_obj, "device supports hardware frequency seeking" );
+#endif
+
+ if( p_sys->dev_cap.capabilities & V4L2_CAP_VBI_CAPTURE )
+ msg_Dbg( p_obj, "device support raw VBI capture" );
+
+ if( p_sys->dev_cap.capabilities & V4L2_CAP_SLICED_VBI_CAPTURE )
+ msg_Dbg( p_obj, "device support sliced VBI capture" );
+
/* Now, enumerate all the video inputs. This is useless at the moment
since we have no way to present that info to the user except with
debug messages */
@@ -2303,12 +2451,14 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
{
struct v4l2_input t_input;
memset( &t_input, 0, sizeof(t_input) );
+ p_sys->i_input = 0;
while( v4l2_ioctl( i_fd, VIDIOC_ENUMINPUT, &t_input ) >= 0 )
{
p_sys->i_input++;
t_input.index = p_sys->i_input;
}
+ free( p_sys->p_inputs );
p_sys->p_inputs = calloc( 1, p_sys->i_input * sizeof( struct v4l2_input ) );
if( !p_sys->p_inputs ) goto open_failed;
@@ -2344,6 +2494,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
t_standards.index = p_sys->i_standard;
}
+ free( p_sys->p_standards );
p_sys->p_standards = calloc( 1, p_sys->i_standard * sizeof( struct v4l2_standard ) );
if( !p_sys->p_standards ) goto open_failed;
@@ -2409,6 +2560,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
tuner.index = p_sys->i_tuner;
}
+ free( p_sys->p_tuners );
p_sys->p_tuners = calloc( 1, p_sys->i_tuner * sizeof( struct v4l2_tuner ) );
if( !p_sys->p_tuners ) goto open_failed;
@@ -2472,6 +2624,7 @@ static bool ProbeVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys,
p_sys->i_codec = i_index;
+ free( p_sys->p_codecs );
p_sys->p_codecs = calloc( 1, p_sys->i_codec * sizeof( struct v4l2_fmtdesc ) );
for( i_index = 0; i_index < p_sys->i_codec; i_index++ )
diff --git a/modules/codec/faad.c b/modules/codec/faad.c
index e050a94..ae44675 100644
--- a/modules/codec/faad.c
+++ b/modules/codec/faad.c
@@ -233,8 +233,17 @@ static aout_buffer_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
/* Append the block to the temporary buffer */
if( p_sys->i_buffer_size < p_sys->i_buffer + p_block->i_buffer )
{
- p_sys->i_buffer_size = p_sys->i_buffer + p_block->i_buffer;
- p_sys->p_buffer = realloc( p_sys->p_buffer, p_sys->i_buffer_size );
+ size_t i_buffer_size = p_sys->i_buffer + p_block->i_buffer;
+ uint8_t *p_buffer = realloc( p_sys->p_buffer, i_buffer_size );
+ if( p_buffer )
+ {
+ p_sys->i_buffer_size = i_buffer_size;
+ p_sys->p_buffer = p_buffer;
+ }
+ else
+ {
+ p_block->i_buffer = 0;
+ }
}
if( p_block->i_buffer > 0 )
diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index a6d8ef4..9fe0af9 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -864,7 +864,7 @@ static void PostprocessTigerImage( plane_t *p_plane, unsigned int i_width )
if( a )
{
#ifdef WORDS_BIGENDIAN
- uint8_t tmp = pixel[2];
+ uint8_t tmp = p_pixel[2];
p_pixel[0] = p_pixel[3] * 255 / a;
p_pixel[3] = a;
p_pixel[2] = p_pixel[1] * 255 / a;
diff --git a/modules/codec/subtitles/t140.c b/modules/codec/subtitles/t140.c
index 5e0c25a..2b89199 100644
--- a/modules/codec/subtitles/t140.c
+++ b/modules/codec/subtitles/t140.c
@@ -101,5 +101,9 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu )
p_block = block_New( p_enc, len );
memcpy( p_block->p_buffer, p_region->psz_text, len );
+ p_block->i_pts = p_block->i_dts = p_spu->i_start;
+ if( !p_spu->b_ephemer && ( p_spu->i_stop > p_spu->i_start ) )
+ p_block->i_length = p_spu->i_stop - p_spu->i_start;
+
return p_block;
}
diff --git a/modules/codec/x264.c b/modules/codec/x264.c
index e76ac3b..243bcba 100644
--- a/modules/codec/x264.c
+++ b/modules/codec/x264.c
@@ -1359,6 +1359,21 @@ static int Open ( vlc_object_t *p_this )
p_enc->fmt_out.i_extra = 0;
p_enc->fmt_out.p_extra = NULL;
+#if X264_BUILD >= 76
+ p_enc->fmt_out.i_extra = x264_encoder_headers( p_sys->h, &nal, &i_nal );
+ p_enc->fmt_out.p_extra = malloc( p_enc->fmt_out.i_extra );
+ if( !p_enc->fmt_out.p_extra )
+ {
+ Close( VLC_OBJECT(p_enc) );
+ return VLC_ENOMEM;
+ }
+ void *p_tmp = p_enc->fmt_out.p_extra;
+ for( i = 0; i < i_nal; i++ )
+ {
+ memcpy( p_tmp, nal[i].p_payload, nal[i].i_payload );
+ p_tmp += nal[i].i_payload;
+ }
+#else
x264_encoder_headers( p_sys->h, &nal, &i_nal );
for( i = 0; i < i_nal; i++ )
{
@@ -1380,6 +1395,7 @@ static int Open ( vlc_object_t *p_this )
p_enc->fmt_out.i_extra += i_size;
}
+#endif
return VLC_SUCCESS;
}
@@ -1416,10 +1432,15 @@ static block_t *Encode( encoder_t *p_enc, picture_t *p_pict )
for( i = 0, i_out = 0; i < i_nal; i++ )
{
+#if X264_BUILD >= 76
+ memcpy( p_sys->p_buffer + i_out, nal[i].p_payload, nal[i].i_payload );
+ i_out += nal[i].i_payload;
+#else
int i_size = p_sys->i_buffer - i_out;
x264_nal_encode( p_sys->p_buffer + i_out, &i_size, 1, &nal[i] );
i_out += i_size;
+#endif
}
p_block = block_New( p_enc, i_out );
diff --git a/modules/demux/avi/avi.c b/modules/demux/avi/avi.c
index 4fe88b4..47a97e4 100644
--- a/modules/demux/avi/avi.c
+++ b/modules/demux/avi/avi.c
@@ -672,7 +672,18 @@ aviindex:
/* *** movie length in sec *** */
p_sys->i_length = AVI_MovieGetLength( p_demux );
- if( p_sys->i_length < (mtime_t)p_avih->i_totalframes *
+
+ /* Check the index completeness */
+ unsigned int i_idx_totalframes = 0;
+ for( unsigned int i = 0; i < p_sys->i_track; i++ )
+ {
+ const avi_track_t *tk = p_sys->track[i];
+ if( tk->i_cat == VIDEO_ES && tk->p_index )
+ i_idx_totalframes = __MAX(i_idx_totalframes, tk->i_idxnb);
+ continue;
+ }
+ if( i_idx_totalframes != p_avih->i_totalframes &&
+ p_sys->i_length < (mtime_t)p_avih->i_totalframes *
(mtime_t)p_avih->i_microsecperframe /
(mtime_t)1000000 )
{
diff --git a/modules/demux/playlist/m3u.c b/modules/demux/playlist/m3u.c
index 9770b29..f727c87 100644
--- a/modules/demux/playlist/m3u.c
+++ b/modules/demux/playlist/m3u.c
@@ -114,28 +114,6 @@ void Close_M3U( vlc_object_t *p_this )
}
-/* Gruik! */
-static inline char *MaybeFromLocaleDup (const char *str)
-{
- if (str == NULL)
- return NULL;
-
- return IsUTF8 (str) ? strdup (str) : FromLocaleDup (str);
-}
-
-
-static inline void MaybeFromLocaleRep (char **str)
-{
- char *const orig_str = *str;
-
- if ((orig_str != NULL) && !IsUTF8 (orig_str))
- {
- *str = FromLocaleDup (orig_str);
- free (orig_str);
- }
-}
-
-
static int Demux( demux_t *p_demux )
{
char *psz_line;
@@ -178,9 +156,9 @@ static int Demux( demux_t *p_demux )
if( i_parsed_duration >= 0 )
i_duration = i_parsed_duration * INT64_C(1000000);
if( psz_name )
- psz_name = strdup( psz_name );
+ psz_name = FromLocaleDup( psz_name );
if( psz_artist )
- psz_artist = strdup( psz_artist );
+ psz_artist = FromLocaleDup( psz_artist );
}
else if( !strncasecmp( psz_parse, "EXTVLCOPT:",
sizeof("EXTVLCOPT:") -1 ) )
@@ -190,7 +168,7 @@ static int Demux( demux_t *p_demux )
psz_parse += sizeof("EXTVLCOPT:") -1;
if( !*psz_parse ) goto error;
- psz_option = MaybeFromLocaleDup( psz_parse );
+ psz_option = FromLocaleDup( psz_parse );
if( psz_option )
INSERT_ELEM( ppsz_options, i_options, i_options,
psz_option );
@@ -203,14 +181,13 @@ static int Demux( demux_t *p_demux )
else if( *psz_parse )
{
char *psz_mrl;
- if( !psz_name || !*psz_name )
- {
+
+ psz_parse = FromLocale( psz_parse );
+ if( !psz_name && psz_parse )
/* Use filename as name for relative entries */
- psz_name = MaybeFromLocaleDup( psz_parse );
- }
+ psz_name = strdup( psz_parse );
psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix );
- MaybeFromLocaleRep( &psz_mrl );
b_cleanup = true;
if( !psz_mrl ) goto error;
@@ -218,12 +195,14 @@ static int Demux( demux_t *p_demux )
p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
i_options, ppsz_options, 0, i_duration );
+ LocaleFree( psz_parse );
+ free( psz_mrl );
+
if ( psz_artist && *psz_artist )
input_item_SetArtist( p_input, psz_artist );
input_item_AddSubItem( p_current_input, p_input );
vlc_gc_decref( p_input );
- free( psz_mrl );
}
error:
diff --git a/modules/demux/ts.c b/modules/demux/ts.c
index 514096b..b36dc4f 100644
--- a/modules/demux/ts.c
+++ b/modules/demux/ts.c
@@ -2083,6 +2083,9 @@ static int PIDFillFormat( ts_pid_t *pid, int i_stream_type )
case 0x85: /* DTS (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'd', 't', 's', ' ' ) );
break;
+ case 0x87: /* E-AC3 */
+ es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'e', 'a', 'c', '3' ) );
+ break;
case 0x91: /* A52 vls (audio) */
es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', 'b' ) );
@@ -3671,7 +3674,6 @@ static void PMTSetupEsHDMV( demux_t *p_demux, ts_pid_t *pid,
break;
case 0x84: /* E-AC3 */
- case 0x87: /* E-AC3 */
case 0xA1: /* Secondary E-AC3 */
p_fmt->i_cat = AUDIO_ES;
p_fmt->i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' );
diff --git a/modules/gui/qt4/components/playlist/playlist_item.cpp b/modules/gui/qt4/components/playlist/playlist_item.cpp
index b0436f0..0edde6a 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.cpp
@@ -48,7 +48,7 @@
*/
-void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m, QSettings *settings )
+void PLItem::init( int _i_id, int _i_input_id, PLItem *parent, PLModel *m, QSettings *settings )
{
parentItem = parent; /* Can be NULL, but only for the rootItem */
i_id = _i_id; /* Playlist item specific id */
@@ -56,7 +56,6 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL
model = m; /* PLModel (QAbsmodel) */
i_type = -1; /* Item type - Avoid segfault */
b_current = false; /* Is the item the current Item or not */
- b_is_node = _is_node;
assert( model ); /* We need a model */
@@ -92,21 +91,19 @@ void PLItem::init( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PL
Call the above function init
So far the first constructor isn't used...
*/
-PLItem::PLItem( int _i_id, int _i_input_id, bool _is_node, PLItem *parent, PLModel *m )
+PLItem::PLItem( int _i_id, int _i_input_id, PLItem *parent, PLModel *m )
{
- init( _i_id, _i_input_id, _is_node, parent, m, NULL );
+ init( _i_id, _i_input_id, parent, m, NULL );
}
PLItem::PLItem( playlist_item_t * p_item, PLItem *parent, PLModel *m )
{
- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1,
- parent, m, NULL );
+ init( p_item->i_id, p_item->p_input->i_id, parent, m, NULL );
}
PLItem::PLItem( playlist_item_t * p_item, QSettings *settings, PLModel *m )
{
- init( p_item->i_id, p_item->p_input->i_id, p_item->i_children > -1,
- NULL, m, settings );
+ init( p_item->i_id, p_item->p_input->i_id, NULL, m, settings );
}
PLItem::~PLItem()
@@ -177,7 +174,6 @@ void PLItem::update( playlist_item_t *p_item, bool iscurrent )
/* Useful for the model */
i_type = p_item->p_input->i_type;
b_current = iscurrent;
- b_is_node = p_item->i_children > -1;
item_col_strings.clear();
diff --git a/modules/gui/qt4/components/playlist/playlist_item.hpp b/modules/gui/qt4/components/playlist/playlist_item.hpp
index c9d186b..26ce13c 100644
--- a/modules/gui/qt4/components/playlist/playlist_item.hpp
+++ b/modules/gui/qt4/components/playlist/playlist_item.hpp
@@ -40,7 +40,7 @@ class PLItem
{
friend class PLModel;
public:
- PLItem( int, int, bool, PLItem *parent , PLModel * );
+ PLItem( int, int, PLItem *parent , PLModel * );
PLItem( playlist_item_t *, PLItem *parent, PLModel * );
PLItem( playlist_item_t *, QSettings *, PLModel * );
~PLItem();
@@ -72,10 +72,9 @@ protected:
int i_id;
int i_input_id;
int i_showflags;
- bool b_is_node;
private:
- void init( int, int, bool, PLItem *, PLModel *, QSettings * );
+ void init( int, int, PLItem *, PLModel *, QSettings * );
void updateColumnHeaders();
PLItem *parentItem;
PLModel *model;
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 9a28d42..add3ddc 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -119,12 +119,7 @@ Qt::ItemFlags PLModel::flags( const QModelIndex &index ) const
{
Qt::ItemFlags defaultFlags = QAbstractItemModel::flags( index );
if( index.isValid() )
- {
- PLItem *item = static_cast<PLItem*>( index.internalPointer() );
- if ( item->b_is_node )
- defaultFlags |= Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
- else defaultFlags |= Qt::ItemIsDragEnabled;
- }
+ return Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled | defaultFlags;
else if ( rootItem->i_id != p_playlist->p_root_onelevel->i_id
&& rootItem->i_id != p_playlist->p_root_category->i_id )
defaultFlags |= Qt::ItemIsDropEnabled;
diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index c9e5550..ca421c6 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -87,15 +87,11 @@ StandardPLPanel::StandardPLPanel( PlaylistWidget *_parent,
view->header()->resizeSection( 0, 200 );
view->header()->resizeSection( 1, 80 );
}
+ view->header()->setSortIndicatorShown( true );
view->header()->setClickable( true );
view->header()->setContextMenuPolicy( Qt::CustomContextMenu );
getSettings()->endGroup();
- /* Set sorting enable by hand, so it doesn't run sort on start */
- view->header()->setSortIndicator( -1, Qt::AscendingOrder );
- view->header()->setSortIndicatorShown( true );
- CONNECT( view->header(), sortIndicatorChanged( int, Qt::SortOrder ),
- view, sortByColumn( int ) );
/* Connections for the TreeView */
CONNECT( view, activated( const QModelIndex& ) ,
model,activateItem( const QModelIndex& ) );
diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index 0c4da89..c39bb2f 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -532,7 +532,7 @@ void DialogsProvider::saveAPlaylist()
char filter[24];
char module[12];
} types[] = {
- { N_("XSPF playlist (*.xpsf)"), "export-xspf", },
+ { N_("XSPF playlist (*.xspf)"), "export-xspf", },
{ N_("M3U playlist (*.m3u)"), "export-m3u", },
{ N_("HTML playlist (*.html)"), "export-html", },
};
diff --git a/modules/gui/qt4/main_interface.hpp b/modules/gui/qt4/main_interface.hpp
index d352fae..c9af6ef 100644
--- a/modules/gui/qt4/main_interface.hpp
+++ b/modules/gui/qt4/main_interface.hpp
@@ -180,7 +180,7 @@ private slots:
void showCryptedLabel( bool );
signals:
void askGetVideo( WId *p_id, vout_thread_t *, int *pi_x, int *pi_y,
- unsigned int *pi_width, unsigned int *pi_height );
+ unsigned *pi_width, unsigned *pi_height );
void askReleaseVideo( );
void askVideoToResize( unsigned int, unsigned int );
void askUpdate();
diff --git a/modules/stream_filter/rar.c b/modules/stream_filter/rar.c
index a5fd829..f828058 100644
--- a/modules/stream_filter/rar.c
+++ b/modules/stream_filter/rar.c
@@ -525,7 +525,7 @@ static int SkipFile( stream_t *s,const rar_block_t *p_hdr )
rar_file_chunk_t *p_chunk = malloc( sizeof( *p_chunk ) );
if( p_chunk )
{
- p_chunk->i_offset = stream_Tell( s->p_source );
+ p_chunk->i_offset = stream_Tell( s->p_source ) + p_hdr->i_size;
p_chunk->i_size = p_hdr->i_add_size;
p_chunk->i_cummulated_size = 0;
if( p_current->i_chunk > 0 )
diff --git a/modules/video_filter/canvas.c b/modules/video_filter/canvas.c
index e6c79cd..f2074e5 100644
--- a/modules/video_filter/canvas.c
+++ b/modules/video_filter/canvas.c
@@ -102,6 +102,7 @@ static int alloc_init( filter_t *, void * );
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
+ set_shortname( N_("Canvas") )
set_description( N_("Automatically resize and pad a video") )
set_capability( "video filter2", 0 )
set_callbacks( Activate, Destroy )
diff --git a/modules/video_filter/croppadd.c b/modules/video_filter/croppadd.c
index 63b5341..887e6e5 100644
--- a/modules/video_filter/croppadd.c
+++ b/modules/video_filter/croppadd.c
@@ -76,6 +76,7 @@ static picture_t *Filter( filter_t *, picture_t * );
* Module descriptor
*****************************************************************************/
vlc_module_begin ()
+ set_shortname( N_("Cropadd") )
set_description( N_("Video scaling filter") )
set_capability( "video filter2", 0 )
set_callbacks( OpenFilter, CloseFilter )
diff --git a/share/lua/playlist/appletrailers.lua b/share/lua/playlist/appletrailers.lua
index 7544255..3e2688d 100644
--- a/share/lua/playlist/appletrailers.lua
+++ b/share/lua/playlist/appletrailers.lua
@@ -53,7 +53,7 @@ function parse()
else
extraname = ""
end
- table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path } )
+ table.insert( p, { path = path; name = title..extraname; description = description; url = vlc.path; options = ":http-user-agent=\"QuickTime vlc lua edition\"" } )
end
if string.match( line, "<title>" )
then
diff --git a/src/misc/update.c b/src/misc/update.c
index a0f4334..d7e6179 100644
--- a/src/misc/update.c
+++ b/src/misc/update.c
@@ -1081,12 +1081,12 @@ void update_Delete( update_t *p_update )
if( p_update->p_check )
{
- assert( !p_update->p_download );
vlc_object_kill( p_update->p_check );
vlc_thread_join( p_update->p_check );
vlc_object_release( p_update->p_check );
}
- else if( p_update->p_download )
+
+ if( p_update->p_download )
{
vlc_object_kill( p_update->p_download );
vlc_thread_join( p_update->p_download );
@@ -1613,9 +1613,9 @@ static void* update_DownloadReal( vlc_object_t *p_this )
psz_downloaded = size_str( l_downloaded );
f_progress = (float)l_downloaded/(float)l_size;
- if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s %.1f%% done" ),
+ if( asprintf( &psz_status, _( "%s\nDownloading... %s/%s - %.1f%% done" ),
p_update->release.psz_url, psz_downloaded, psz_size,
- f_progress ) != -1 )
+ f_progress*100 ) != -1 )
{
dialog_ProgressSet( p_progress, psz_status, f_progress );
free( psz_status );
@@ -1735,9 +1735,6 @@ end:
free( p_buffer );
free( psz_size );
- p_udt->p_update->p_download = NULL;
-
- vlc_object_release( p_udt );
vlc_restorecancel( canc );
return NULL;
}

@ -0,0 +1,814 @@
diff --git a/modules/access/dvb/access.c b/modules/access/dvb/access.c
index 1461302..745da6e 100644
--- a/modules/access/dvb/access.c
+++ b/modules/access/dvb/access.c
@@ -421,6 +421,8 @@ static int Open( vlc_object_t *p_this )
else
p_sys->i_read_once = DVB_READ_ONCE_START;
+ free( p_access->psz_demux );
+ p_access->psz_demux = strdup( "ts" );
return VLC_SUCCESS;
}
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 895d528..5c38426 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -506,7 +506,6 @@ void TimeLabel::setCaching( float f_cache )
{
QString amount;
amount.setNum( (int)(100 * f_cache) );
- msg_Dbg( p_intf, "New caching: %d", (int)(100*f_cache));
setText( "Buff: " + amount + "%" );
}
diff --git a/src/config/file.c b/src/config/file.c
index 01c0332..e2c92ec 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -117,6 +117,9 @@ static FILE *config_OpenConfigFile( vlc_object_t *p_obj )
}
free( psz_readme );
}
+ /* Remove the old configuration file so that --reset-config
+ * can work properly. */
+ unlink( psz_old );
}
free( psz_old );
}
diff --git a/src/input/clock.c b/src/input/clock.c
index dc010e5..a26b9c4 100644
--- a/src/input/clock.c
+++ b/src/input/clock.c
@@ -86,6 +86,19 @@
* my dice --Meuuh */
#define CR_MEAN_PTS_GAP (300000)
+/* Rate (in 1/256) at which we will read faster to try to increase our
+ * internal buffer (if we control the pace of the source).
+ */
+#define CR_BUFFERING_RATE (48)
+
+/* Extra internal buffer value (in CLOCK_FREQ)
+ * It is 60s max, remember as it is limited by the size it takes by es_out.c
+ * it can be really large.
+ */
+//#define CR_BUFFERING_TARGET (60000000)
+/* Due to some problems in es_out, we cannot use a large value yet */
+#define CR_BUFFERING_TARGET (100000)
+
/*****************************************************************************
* Structures
*****************************************************************************/
@@ -123,6 +136,9 @@ static inline clock_point_t clock_point_Create( mtime_t i_stream, mtime_t i_syst
}
/* */
+#define INPUT_CLOCK_LATE_COUNT (3)
+
+/* */
struct input_clock_t
{
/* */
@@ -139,10 +155,20 @@ struct input_clock_t
/* Maximal timestamp returned by input_clock_ConvertTS (in system unit) */
mtime_t i_ts_max;
+ /* Amount of extra buffering expressed in stream clock */
+ mtime_t i_buffering_duration;
+
/* Clock drift */
mtime_t i_next_drift_update;
average_t drift;
+ /* Late statistics */
+ struct
+ {
+ mtime_t pi_value[INPUT_CLOCK_LATE_COUNT];
+ unsigned i_index;
+ } late;
+
/* Current modifiers */
int i_rate;
mtime_t i_pts_delay;
@@ -153,6 +179,8 @@ struct input_clock_t
static mtime_t ClockStreamToSystem( input_clock_t *, mtime_t i_stream );
static mtime_t ClockSystemToStream( input_clock_t *, mtime_t i_system );
+static mtime_t ClockGetTsOffset( input_clock_t * );
+
/*****************************************************************************
* input_clock_New: create a new clock
*****************************************************************************/
@@ -170,9 +198,15 @@ input_clock_t *input_clock_New( int i_rate )
cl->i_ts_max = VLC_TS_INVALID;
+ cl->i_buffering_duration = 0;
+
cl->i_next_drift_update = VLC_TS_INVALID;
AvgInit( &cl->drift, 10 );
+ cl->late.i_index = 0;
+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ )
+ cl->late.pi_value[i] = 0;
+
cl->i_rate = i_rate;
cl->i_pts_delay = 0;
cl->b_paused = false;
@@ -197,8 +231,9 @@ void input_clock_Delete( input_clock_t *cl )
* i_ck_stream: date in stream clock
* i_ck_system: date in system clock
*****************************************************************************/
-void input_clock_Update( input_clock_t *cl,
- vlc_object_t *p_log, bool b_can_pace_control,
+void input_clock_Update( input_clock_t *cl, vlc_object_t *p_log,
+ bool *pb_late,
+ bool b_can_pace_control, bool b_buffering_allowed,
mtime_t i_ck_stream, mtime_t i_ck_system )
{
bool b_reset_reference = false;
@@ -226,6 +261,8 @@ void input_clock_Update( input_clock_t *cl,
msg_Warn( p_log, "feeding synchro with a new reference point trying to recover from clock gap" );
b_reset_reference= true;
}
+
+ /* */
if( b_reset_reference )
{
cl->i_next_drift_update = VLC_TS_INVALID;
@@ -237,6 +274,8 @@ void input_clock_Update( input_clock_t *cl,
__MAX( cl->i_ts_max + CR_MEAN_PTS_GAP, i_ck_system ) );
}
+ /* Compute the drift between the stream clock and the system clock
+ * when we don't control the source pace */
if( !b_can_pace_control && cl->i_next_drift_update < i_ck_system )
{
const mtime_t i_converted = ClockSystemToStream( cl, i_ck_system );
@@ -245,8 +284,39 @@ void input_clock_Update( input_clock_t *cl,
cl->i_next_drift_update = i_ck_system + CLOCK_FREQ/5; /* FIXME why that */
}
+
+ /* Update the extra buffering value */
+ if( !b_can_pace_control || b_reset_reference )
+ {
+ cl->i_buffering_duration = 0;
+ }
+ else if( b_buffering_allowed )
+ {
+ /* Try to bufferize more than necessary by reading
+ * CR_BUFFERING_RATE/256 faster until we have CR_BUFFERING_TARGET.
+ */
+ const mtime_t i_duration = __MAX( i_ck_stream - cl->last.i_stream, 0 );
+
+ cl->i_buffering_duration += ( i_duration * CR_BUFFERING_RATE + 255 ) / 256;
+ if( cl->i_buffering_duration > CR_BUFFERING_TARGET )
+ cl->i_buffering_duration = CR_BUFFERING_TARGET;
+ }
+ //fprintf( stderr, "input_clock_Update: %d :: %lld\n", b_buffering_allowed, cl->i_buffering_duration/1000 );
+
+ /* */
cl->last = clock_point_Create( i_ck_stream, i_ck_system );
+ /* It does not take the decoder latency into account but it is not really
+ * the goal of the clock here */
+ const mtime_t i_system_expected = ClockStreamToSystem( cl, i_ck_stream + AvgGet( &cl->drift ) );
+ const mtime_t i_late = ( i_ck_system - cl->i_pts_delay ) - i_system_expected;
+ *pb_late = i_late > 0;
+ if( i_late > 0 )
+ {
+ cl->late.pi_value[cl->late.i_index] = i_late;
+ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT;
+ }
+
vlc_mutex_unlock( &cl->lock );
}
@@ -271,13 +341,12 @@ void input_clock_ChangeRate( input_clock_t *cl, int i_rate )
{
vlc_mutex_lock( &cl->lock );
- /* Move the reference point */
if( cl->b_has_reference )
{
- cl->last.i_system = ClockStreamToSystem( cl, cl->last.i_stream );
- cl->ref = cl->last;
+ /* Move the reference point (as if we were playing at the new rate
+ * from the start */
+ cl->ref.i_system = cl->last.i_system - (cl->last.i_system - cl->ref.i_system) * i_rate / cl->i_rate;
}
-
cl->i_rate = i_rate;
vlc_mutex_unlock( &cl->lock );
@@ -318,7 +387,7 @@ mtime_t input_clock_GetWakeup( input_clock_t *cl )
/* Synchronized, we can wait */
if( cl->b_has_reference )
- i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream );
+ i_wakeup = ClockStreamToSystem( cl, cl->last.i_stream + AvgGet( &cl->drift ) - cl->i_buffering_duration );
vlc_mutex_unlock( &cl->lock );
@@ -332,8 +401,6 @@ int input_clock_ConvertTS( input_clock_t *cl,
int *pi_rate, mtime_t *pi_ts0, mtime_t *pi_ts1,
mtime_t i_ts_bound )
{
- mtime_t i_pts_delay;
-
assert( pi_ts0 );
vlc_mutex_lock( &cl->lock );
@@ -350,27 +417,30 @@ int input_clock_ConvertTS( input_clock_t *cl,
}
/* */
+ const mtime_t i_ts_buffering = cl->i_buffering_duration * cl->i_rate / INPUT_RATE_DEFAULT;
+ const mtime_t i_ts_delay = cl->i_pts_delay + ClockGetTsOffset( cl );
+
+ /* */
if( *pi_ts0 > VLC_TS_INVALID )
{
*pi_ts0 = ClockStreamToSystem( cl, *pi_ts0 + AvgGet( &cl->drift ) );
if( *pi_ts0 > cl->i_ts_max )
cl->i_ts_max = *pi_ts0;
- *pi_ts0 += cl->i_pts_delay;
+ *pi_ts0 += i_ts_delay;
}
/* XXX we do not ipdate i_ts_max on purpose */
if( pi_ts1 && *pi_ts1 > VLC_TS_INVALID )
{
*pi_ts1 = ClockStreamToSystem( cl, *pi_ts1 + AvgGet( &cl->drift ) ) +
- cl->i_pts_delay;
+ i_ts_delay;
}
- i_pts_delay = cl->i_pts_delay;
vlc_mutex_unlock( &cl->lock );
/* Check ts validity */
if( i_ts_bound != INT64_MAX &&
- *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + cl->i_pts_delay + i_ts_bound )
+ *pi_ts0 > VLC_TS_INVALID && *pi_ts0 >= mdate() + i_ts_delay + i_ts_buffering + i_ts_bound )
return VLC_EGENERIC;
return VLC_SUCCESS;
@@ -417,7 +487,7 @@ void input_clock_ChangeSystemOrigin( input_clock_t *cl, mtime_t i_system )
vlc_mutex_lock( &cl->lock );
assert( cl->b_has_reference );
- const mtime_t i_offset = i_system - cl->ref.i_system;
+ const mtime_t i_offset = i_system - cl->ref.i_system - ClockGetTsOffset( cl );
cl->ref.i_system += i_offset;
cl->last.i_system += i_offset;
@@ -431,6 +501,24 @@ void input_clock_SetJitter( input_clock_t *cl,
{
vlc_mutex_lock( &cl->lock );
+ /* Update late observations */
+ const mtime_t i_delay_delta = i_pts_delay - cl->i_pts_delay;
+ mtime_t pi_late[INPUT_CLOCK_LATE_COUNT];
+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ )
+ pi_late[i] = __MAX( cl->late.pi_value[(cl->late.i_index + 1 + i)%INPUT_CLOCK_LATE_COUNT] - i_delay_delta, 0 );
+
+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ )
+ cl->late.pi_value[i] = 0;
+ cl->late.i_index = 0;
+
+ for( int i = 0; i < INPUT_CLOCK_LATE_COUNT; i++ )
+ {
+ if( pi_late[i] <= 0 )
+ continue;
+ cl->late.pi_value[cl->late.i_index] = pi_late[i];
+ cl->late.i_index = ( cl->late.i_index + 1 ) % INPUT_CLOCK_LATE_COUNT;
+ }
+
/* TODO always save the value, and when rebuffering use the new one if smaller
* TODO when increasing -> force rebuffering
*/
@@ -447,6 +535,28 @@ void input_clock_SetJitter( input_clock_t *cl,
vlc_mutex_unlock( &cl->lock );
}
+mtime_t input_clock_GetJitter( input_clock_t *cl )
+{
+ vlc_mutex_lock( &cl->lock );
+
+#if INPUT_CLOCK_LATE_COUNT != 3
+# error "unsupported INPUT_CLOCK_LATE_COUNT"
+#endif
+ /* Find the median of the last late values
+ * It works pretty well at rejecting bad values
+ *
+ * XXX we only increase pts_delay over time, decreasing it is
+ * not that easy if we want to be robust.
+ */
+ const mtime_t *p = cl->late.pi_value;
+ mtime_t i_late_median = p[0] + p[1] + p[2] - __MIN(__MIN(p[0],p[1]),p[2]) - __MAX(__MAX(p[0],p[1]),p[2]);
+ mtime_t i_pts_delay = cl->i_pts_delay ;
+
+ vlc_mutex_unlock( &cl->lock );
+
+ return i_pts_delay + i_late_median;
+}
+
/*****************************************************************************
* ClockStreamToSystem: converts a movie clock to system date
*****************************************************************************/
@@ -471,6 +581,15 @@ static mtime_t ClockSystemToStream( input_clock_t *cl, mtime_t i_system )
cl->ref.i_stream;
}
+/**
+ * It returns timestamp display offset due to ref/last modfied on rate changes
+ * It ensures that currently converted dates are not changed.
+ */
+static mtime_t ClockGetTsOffset( input_clock_t *cl )
+{
+ return cl->i_pts_delay * ( cl->i_rate - INPUT_RATE_DEFAULT ) / INPUT_RATE_DEFAULT;
+}
+
/*****************************************************************************
* Long term average helpers
*****************************************************************************/
diff --git a/src/input/clock.h b/src/input/clock.h
index 1384793..ff50c82 100644
--- a/src/input/clock.h
+++ b/src/input/clock.h
@@ -52,9 +52,15 @@ void input_clock_Delete( input_clock_t * );
/**
* This function will update a input_clock_t with a new clock reference point.
+ * It will also tell if the clock point is late regarding our buffering.
+ *
+ * \param b_buffering_allowed tells if we are allowed to bufferize more data in
+ * advanced (if possible).
*/
void input_clock_Update( input_clock_t *, vlc_object_t *p_log,
- bool b_can_pace_control, mtime_t i_clock, mtime_t i_system );
+ bool *pb_late,
+ bool b_can_pace_control, bool b_buffering_allowed,
+ mtime_t i_clock, mtime_t i_system );
/**
* This function will reset the drift of a input_clock_t.
*
@@ -119,5 +125,11 @@ int input_clock_GetState( input_clock_t *,
void input_clock_SetJitter( input_clock_t *,
mtime_t i_pts_delay, int i_cr_average );
+/**
+ * This function returns an estimation of the pts_delay needed to avoid rebufferization.
+ * XXX in the current implementation, the pts_delay will never be decreased.
+ */
+mtime_t input_clock_GetJitter( input_clock_t * );
+
#endif
diff --git a/src/input/decoder.c b/src/input/decoder.c
index b110a1e..c0e9fb5 100644
--- a/src/input/decoder.c
+++ b/src/input/decoder.c
@@ -386,7 +386,11 @@ void input_DecoderDecode( decoder_t *p_dec, block_t *p_block, bool b_do_pace )
if( !p_owner->b_buffering )
block_FifoPace( p_owner->p_fifo, 10, SIZE_MAX );
}
+#ifdef __arm__
else if( block_FifoSize( p_owner->p_fifo ) > 50000000 /* 50 MB */ )
+#else
+ else if( block_FifoSize( p_owner->p_fifo ) > 400000000 /* 400 MB, ie ~ 50mb/s for 60s */ )
+#endif
{
/* FIXME: ideally we would check the time amount of data
* in the FIFO instead of its size. */
@@ -633,6 +637,13 @@ bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_me
return b_changed;
}
+size_t input_DecoderGetFifoSize( decoder_t *p_dec )
+{
+ decoder_owner_sys_t *p_owner = p_dec->p_owner;
+
+ return block_FifoSize( p_owner->p_fifo );
+}
+
/*****************************************************************************
* Internal functions
*****************************************************************************/
diff --git a/src/input/decoder.h b/src/input/decoder.h
index d47119d..fe99b42 100644
--- a/src/input/decoder.h
+++ b/src/input/decoder.h
@@ -99,4 +99,9 @@ void input_DecoderFrameNext( decoder_t *p_dec, mtime_t *pi_duration );
*/
bool input_DecoderHasFormatChanged( decoder_t *p_dec, es_format_t *p_fmt, vlc_meta_t **pp_meta );
+/**
+ * This function returns the current size in bytes of the decoder fifo
+ */
+size_t input_DecoderGetFifoSize( decoder_t *p_dec );
+
#endif
diff --git a/src/input/es_out.c b/src/input/es_out.c
index b67aa36..6f12b18 100644
--- a/src/input/es_out.c
+++ b/src/input/es_out.c
@@ -186,6 +186,7 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da
static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date );
static void EsOutProgramsChangeRate( es_out_t *out );
static void EsOutDecodersStopBuffering( es_out_t *out, bool b_forced );
+
static char *LanguageGetName( const char *psz_code );
static char *LanguageGetCode( const char *psz_lang );
static char **LanguageSplit( const char *psz_langs );
@@ -585,9 +586,7 @@ static void EsOutChangeRate( es_out_t *out, int i_rate )
es_out_sys_t *p_sys = out->p_sys;
p_sys->i_rate = i_rate;
-
- if( !p_sys->b_paused )
- EsOutProgramsChangeRate( out );
+ EsOutProgramsChangeRate( out );
}
static void EsOutChangePosition( es_out_t *out )
@@ -719,6 +718,32 @@ static void EsOutDecodersChangePause( es_out_t *out, bool b_paused, mtime_t i_da
}
}
}
+
+static bool EsOutIsExtraBufferingAllowed( es_out_t *out )
+{
+ es_out_sys_t *p_sys = out->p_sys;
+
+ size_t i_size = 0;
+ for( int i = 0; i < p_sys->i_es; i++ )
+ {
+ es_out_id_t *p_es = p_sys->es[i];
+
+ if( p_es->p_dec )
+ i_size += input_DecoderGetFifoSize( p_es->p_dec );
+ if( p_es->p_dec_record )
+ i_size += input_DecoderGetFifoSize( p_es->p_dec_record );
+ }
+ //fprintf( stderr, "----- EsOutIsExtraBufferingAllowed =% 5d kbytes -- ", i_size / 1024 );
+
+ /* TODO maybe we want to be able to tune it ? */
+#if defined(OPTIMIZE_MEMORY)
+ const size_t i_level_high = 500000; /* 0.5 Mbytes */
+#else
+ const size_t i_level_high = 10000000; /* 10 Mbytes */
+#endif
+ return i_size < i_level_high;
+}
+
static void EsOutProgramChangePause( es_out_t *out, bool b_paused, mtime_t i_date )
{
es_out_sys_t *p_sys = out->p_sys;
@@ -1360,6 +1385,58 @@ static void EsOutProgramUpdateScrambled( es_out_t *p_out, es_out_pgrm_t *p_pgrm
input_SendEventProgramScrambled( p_input, p_pgrm->i_id, b_scrambled );
}
+static void EsOutMeta( es_out_t *p_out, const vlc_meta_t *p_meta )
+{
+ es_out_sys_t *p_sys = p_out->p_sys;
+ input_thread_t *p_input = p_sys->p_input;
+
+ input_item_t *p_item = input_GetItem( p_input );
+
+ char *psz_title = NULL;
+ char *psz_arturl = input_item_GetArtURL( p_item );
+
+ vlc_mutex_lock( &p_item->lock );
+
+ if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name )
+ psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) );
+
+ vlc_meta_Merge( p_item->p_meta, p_meta );
+
+ if( !psz_arturl || *psz_arturl == '\0' )
+ {
+ const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL );
+ if( psz_tmp )
+ psz_arturl = strdup( psz_tmp );
+ }
+ vlc_mutex_unlock( &p_item->lock );
+
+ if( psz_arturl && *psz_arturl )
+ {
+ input_item_SetArtURL( p_item, psz_arturl );
+
+ if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) )
+ {
+ /* Don't look for art cover if sout
+ * XXX It can change when sout has meta data support */
+ if( p_out->b_sout && !p_input->b_preparsing )
+ input_item_SetArtURL( p_item, "" );
+ else
+ input_ExtractAttachmentAndCacheArt( p_input );
+ }
+ }
+ free( psz_arturl );
+
+ if( psz_title )
+ {
+ input_item_SetName( p_item, psz_title );
+ free( psz_title );
+ }
+ input_item_SetPreparsed( p_item, true );
+
+ input_SendEventMeta( p_input );
+ /* TODO handle sout meta ? */
+}
+
/* EsOutAdd:
* Add an es_out
*/
@@ -2226,6 +2303,7 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
int i_group = 0;
int64_t i_pcr;
+ /* Search program */
if( i_query == ES_OUT_SET_PCR )
{
p_pgrm = p_sys->p_pgrm;
@@ -2247,14 +2325,42 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return VLC_EGENERIC;
}
- /* search program
- * TODO do not use mdate() but proper stream acquisition date */
+ /* TODO do not use mdate() but proper stream acquisition date */
+ bool b_late;
input_clock_Update( p_pgrm->p_clock, VLC_OBJECT(p_sys->p_input),
- p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering, i_pcr, mdate() );
- /* Check buffering state on master clock update */
- if( p_sys->b_buffering && p_pgrm == p_sys->p_pgrm )
- EsOutDecodersStopBuffering( out, false );
+ &b_late,
+ p_sys->p_input->p->b_can_pace_control || p_sys->b_buffering,
+ EsOutIsExtraBufferingAllowed( out ),
+ i_pcr, mdate() );
+ if( p_pgrm == p_sys->p_pgrm )
+ {
+ if( p_sys->b_buffering )
+ {
+ /* Check buffering state on master clock update */
+ EsOutDecodersStopBuffering( out, false );
+ }
+ else if( b_late )
+ {
+ mtime_t i_pts_delay = input_clock_GetJitter( p_pgrm->p_clock );
+
+ /* Avoid dangerously high value */
+ const mtime_t i_pts_delay_max = 30000000;
+ if( i_pts_delay > i_pts_delay_max )
+ i_pts_delay = __MAX( i_pts_delay_max, p_sys->i_pts_delay );
+
+ /* Force a rebufferization when we are too late */
+ msg_Err( p_sys->p_input,
+ "ES_OUT_SET_(GROUP_)PCR is called too late, increasing pts_delay to %d ms",
+ (int)(i_pts_delay/1000) );
+
+ /* It is not really good, as we throw away already buffered data
+ * TODO have a mean to correctly reenter bufferization */
+ es_out_Control( out, ES_OUT_RESET_PCR );
+
+ es_out_Control( out, ES_OUT_SET_JITTER, i_pts_delay, p_sys->i_cr_average );
+ }
+ }
return VLC_SUCCESS;
}
@@ -2361,6 +2467,14 @@ static int EsOutControlLocked( es_out_t *out, int i_query, va_list args )
return EsOutProgramDel( out, i_group );
}
+ case ES_OUT_SET_META:
+ {
+ const vlc_meta_t *p_meta = va_arg( args, const vlc_meta_t * );
+
+ EsOutMeta( out, p_meta );
+ return VLC_SUCCESS;
+ }
+
case ES_OUT_GET_WAKE_UP:
{
mtime_t *pi_wakeup = (mtime_t*)va_arg( args, mtime_t* );
diff --git a/src/input/es_out_timeshift.c b/src/input/es_out_timeshift.c
index a48d365..19f4d21 100644
--- a/src/input/es_out_timeshift.c
+++ b/src/input/es_out_timeshift.c
@@ -599,6 +599,7 @@ static int ControlLocked( es_out_t *p_out, int i_query, va_list args )
case ES_OUT_SET_GROUP_EPG:
case ES_OUT_SET_ES_SCRAMBLED_STATE:
case ES_OUT_DEL_GROUP:
+ case ES_OUT_SET_META:
case ES_OUT_SET_ES:
case ES_OUT_RESTART_ES:
case ES_OUT_SET_ES_DEFAULT:
@@ -1315,9 +1316,11 @@ static int CmdInitControl( ts_cmd_t *p_cmd, int i_query, va_list args, bool b_co
case ES_OUT_RESET_PCR: /* no arg */
break;
+ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */
case ES_OUT_SET_GROUP_META: /* arg1=int i_group arg2=vlc_meta_t* */
{
- p_cmd->control.int_meta.i_int = (int)va_arg( args, int );
+ if( i_query == ES_OUT_SET_GROUP_META )
+ p_cmd->control.int_meta.i_int = (int)va_arg( args, int );
vlc_meta_t *p_meta = (vlc_meta_t*)va_arg( args, vlc_meta_t * );
if( b_copy )
@@ -1459,6 +1462,9 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
return es_out_Control( p_out, i_query, p_cmd->control.es_bool.p_es->p_es,
p_cmd->control.es_bool.b_bool );
+ case ES_OUT_SET_META: /* arg1=const vlc_meta_t* */
+ return es_out_Control( p_out, i_query, p_cmd->control.int_meta.p_meta );
+
/* Modified control */
case ES_OUT_SET_ES: /* arg1= es_out_id_t* */
case ES_OUT_RESTART_ES: /* arg1= es_out_id_t* */
@@ -1488,7 +1494,8 @@ static int CmdExecuteControl( es_out_t *p_out, ts_cmd_t *p_cmd )
}
static void CmdCleanControl( ts_cmd_t *p_cmd )
{
- if( p_cmd->control.i_query == ES_OUT_SET_GROUP_META &&
+ if( ( p_cmd->control.i_query == ES_OUT_SET_GROUP_META ||
+ p_cmd->control.i_query == ES_OUT_SET_META ) &&
p_cmd->control.int_meta.p_meta )
{
vlc_meta_Delete( p_cmd->control.int_meta.p_meta );
diff --git a/src/input/input.c b/src/input/input.c
index be4eb7b..d003625 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -763,7 +763,7 @@ static void MainLoop( input_thread_t *p_input )
* is paused -> this may cause problem with some of them
* The same problem can be seen when seeking while paused */
b_paused = p_input->p->i_state == PAUSE_S &&
- !es_out_GetBuffering( p_input->p->p_es_out );
+ ( !es_out_GetBuffering( p_input->p->p_es_out ) || p_input->p->input.b_eof );
if( !b_paused )
{
@@ -773,7 +773,7 @@ static void MainLoop( input_thread_t *p_input )
i_wakeup = es_out_GetWakeup( p_input->p->p_es_out );
}
- else if( !p_input->b_eof && !es_out_GetEmpty( p_input->p->p_es_out ) )
+ else if( !es_out_GetEmpty( p_input->p->p_es_out ) )
{
msg_Dbg( p_input, "waiting decoder fifos to empty" );
i_wakeup = mdate() + INPUT_IDLE_SLEEP;
@@ -816,13 +816,9 @@ static void MainLoop( input_thread_t *p_input )
i_statistic_update = i_current + INT64_C(1000000);
}
- /* Check if i_wakeup is still valid */
+ /* Update the wakeup time */
if( i_wakeup != 0 )
- {
- mtime_t i_new_wakeup = es_out_GetWakeup( p_input->p->p_es_out );
- if( !i_new_wakeup )
- i_wakeup = 0;
- }
+ i_wakeup = es_out_GetWakeup( p_input->p->p_es_out );
} while( i_current < i_wakeup );
}
@@ -1668,9 +1664,8 @@ static bool Control( input_thread_t *p_input,
int64_t i_length;
/* Emulate it with a SET_POS */
- demux_Control( p_input->p->input.p_demux,
- DEMUX_GET_LENGTH, &i_length );
- if( i_length > 0 )
+ if( !demux_Control( p_input->p->input.p_demux,
+ DEMUX_GET_LENGTH, &i_length ) && i_length > 0 )
{
double f_pos = (double)i_time / (double)i_length;
i_ret = demux_Control( p_input->p->input.p_demux,
@@ -2430,8 +2425,9 @@ static int InputSourceInit( input_thread_t *p_input,
if( in->p_demux )
{
/* Get infos from access_demux */
- demux_Control( in->p_demux,
- DEMUX_GET_PTS_DELAY, &in->i_pts_delay );
+ int i_ret = demux_Control( in->p_demux,
+ DEMUX_GET_PTS_DELAY, &in->i_pts_delay );
+ assert( !i_ret );
in->i_pts_delay = __MAX( 0, __MIN( in->i_pts_delay, INPUT_PTS_DELAY_MAX ) );
@@ -2885,54 +2881,8 @@ static void InputMetaUser( input_thread_t *p_input, vlc_meta_t *p_meta )
*****************************************************************************/
static void InputUpdateMeta( input_thread_t *p_input, vlc_meta_t *p_meta )
{
- input_item_t *p_item = p_input->p->p_item;
-
- char *psz_title = NULL;
- char *psz_arturl = input_item_GetArtURL( p_item );
-
- vlc_mutex_lock( &p_item->lock );
-
- if( vlc_meta_Get( p_meta, vlc_meta_Title ) && !p_item->b_fixed_name )
- psz_title = strdup( vlc_meta_Get( p_meta, vlc_meta_Title ) );
-
- vlc_meta_Merge( p_item->p_meta, p_meta );
-
+ es_out_ControlSetMeta( p_input->p->p_es_out, p_meta );
vlc_meta_Delete( p_meta );
-
- if( !psz_arturl || *psz_arturl == '\0' )
- {
- const char *psz_tmp = vlc_meta_Get( p_item->p_meta, vlc_meta_ArtworkURL );
- if( psz_tmp )
- psz_arturl = strdup( psz_tmp );
- }
- vlc_mutex_unlock( &p_item->lock );
-
- if( psz_arturl && *psz_arturl )
- {
- input_item_SetArtURL( p_item, psz_arturl );
-
- if( !strncmp( psz_arturl, "attachment://", strlen("attachment") ) )
- {
- /* Don't look for art cover if sout
- * XXX It can change when sout has meta data support */
- if( p_input->p->p_sout && !p_input->b_preparsing )
- input_item_SetArtURL( p_item, "" );
- else
- input_ExtractAttachmentAndCacheArt( p_input );
- }
- }
- free( psz_arturl );
-
- if( psz_title )
- {
- input_item_SetName( p_item, psz_title );
- free( psz_title );
- }
- input_item_SetPreparsed( p_item, true );
-
- input_SendEventMeta( p_input );
-
- /** \todo handle sout meta */
}
static void AppendAttachment( int *pi_attachment, input_attachment_t ***ppp_attachment,
diff --git a/share/lua/playlist/youtube.lua b/share/lua/playlist/youtube.lua
index 238d3eb..9b165e0 100644
--- a/share/lua/playlist/youtube.lua
+++ b/share/lua/playlist/youtube.lua
@@ -1,7 +1,7 @@
--[[
$Id$
- Copyright © 2007 the VideoLAN team
+ Copyright © 2007-2009 the VideoLAN team
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
@@ -74,7 +74,8 @@ function parse()
end
-- OLD: var swfArgs = {hl:'en',BASE_YT_URL:'http://youtube.com/',video_id:'XPJ7d8dq0t8',l:'292',t:'OEgsToPDskLFdOYrrlDm3FQPoQBYaCP1',sk:'0gnr-AE6QZJEZmCMd3lq_AC'};
-- NEW: var swfArgs = { "BASE_YT_URL": "http://youtube.com", "video_id": "OHVvVmUNBFc", "l": 88, "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA", "tk": "mEL4E7PqHeaZp5OG19NQThHt9mXJU4PbRTOw6lz9osHi4Hixp7RE1w=="};
- if string.match( line, "swfArgs" ) and string.match( line, "video_id" ) then
+ -- NEWER: 'SWF_ARGS': { [a lot of stuff...], "video_id": "OHVvVmUNBFc", "sk": "WswKuJzDBsdD6oG3IakCXgC", "t": "OEgsToPDskK3zO44y0QN8Fr5ZSAZwCQp", "plid": "AARGnwWMrmGkbpOxAAAA4AT4IAA"};
+ if ( string.match( line, "SWF_ARGS" ) or string.match( line, "swfArgs" ) ) and string.match( line, "video_id" ) then
if string.match( line, "BASE_YT_URL" ) then
_,_,base_yt_url = string.find( line, "\"BASE_YT_URL\": \"(.-)\"" )
end
diff --git a/include/vlc_es_out.h b/include/vlc_es_out.h
index 043e557..fdde1c9 100644
--- a/include/vlc_es_out.h
+++ b/include/vlc_es_out.h
@@ -90,6 +90,9 @@ enum es_out_query_e
* XXX You SHALL call ES_OUT_RESET_PCR before any other es_out_Control/Send calls. */
ES_OUT_GET_EMPTY, /* arg1=bool* res=cannot fail */
+ /* Set global meta data (The vlc_meta_t is not modified nor released) */
+ ES_OUT_SET_META, /* arg1=const vlc_meta_t * */
+
/* First value usable for private control */
ES_OUT_PRIVATE_START = 0x10000,
};
@@ -145,6 +148,11 @@ static inline void es_out_Delete( es_out_t *p_out )
p_out->pf_destroy( p_out );
}
+static inline int es_out_ControlSetMeta( es_out_t *out, const vlc_meta_t *p_meta )
+{
+ return es_out_Control( out, ES_OUT_SET_META, p_meta );
+}
+
/**
* @}
*/

@ -1,14 +1,14 @@
# TODO: libdc1394(juju), modularization (vlc-plugin-foo) # TODO: libdc1394(juju), modularization (vlc-plugin-foo)
#global live555_date 2009.07.28 #global live555_date 2009.07.28
#global vlc_rc -rc4 %global vlc_rc -rc
%global vlc_bootstrap 1 %global vlc_bootstrap 1
Summary: Multi-platform MPEG, DVD, and DivX player Summary: Multi-platform MPEG, DVD, and DivX player
Name: vlc Name: vlc
Version: 1.0.2 Version: 1.0.3
Release: 2%{?dist} Release: 0.1_rc%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/Multimedia Group: Applications/Multimedia
URL: http://www.videolan.org URL: http://www.videolan.org
@ -22,7 +22,7 @@ Patch1: 0001-Default-libv4l2-to-true.patch
Patch2: 0002-Default-aout-for-pulse.patch Patch2: 0002-Default-aout-for-pulse.patch
Patch3: 300_all_pic.patch Patch3: 300_all_pic.patch
Patch4: 310_all_mmx_pic.patch Patch4: 310_all_mmx_pic.patch
Patch5: vlc-1.0-bugfix-20091016.patch Patch5: vlc-1.0-bugfix-20091025.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
@ -217,16 +217,6 @@ Requires: vlc-core%{_isa} = %{version}-%{release}
JACK audio plugin for the VLC media player. JACK audio plugin for the VLC media player.
%{?_with_dc1394:
%package plugin-dc1394
Summary: VLC Media Player Plugins for dc1394
Group: Applications/Multimedia
Requires: %{name}-core%{_isa} = %{version}
%description plugin-dc1394
VLC plugin for libdc1394
}
%prep %prep
%setup -q -n %{name}-%{version}%{?vlc_rc} %setup -q -n %{name}-%{version}%{?vlc_rc}
%if 0%{?live555_date:1} %if 0%{?live555_date:1}
@ -244,7 +234,7 @@ sed -i.dmo_pic -e 's/fno-PIC/fPIC/' libs/loader/Makefile.in
rm modules/access/videodev2.h rm modules/access/videodev2.h
ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h ln -sf %{_includedir}/linux/videodev2.h modules/access/videodev2.h
%if 0%{?vlc_bootstrap:1} %if 0%{?vlc_bootstrap:1}
rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || :
./bootstrap ./bootstrap
%endif %endif
@ -502,9 +492,6 @@ fi || :
%exclude %{_libdir}/vlc/audio_output/libjack_plugin.so %exclude %{_libdir}/vlc/audio_output/libjack_plugin.so
%exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so %exclude %{_libdir}/vlc/audio_output/libportaudio_plugin.so
%exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so %exclude %{_libdir}/vlc/audio_output/libpulse_plugin.so
%{?_with_dc1394:
%exclude %{_libdir}/vlc/access/libdc1394_plugin.so
}
%{_libdir}/vlc/ %{_libdir}/vlc/
%{_mandir}/man1/vlc*.1* %{_mandir}/man1/vlc*.1*
@ -524,12 +511,6 @@ fi || :
%{_libdir}/vlc/video_output/libsvgalib_plugin.so %{_libdir}/vlc/video_output/libsvgalib_plugin.so
%endif %endif
%{?_with_dc1394:
%files plugin-dc1394
%defattr(-,root,root,-)
%{_libdir}/vlc/access/libdc1394_plugin.so
}
%files devel %files devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc HACKING %doc HACKING
@ -549,6 +530,9 @@ fi || :
%changelog %changelog
* Sun Oct 25 2009 kwizart < kwizart at gmail.com > - 1.0.3.0.1_rc
- Update to 1.0.3-rc
* Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2 * Thu Oct 16 2009 kwizart < kwizart at gmail.com > - 1.0.2-2
- Update to 1.0-bugfix 20091016 - Update to 1.0-bugfix 20091016
- Rebuild for x264/ffmpeg - Rebuild for x264/ffmpeg

Loading…
Cancel
Save