Commit 89b7b9c4 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

* backport:

 - h264 packetizer changes
 - add mp2v fourcc to libmpeg2 decoder
 - shoutcast TV fix for the OS X GUI
 - fix for time in http
parent 0903720e
......@@ -116,6 +116,7 @@ static int OpenDecoder( vlc_object_t *p_this )
p_dec->fmt_in.i_codec != VLC_FOURCC('P','I','M','1') &&
/* ATI Video */
p_dec->fmt_in.i_codec != VLC_FOURCC('V','C','R','2') &&
p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','2','v') &&
p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','2') &&
p_dec->fmt_in.i_codec != VLC_FOURCC('h','d','v','2') )
{
......
......@@ -521,9 +521,9 @@ static void ParseExecute( httpd_file_sys_t *p_args, char *p_buffer,
var_Get( p_sys->p_input, "position", &val);
sprintf( position, "%d" , (int)((val.f_float) * 100.0));
var_Get( p_sys->p_input, "time", &val);
sprintf( time, "%d" , (int)(val.i_time / 1000000) );
sprintf( time, I64Fi, val.i_time / 1000000LL );
var_Get( p_sys->p_input, "length", &val);
sprintf( length, "%d" , (int)(val.i_time / 1000000) );
sprintf( length, I64Fi, val.i_time / 1000000LL );
var_Get( p_sys->p_input, "state", &val );
if( val.i_int == PLAYING_S )
......
......@@ -423,40 +423,44 @@
for( i_index = 0; i_index < p_list->i_count; i_index++ )
{
NSMenuItem * o_lmi;
module_t * p_parser = (module_t *)p_list->p_values[i_index].p_object ;
vlc_bool_t b_enabled;
char *objectname;
NSMenuItem *o_lmi;
module_t *p_parser = (module_t *)p_list->p_values[i_index].p_object ;
if( !strcmp( p_parser->psz_capability, "services_discovery" ) )
{
/* create the menu entries used in the playlist menu */
/* Check for submodules */
int i = -1;
while( p_parser->pp_shortcuts[++i] != NULL ); i--;
/* Check whether to enable these menuitems */
objectname = i>=0 ? p_parser->pp_shortcuts[i] : p_parser->psz_object_name;
b_enabled = playlist_IsServicesDiscoveryLoaded( p_playlist, objectname );
/* Create the menu entries used in the playlist menu */
o_lmi = [[o_mi_services submenu] addItemWithTitle:
[NSString stringWithUTF8String:
p_parser->psz_longname ? p_parser->psz_longname :
( p_parser->psz_shortname ? p_parser->psz_shortname:
p_parser->psz_object_name)]
objectname)]
action: @selector(servicesChange:)
keyEquivalent: @""];
[o_lmi setTarget: self];
[o_lmi setRepresentedObject:
[NSString stringWithCString: p_parser->psz_object_name]];
if( playlist_IsServicesDiscoveryLoaded( p_playlist,
p_parser->psz_object_name ) )
[o_lmi setState: NSOnState];
[o_lmi setRepresentedObject: [NSString stringWithCString: objectname]];
if( b_enabled ) [o_lmi setState: NSOnState];
/* create the menu entries for the main menu */
/* Create the menu entries for the main menu */
o_lmi = [[o_mm_mi_services submenu] addItemWithTitle:
[NSString stringWithUTF8String:
p_parser->psz_longname ? p_parser->psz_longname :
( p_parser->psz_shortname ? p_parser->psz_shortname:
p_parser->psz_object_name)]
objectname)]
action: @selector(servicesChange:)
keyEquivalent: @""];
[o_lmi setTarget: self];
[o_lmi setRepresentedObject:
[NSString stringWithCString: p_parser->psz_object_name]];
if( playlist_IsServicesDiscoveryLoaded( p_playlist,
p_parser->psz_object_name ) )
[o_lmi setState: NSOnState];
[o_lmi setRepresentedObject: [NSString stringWithCString:objectname]];
if( b_enabled ) [o_lmi setState: NSOnState];
}
}
vlc_list_release( p_list );
......
......@@ -7,6 +7,7 @@
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Eric Petit <titer@videolan.org>
* Gildas Bazin <gbazin@videolan.org>
* Derk-Jan Hartman <hartman at videolan dot org>
*
* 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
......@@ -69,6 +70,7 @@ struct decoder_sys_t
vlc_bool_t b_sps;
vlc_bool_t b_pps;
vlc_bool_t b_header;
/* avcC data */
int i_avcC_length_size;
......@@ -160,6 +162,7 @@ static int Open( vlc_object_t *p_this )
p_sys->b_pps = VLC_FALSE;
p_sys->p_sps = 0;
p_sys->p_pps = 0;
p_sys->b_header= VLC_FALSE;
p_sys->i_nal_type = -1;
p_sys->i_nal_ref_idc = -1;
......@@ -220,6 +223,7 @@ static int Open( vlc_object_t *p_this )
p_dec->fmt_out.p_extra = (uint8_t*)malloc( p_dec->fmt_out.i_extra );
memcpy( p_dec->fmt_out.p_extra, p_sys->p_sps->p_buffer, p_sys->p_sps->i_buffer);
memcpy( p_dec->fmt_out.p_extra+p_sys->p_sps->i_buffer, p_sys->p_pps->p_buffer, p_sys->p_pps->i_buffer);
p_sys->b_header = VLC_TRUE;
/* Set callback */
p_dec->pf_packetize = PacketizeAVC1;
......@@ -478,6 +482,9 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
#define OUTPUT \
do { \
if( !p_sys->b_header && p_sys->i_frame_type != BLOCK_FLAG_TYPE_I) \
break; \
\
p_pic = block_ChainGather( p_sys->p_frame ); \
p_pic->i_length = 0; /* FIXME */ \
p_pic->i_flags |= p_sys->i_frame_type; \
......@@ -495,7 +502,8 @@ static block_t *ParseNALBlock( decoder_t *p_dec, block_t *p_frag )
p_sps->i_pts = p_pps->i_pts = p_pic->i_pts; \
block_ChainAppend( &p_sps, p_pps ); \
block_ChainAppend( &p_sps, p_pic ); \
p_pic = block_ChainGather( p_sps ); \
p_pic = p_sps; \
p_sys->b_header = VLC_TRUE; \
} \
} while(0)
......
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