Commit 8aa9a6a3 authored by Christophe Massiot's avatar Christophe Massiot

* Minor changes to the open panel, added AVI stream output option,

* modules/gui/macosx/open.m: "Open File" is back,
* modules/codec/mpeg_video/synchro.c: Fixed a counting bug.
parent bc03a973
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>IBDocumentLocation</key> <key>IBDocumentLocation</key>
<string>642 60 365 441 0 0 1280 1002 </string> <string>282 82 365 441 0 0 1152 746 </string>
<key>IBEditorPositions</key> <key>IBEditorPositions</key>
<dict> <dict>
<key>29</key> <key>29</key>
<string>16 822 374 44 0 0 1280 1002 </string> <string>14 602 374 44 0 0 1152 746 </string>
<key>303</key> <key>303</key>
<string>60 509 104 66 0 0 1280 1002 </string> <string>60 509 104 66 0 0 1280 1002 </string>
<key>909</key> <key>909</key>
<string>425 600 430 172 0 0 1280 1002 </string> <string>72 297 430 172 0 0 1152 746 </string>
<key>915</key> <key>915</key>
<string>439 657 93 96 0 0 1280 1002 </string> <string>439 657 93 96 0 0 1280 1002 </string>
</dict> </dict>
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
</array> </array>
<key>IBOpenObjects</key> <key>IBOpenObjects</key>
<array> <array>
<integer>21</integer> <integer>636</integer>
<integer>909</integer>
</array> </array>
<key>IBSystem Version</key> <key>IBSystem Version</key>
<string>6G30</string> <string>6G30</string>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vpar_synchro.c : frame dropping routines * vpar_synchro.c : frame dropping routines
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: synchro.c,v 1.6 2002/12/31 01:59:46 massiot Exp $ * $Id: synchro.c,v 1.7 2003/01/23 21:47:59 massiot Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* Samuel Hocevar <sam@via.ecp.fr> * Samuel Hocevar <sam@via.ecp.fr>
...@@ -408,8 +408,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type, ...@@ -408,8 +408,7 @@ void vpar_SynchroNewPicture( vpar_thread_t * p_vpar, int i_coding_type,
{ {
msg_Dbg( p_vpar->p_fifo, "decoded %d/%d pictures", msg_Dbg( p_vpar->p_fifo, "decoded %d/%d pictures",
p_vpar->synchro.i_pic p_vpar->synchro.i_pic
- p_vpar->synchro.i_trashed_pic - p_vpar->synchro.i_trashed_pic,
- p_vpar->synchro.i_not_chosen_pic,
p_vpar->synchro.i_pic ); p_vpar->synchro.i_pic );
p_vpar->synchro.i_trashed_pic = p_vpar->synchro.i_not_chosen_pic p_vpar->synchro.i_trashed_pic = p_vpar->synchro.i_not_chosen_pic
= p_vpar->synchro.i_pic = 0; = p_vpar->synchro.i_pic = 0;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.m: MacOS X interface plugin * intf.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: intf.m,v 1.30 2003/01/22 02:39:33 hartman Exp $ * $Id: intf.m,v 1.31 2003/01/23 21:47:59 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -425,6 +425,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -425,6 +425,7 @@ static void Run( intf_thread_t *p_intf )
if( p_intf->p_sys->p_sub->i_start != i_stop ) if( p_intf->p_sys->p_sub->i_start != i_stop )
{ {
#if 0
NSColor *o_white = [NSColor whiteColor]; NSColor *o_white = [NSColor whiteColor];
NSColor *o_red = [NSColor redColor]; NSColor *o_red = [NSColor redColor];
NSColor *o_yellow = [NSColor yellowColor]; NSColor *o_yellow = [NSColor yellowColor];
...@@ -439,16 +440,20 @@ static void Run( intf_thread_t *p_intf ) ...@@ -439,16 +440,20 @@ static void Run( intf_thread_t *p_intf )
[o_messages setEditable: YES]; [o_messages setEditable: YES];
[o_messages setSelectedRange: NSMakeRange( ui_length, 0 )]; [o_messages setSelectedRange: NSMakeRange( ui_length, 0 )];
[o_messages scrollRangeToVisible: NSMakeRange( ui_length, 0 )]; [o_messages scrollRangeToVisible: NSMakeRange( ui_length, 0 )];
#endif
for( i_start = p_intf->p_sys->p_sub->i_start; for( i_start = p_intf->p_sys->p_sub->i_start;
i_start != i_stop; i_start != i_stop;
i_start = (i_start+1) % VLC_MSG_QSIZE ) i_start = (i_start+1) % VLC_MSG_QSIZE )
{ {
#if 0
NSString *o_msg; NSString *o_msg;
NSDictionary *o_attr; NSDictionary *o_attr;
NSAttributedString *o_msg_color; NSAttributedString *o_msg_color;
#endif
int i_type = p_intf->p_sys->p_sub->p_msg[i_start].i_type; int i_type = p_intf->p_sys->p_sub->p_msg[i_start].i_type;
#if 0
o_attr = [NSDictionary dictionaryWithObject: o_gray o_attr = [NSDictionary dictionaryWithObject: o_gray
forKey: NSForegroundColorAttributeName]; forKey: NSForegroundColorAttributeName];
o_msg = [NSString stringWithFormat: @"%s%s", o_msg = [NSString stringWithFormat: @"%s%s",
...@@ -467,6 +472,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -467,6 +472,7 @@ static void Run( intf_thread_t *p_intf )
[o_messages insertText: o_msg_color]; [o_messages insertText: o_msg_color];
[o_messages insertText: @"\n"]; [o_messages insertText: @"\n"];
#endif
if ( i_type == 1 ) if ( i_type == 1 )
{ {
...@@ -486,7 +492,9 @@ static void Run( intf_thread_t *p_intf ) ...@@ -486,7 +492,9 @@ static void Run( intf_thread_t *p_intf )
} }
} }
#if 0
[o_messages setEditable: NO]; [o_messages setEditable: NO];
#endif
vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock ); vlc_mutex_lock( p_intf->p_sys->p_sub->p_lock );
p_intf->p_sys->p_sub->i_start = i_start; p_intf->p_sys->p_sub->i_start = i_start;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.h: MacOS X plugin for vlc * open.h: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: open.h,v 1.7 2003/01/20 03:45:06 hartman Exp $ * $Id: open.h,v 1.8 2003/01/23 21:47:59 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* *
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
NSArray *GetEjectableMediaOfClass( const char *psz_class ); NSArray *GetEjectableMediaOfClass( const char *psz_class );
#define OPEN_PANEL_FULL_HEIGHT 494 #define OPEN_PANEL_FULL_HEIGHT 498
#define OPEN_PANEL_SHORT_HEIGHT 325 #define OPEN_PANEL_SHORT_HEIGHT 329
#define WINDOW_TITLE_HEIGHT 21 #define WINDOW_TITLE_HEIGHT 21
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* open.m: MacOS X plugin for vlc * open.m: MacOS X plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2002 VideoLAN * Copyright (C) 2002 VideoLAN
* $Id: open.m,v 1.12 2003/01/23 11:48:18 massiot Exp $ * $Id: open.m,v 1.13 2003/01/23 21:47:59 massiot Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr> * Christophe Massiot <massiot@via.ecp.fr>
...@@ -187,7 +187,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -187,7 +187,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[o_disc_title_lbl setStringValue: _NS("Title")]; [o_disc_title_lbl setStringValue: _NS("Title")];
[o_disc_chapter_lbl setStringValue: _NS("Chapter")]; [o_disc_chapter_lbl setStringValue: _NS("Chapter")];
[o_disc_videots_btn_browse setStringValue: _NS("Browse...")]; [o_disc_videots_btn_browse setStringValue: _NS("Browse...")];
[o_disc_dvd_menus setTitle: _NS("Use DVD menus")]; [o_disc_dvd_menus setTitle: _NS("Use DVD menus (EXPERIMENTAL)")];
[[o_disc_type cellAtRow:0 column:0] setTitle: _NS("VIDEO_TS folder")]; [[o_disc_type cellAtRow:0 column:0] setTitle: _NS("VIDEO_TS folder")];
[[o_disc_type cellAtRow:1 column:0] setTitle: _NS("DVD")]; [[o_disc_type cellAtRow:1 column:0] setTitle: _NS("DVD")];
...@@ -220,8 +220,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -220,8 +220,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[o_sout_udp_addr_lbl setStringValue: _NS("Address")]; [o_sout_udp_addr_lbl setStringValue: _NS("Address")];
[o_sout_udp_port_lbl setStringValue: _NS("Port")]; [o_sout_udp_port_lbl setStringValue: _NS("Port")];
[[o_sout_mux cellAtRow:0 column:0] setTitle: _NS("PS")]; [[o_sout_mux cellAtRow:0 column:0] setTitle: _NS("AVI")];
[[o_sout_mux cellAtRow:0 column:1] setTitle: _NS("TS")]; [[o_sout_mux cellAtRow:0 column:1] setTitle: _NS("PS")];
[[o_sout_mux cellAtRow:0 column:2] setTitle: _NS("TS")];
[[NSNotificationCenter defaultCenter] addObserver: self [[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(openFilePathChanged:) selector: @selector(openFilePathChanged:)
...@@ -787,10 +788,11 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -787,10 +788,11 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[o_sout_udp_port setEnabled: b_net]; [o_sout_udp_port setEnabled: b_net];
[o_sout_udp_port_stp setEnabled: b_net]; [o_sout_udp_port_stp setEnabled: b_net];
[[o_sout_mux cellAtRow:0 column: 0] setEnabled: !b_net]; [[o_sout_mux cellAtRow:0 column: 0] setEnabled: !b_net];
[[o_sout_mux cellAtRow:0 column: 1] setEnabled: !b_net];
if ( b_net ) if ( b_net )
{ {
[[o_sout_mux cellAtRow: 0 column:1] setState: YES]; [[o_sout_mux cellAtRow: 0 column:2] setState: YES];
} }
[self soutInfoChanged: nil]; [self soutInfoChanged: nil];
...@@ -806,7 +808,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -806,7 +808,8 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
o_mode = [[o_sout_access selectedCell] title]; o_mode = [[o_sout_access selectedCell] title];
o_mux = [[o_sout_mux selectedCell] title]; o_mux = [[o_sout_mux selectedCell] title];
if ( [o_mux isEqualToString: _NS("PS")] ) o_mux_string = @"ps"; if ( [o_mux isEqualToString: _NS("AVI")] ) o_mux_string = @"avi";
else if ( [o_mux isEqualToString: _NS("PS")] ) o_mux_string = @"ps";
else o_mux_string = @"ts"; else o_mux_string = @"ts";
if ( [o_mode isEqualToString: _NS("File")] ) if ( [o_mode isEqualToString: _NS("File")] )
...@@ -840,8 +843,19 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ) ...@@ -840,8 +843,19 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
- (IBAction)openFile:(id)sender - (IBAction)openFile:(id)sender
{ {
[self openFilePathChanged: nil]; NSOpenPanel *o_open_panel = [NSOpenPanel openPanel];
[self openTarget: 0];
[o_open_panel setAllowsMultipleSelection: NO];
[o_open_panel setTitle: _NS("Open File")];
[o_open_panel setPrompt: _NS("Open")];
if( [o_open_panel runModalForDirectory: nil
file: nil types: nil] == NSOKButton )
{
intf_thread_t * p_intf = [NSApp getIntf];
config_PutPsz( p_intf, "sout", NULL );
[o_playlist appendArray: [o_open_panel filenames] atPos: -1 enqueue: 0];
}
} }
- (IBAction)panelCancel:(id)sender - (IBAction)panelCancel:(id)sender
......
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