Commit 52c18c4d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Merge branch 1.0-bugfix

parents 49d534e0 deb3a851
...@@ -230,6 +230,7 @@ $Id$ ...@@ -230,6 +230,7 @@ $Id$
* osdmenu: video_filter for displaying and streaming a On Screen Display menu * osdmenu: video_filter for displaying and streaming a On Screen Display menu
* oss: audio output module using the OSS /dev/dsp interface * oss: audio output module using the OSS /dev/dsp interface
* packetizer_copy: Simple copy packetizer * packetizer_copy: Simple copy packetizer
* packetizer_dirac: Dirac video packetizer
* packetizer_h264: H264 video packetizer * packetizer_h264: H264 video packetizer
* packetizer_mlp: MLP/TrueHD audio packetizer * packetizer_mlp: MLP/TrueHD audio packetizer
* packetizer_mpeg4audio: MPEG4 audio packetizer * packetizer_mpeg4audio: MPEG4 audio packetizer
......
...@@ -55,10 +55,12 @@ ...@@ -55,10 +55,12 @@
IBOutlet id o_specificTime_mi; IBOutlet id o_specificTime_mi;
VLCFSPanel *o_fs_panel; VLCFSPanel *o_fs_panel;
BOOL b_lockAspectRatio;
} }
- (void)controlTintChanged; - (void)controlTintChanged;
- (id)voutView; - (id)voutView;
- (BOOL)aspectRatioIsLocked;
- (IBAction)play:(id)sender; - (IBAction)play:(id)sender;
- (IBAction)stop:(id)sender; - (IBAction)stop:(id)sender;
...@@ -93,6 +95,7 @@ ...@@ -93,6 +95,7 @@
- (IBAction)telxTransparent:(id)sender; - (IBAction)telxTransparent:(id)sender;
- (IBAction)telxNavLink:(id)sender; - (IBAction)telxNavLink:(id)sender;
- (IBAction)lockVideosAspectRatio:(id)sender;
- (IBAction)addSubtitleFile:(id)sender; - (IBAction)addSubtitleFile:(id)sender;
- (BOOL)keyEvent:(NSEvent *)o_event; - (BOOL)keyEvent:(NSEvent *)o_event;
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
{ {
[super init]; [super init];
o_fs_panel = [[VLCFSPanel alloc] init]; o_fs_panel = [[VLCFSPanel alloc] init];
b_lockAspectRatio = YES;
return self; return self;
} }
...@@ -156,6 +157,11 @@ ...@@ -156,6 +157,11 @@
return [[o_voutView retain] autorelease]; return [[o_voutView retain] autorelease];
} }
- (BOOL)aspectRatioIsLocked
{
return b_lockAspectRatio;
}
- (IBAction)stop:(id)sender - (IBAction)stop:(id)sender
{ {
intf_thread_t * p_intf = VLCIntf; intf_thread_t * p_intf = VLCIntf;
...@@ -548,6 +554,16 @@ ...@@ -548,6 +554,16 @@
} }
} }
- (IBAction)lockVideosAspectRatio:(id)sender
{
if( [sender state] == NSOffState )
[sender setState: NSOnState];
else
[sender setState: NSOffState];
b_lockAspectRatio = !b_lockAspectRatio;
}
- (IBAction)addSubtitleFile:(id)sender - (IBAction)addSubtitleFile:(id)sender
{ {
NSInteger i_returnValue = 0; NSInteger i_returnValue = 0;
...@@ -580,7 +596,6 @@ ...@@ -580,7 +596,6 @@
if( input_AddSubtitle( p_input, [[[openPanel filenames] objectAtIndex: i] UTF8String], TRUE ) ) if( input_AddSubtitle( p_input, [[[openPanel filenames] objectAtIndex: i] UTF8String], TRUE ) )
msg_Warn( VLCIntf, "unable to load subtitles from '%s'", msg_Warn( VLCIntf, "unable to load subtitles from '%s'",
[[[openPanel filenames] objectAtIndex: i] UTF8String] ); [[[openPanel filenames] objectAtIndex: i] UTF8String] );
i++;
} }
} }
} }
...@@ -785,6 +800,18 @@ ...@@ -785,6 +800,18 @@
/* make (un)sensitive */ /* make (un)sensitive */
[o_parent setEnabled: ( val_list.p_list->i_count > 1 )]; [o_parent setEnabled: ( val_list.p_list->i_count > 1 )];
/* Aspect Ratio */
if( [[o_parent title] isEqualToString: _NS("Aspect-ratio")] == YES )
{
NSMenuItem *o_lmi_tmp2;
o_lmi_tmp2 = [o_menu addItemWithTitle: _NS("Lock Aspect Ratio") action: @selector(lockVideosAspectRatio:) keyEquivalent: @""];
[o_lmi_tmp2 setTarget: self];
[o_lmi_tmp2 setEnabled: YES];
[o_lmi_tmp2 setState: b_lockAspectRatio];
[o_parent setEnabled: YES];
[o_menu addItem: [NSMenuItem separatorItem]];
}
/* special case for the subtitles items */ /* special case for the subtitles items */
if( [[o_parent title] isEqualToString: _NS("Subtitles Track")] == YES ) if( [[o_parent title] isEqualToString: _NS("Subtitles Track")] == YES )
{ {
......
...@@ -107,7 +107,8 @@ static int Create( vlc_object_t *p_this ) ...@@ -107,7 +107,8 @@ static int Create( vlc_object_t *p_this )
config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options, config_ChainParse( p_filter, CFG_PREFIX, ppsz_filter_options,
p_filter->p_cfg ); p_filter->p_cfg );
p_sys->p_mask = NULL; psz_string =
var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
if( psz_string && *psz_string ) if( psz_string && *psz_string )
{ {
LoadMask( p_filter, psz_string ); LoadMask( p_filter, psz_string );
...@@ -115,11 +116,11 @@ static int Create( vlc_object_t *p_this ) ...@@ -115,11 +116,11 @@ static int Create( vlc_object_t *p_this )
msg_Err( p_filter, "Error while loading mask (%s).", msg_Err( p_filter, "Error while loading mask (%s).",
psz_string ); psz_string );
} }
else
p_sys->p_mask = NULL;
free( psz_string ); free( psz_string );
vlc_mutex_init( &p_sys->mask_lock ); vlc_mutex_init( &p_sys->mask_lock );
psz_string =
var_CreateGetStringCommand( p_filter, CFG_PREFIX "mask" );
var_AddCallback( p_filter, CFG_PREFIX "mask", MaskCallback, var_AddCallback( p_filter, CFG_PREFIX "mask", MaskCallback,
p_filter ); p_filter );
p_filter->pf_video_filter = Filter; p_filter->pf_video_filter = Filter;
......
...@@ -282,6 +282,7 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance, ...@@ -282,6 +282,7 @@ libvlc_media_player_new( libvlc_instance_t * p_libvlc_instance,
p_mi->drawable.agl = 0; p_mi->drawable.agl = 0;
p_mi->drawable.xid = 0; p_mi->drawable.xid = 0;
p_mi->drawable.hwnd = NULL; p_mi->drawable.hwnd = NULL;
p_mi->drawable.nsobject = NULL;
p_mi->p_libvlc_instance = p_libvlc_instance; p_mi->p_libvlc_instance = p_libvlc_instance;
p_mi->p_input_thread = NULL; p_mi->p_input_thread = NULL;
p_mi->i_refcount = 1; p_mi->i_refcount = 1;
......
...@@ -234,7 +234,7 @@ int demux_vaControlHelper( stream_t *s, ...@@ -234,7 +234,7 @@ int demux_vaControlHelper( stream_t *s,
case DEMUX_GET_TIME: case DEMUX_GET_TIME:
pi64 = (int64_t*)va_arg( args, int64_t * ); pi64 = (int64_t*)va_arg( args, int64_t * );
if( i_bitrate > 0 && i_end > i_start ) if( i_bitrate > 0 && i_tell >= i_start )
{ {
*pi64 = INT64_C(8000000) * (i_tell - i_start) / i_bitrate; *pi64 = INT64_C(8000000) * (i_tell - i_start) / i_bitrate;
return VLC_SUCCESS; return VLC_SUCCESS;
......
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