From: Felix Paul Kühne Date: Fri, 31 Jul 2009 13:09:53 +0000 (+0200) Subject: macosx: implemented the input-slave option for file inputs X-Git-Tag: 1.1.0-ff~4664 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b20a12f3815b03e69c92ecdbfa0b0a19c7eea6d5;p=vlc macosx: implemented the input-slave option for file inputs --- diff --git a/extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib b/extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib index 2321d51fdc..ac0b13f948 100644 --- a/extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib +++ b/extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib @@ -2,17 +2,16 @@ 1050 - 9L16 + 9L30 677 949.54 353.00 YES - - + - + YES @@ -146,7 +145,7 @@ 1 - + 256 YES @@ -271,19 +270,92 @@ 25 + + + 288 + {{18, 93}, {419, 18}} + + YES + + 67239424 + 0 + Play another media synchronously + + + 1211912703 + 2 + + + + 200 + 25 + + + + + 288 + {{391, 84}, {123, 32}} + + YES + + 604110336 + 137887744 + Choose... + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 268 + {{36, 78}, {475, 14}} + + YES + + 70385217 + 272761856 + IlN1Y2ggR3JlYXQgSGVpZ2h0cy5tcDMiA + + LucidaGrande + 1.100000e+01 + 3100 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2OQA + + + + 6 + System + controlShadowColor + + 3 + MC4zMzMzMzMzNAA + + + + {{10, 33}, {528, 232}} + File - - 6 - System - controlColor - - 3 - MC42NjY2NjY2OQA - - + @@ -671,7 +743,7 @@ - + 256 YES @@ -718,11 +790,7 @@ 67239424 138412032 To Open a usual network stream (HTTP, RTSP, MMS, FTP, etc.), just enter the URL in the field above. If you want to open a RTP or UDP stream, press the button below. - - LucidaGrande - 1.100000e+01 - 3100 - + @@ -759,7 +827,6 @@ {{10, 33}, {528, 232}} - Network @@ -859,14 +926,14 @@ - + 0 YES YES YES - + @@ -2907,7 +2974,7 @@ ZCBWTEMncyBFeWVUViBwbHVnaW4uA NSResponder - + 256 YES @@ -2947,6 +3014,7 @@ cmUgaXMgaW5zdGFsbGVkIGFuZCB0cnkgYWdhaW4uA {528, 222} + NSView @@ -3126,7 +3194,7 @@ cmUgaXMgaW5zdGFsbGVkIGFuZCB0cnkgYWdhaW4uA NSResponder - + 256 YES @@ -3554,7 +3622,6 @@ cmUgaXMgaW5zdGFsbGVkIGFuZCB0cnkgYWdhaW4uA {528, 222} - NSView NSResponder @@ -3563,9 +3630,7 @@ cmUgaXMgaW5zdGFsbGVkIGFuZCB0cnkgYWdhaW4uA 2 {{246, 437}, {656, 249}} 1886912512 - - Panel - + Open UDP/RTP Streams NSPanel @@ -3575,7 +3640,7 @@ cmUgaXMgaW5zdGFsbGVkIGFuZCB0cnkgYWdhaW4uA {3.40282e+38, 3.40282e+38} {213, 107} - + 256 YES @@ -4181,7 +4246,6 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA {656, 249} - {{0, 0}, {1280, 778}} {213, 129} @@ -6142,6 +6206,54 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA 2865 + + + inputSlaveAction: + + + + 3003 + + + + inputSlaveAction: + + + + 3006 + + + + o_slave_select_btn + + + + 3007 + + + + o_file_slave_ckbox + + + + 3010 + + + + o_file_slave_select_btn + + + + 3011 + + + + o_file_slave_filename_txt + + + + 3012 + @@ -6199,13 +6311,13 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA YES - - - - + + + + @@ -6419,6 +6531,9 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA + + + @@ -8722,6 +8837,48 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA + + 2995 + + + YES + + + + + + 2998 + + + + + 3004 + + + YES + + + + + + 3005 + + + + + 3008 + + + YES + + + + + + 3009 + + + @@ -8951,6 +9108,7 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA 2299.ImportedFromIB2 2300.IBPluginDependency 2300.ImportedFromIB2 + 2301.IBEditorWindowLastContentRect 2301.IBPluginDependency 2301.ImportedFromIB2 2302.IBPluginDependency @@ -9102,6 +9260,142 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA 2861.ImportedFromIB2 2862.IBPluginDependency 2862.ImportedFromIB2 + 2867.IBPluginDependency + 2868.IBPluginDependency + 2869.IBPluginDependency + 2870.IBPluginDependency + 2871.IBPluginDependency + 2872.IBPluginDependency + 2873.IBPluginDependency + 2874.IBPluginDependency + 2875.IBPluginDependency + 2876.IBPluginDependency + 2877.IBPluginDependency + 2878.IBPluginDependency + 2879.IBPluginDependency + 2880.IBPluginDependency + 2881.IBPluginDependency + 2882.IBPluginDependency + 2883.IBPluginDependency + 2884.IBPluginDependency + 2885.IBPluginDependency + 2886.IBPluginDependency + 2887.IBPluginDependency + 2888.IBPluginDependency + 2889.IBPluginDependency + 2890.IBPluginDependency + 2891.IBPluginDependency + 2892.IBPluginDependency + 2893.IBPluginDependency + 2894.IBPluginDependency + 2895.IBPluginDependency + 2896.IBPluginDependency + 2897.IBPluginDependency + 2898.IBPluginDependency + 2899.IBPluginDependency + 2900.IBPluginDependency + 2901.IBPluginDependency + 2902.IBPluginDependency + 2903.IBPluginDependency + 2904.IBPluginDependency + 2905.IBPluginDependency + 2906.IBPluginDependency + 2907.IBPluginDependency + 2908.IBPluginDependency + 2909.IBPluginDependency + 2910.IBPluginDependency + 2911.IBPluginDependency + 2912.IBPluginDependency + 2913.IBPluginDependency + 2914.IBPluginDependency + 2915.IBPluginDependency + 2916.IBPluginDependency + 2917.IBPluginDependency + 2918.IBPluginDependency + 2919.IBPluginDependency + 2920.IBPluginDependency + 2921.IBPluginDependency + 2922.IBPluginDependency + 2923.IBPluginDependency + 2924.IBPluginDependency + 2925.IBPluginDependency + 2926.IBPluginDependency + 2927.IBPluginDependency + 2928.IBPluginDependency + 2929.IBPluginDependency + 2930.IBPluginDependency + 2931.IBPluginDependency + 2932.IBPluginDependency + 2933.IBPluginDependency + 2934.IBPluginDependency + 2935.IBPluginDependency + 2936.IBPluginDependency + 2937.IBPluginDependency + 2938.IBPluginDependency + 2939.IBPluginDependency + 2940.IBPluginDependency + 2941.IBPluginDependency + 2942.IBPluginDependency + 2943.IBPluginDependency + 2944.IBPluginDependency + 2945.IBPluginDependency + 2946.IBPluginDependency + 2947.IBPluginDependency + 2948.IBPluginDependency + 2949.IBPluginDependency + 2950.IBPluginDependency + 2951.IBPluginDependency + 2952.IBPluginDependency + 2953.IBPluginDependency + 2954.IBPluginDependency + 2955.IBPluginDependency + 2956.IBPluginDependency + 2957.IBPluginDependency + 2958.IBPluginDependency + 2959.IBPluginDependency + 2960.IBPluginDependency + 2961.IBPluginDependency + 2962.IBPluginDependency + 2963.IBPluginDependency + 2964.IBPluginDependency + 2965.IBPluginDependency + 2966.IBPluginDependency + 2967.IBPluginDependency + 2968.IBPluginDependency + 2969.IBPluginDependency + 2970.IBPluginDependency + 2971.IBPluginDependency + 2972.IBPluginDependency + 2973.IBPluginDependency + 2974.IBPluginDependency + 2975.IBPluginDependency + 2976.IBPluginDependency + 2977.IBPluginDependency + 2978.IBPluginDependency + 2979.IBPluginDependency + 2980.IBPluginDependency + 2981.IBPluginDependency + 2982.IBPluginDependency + 2983.IBPluginDependency + 2984.IBPluginDependency + 2985.IBPluginDependency + 2986.IBPluginDependency + 2987.IBPluginDependency + 2988.IBPluginDependency + 2989.IBPluginDependency + 2990.IBPluginDependency + 2991.IBPluginDependency + 2992.IBPluginDependency + 2993.IBPluginDependency + 2994.IBPluginDependency + 2995.IBPluginDependency + 2995.ImportedFromIB2 + 2998.IBPluginDependency + 3004.IBPluginDependency + 3004.ImportedFromIB2 + 3005.IBPluginDependency + 3008.IBPluginDependency + 3009.IBPluginDependency 408.IBPluginDependency 408.ImportedFromIB2 636.IBEditorWindowLastContentRect @@ -9392,6 +9686,7 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA com.apple.InterfaceBuilder.CocoaPlugin + {{343, 523}, {528, 222}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -9544,9 +9839,145 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin - {{343, 193}, {574, 380}} - {{343, 193}, {574, 380}} + {{355, 317}, {574, 380}} + {{355, 317}, {574, 380}} {213, 107} @@ -9629,13 +10060,14 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA - 2994 + 3012 YES FirstResponder + NSObject IBUserSource @@ -9643,11 +10075,26 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA NSApplication + + IBProjectSource + ../../../modules/gui/macosx/applescript.h + + + + NSApplication + NSResponder IBUserSource + + NSObject + + IBProjectSource + ../../../modules/gui/macosx/AppleRemote.h + + NSObject @@ -9666,16 +10113,13 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA eyetvGetPlugin: eyetvLaunch: eyetvSwitchChannel: + inputSlaveAction: openCaptureModeChanged: - openDisc: openDiscMenusChanged: openDiscStepperChanged: openDiscTypeChanged: - openFile: openFileBrowse: - openFileGeneric: openFileStreamChanged: - openNet: openNetModeChanged: openNetStepperChanged: openNetUDPButtonAction: @@ -9718,9 +10162,6 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id id id - id - id - id @@ -9760,6 +10201,9 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA o_eyetv_running_view o_file_btn_browse o_file_path + o_file_slave_ckbox + o_file_slave_filename_txt + o_file_slave_select_btn o_file_stream o_file_sub_align_lbl o_file_sub_align_pop @@ -9938,6 +10382,34 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id id id + id + id + id + + + + IBProjectSource + ../../../modules/gui/macosx/open.h + + + + VLCOpen + NSObject + + YES + + YES + openDisc: + openFile: + openFileGeneric: + openNet: + + + YES + id + id + id + id @@ -9945,6 +10417,11 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA + + VLCOpenTextField + NSTextField + + VLCOpenTextField NSTextField @@ -9964,13 +10441,7 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA outputChanged: outputCloseSheet: outputFileBrowse: - outputInfoChanged: - outputMethodChanged: outputSettings: - streamPortStepperChanged: - streamTTLStepperChanged: - transcodeChanged: - transcodeInfoChanged: YES @@ -9979,12 +10450,6 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id id id - id - id - id - id - id - id @@ -10086,6 +10551,35 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id + + IBProjectSource + ../../../modules/gui/macosx/output.h + + + + VLCOutput + NSObject + + YES + + YES + outputInfoChanged: + outputMethodChanged: + streamPortStepperChanged: + streamTTLStepperChanged: + transcodeChanged: + transcodeInfoChanged: + + + YES + id + id + id + id + id + id + + IBUserSource @@ -10160,7 +10654,10 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA o_save_accessory_text o_save_accessory_view o_search_field + o_search_field_other + o_sidebar o_status_field + o_status_field_embed o_tc_sortColumn @@ -10194,8 +10691,19 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id id id + id + id + id + + IBProjectSource + ../../../modules/gui/macosx/playlist.h + + + + VLCPlaylist + VLCPlaylistCommon IBUserSource @@ -10209,9 +10717,13 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA YES o_outline_view + o_outline_view_other o_tc_author + o_tc_author_other o_tc_duration + o_tc_duration_other o_tc_name + o_tc_name_other YES @@ -10219,8 +10731,17 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA id id id + id + id + id + id + + + + VLCPlaylistCommon + NSObject IBUserSource @@ -10229,7 +10750,7 @@ eHQAAAAAQ29weXJpZ2h0IEFwcGxlLCBJbmMuLCAyMDA5AA 0 - + ../../vlc.xcodeproj 3 diff --git a/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib b/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib index 1cbbe4f993..3507965ea8 100644 Binary files a/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib and b/extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib differ diff --git a/modules/gui/macosx/open.h b/modules/gui/macosx/open.h index 17762dd80c..c7f4ddcd8d 100644 --- a/modules/gui/macosx/open.h +++ b/modules/gui/macosx/open.h @@ -44,6 +44,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); IBOutlet id o_btn_ok; IBOutlet id o_btn_cancel; + /* bottom-line items */ IBOutlet id o_output_ckbox; IBOutlet id o_sout_options; @@ -51,6 +52,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); IBOutlet id o_file_path; IBOutlet id o_file_btn_browse; IBOutlet id o_file_stream; + IBOutlet id o_file_slave_ckbox; + IBOutlet id o_file_slave_select_btn; + IBOutlet id o_file_slave_filename_txt; /* open disc */ IBOutlet id o_disc_type; @@ -157,6 +161,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); BOOL b_autoplay; id o_currentCaptureView; + NSString *o_file_slave_path; intf_thread_t * p_intf; } @@ -167,6 +172,7 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class ); - (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi; - (void)textFieldWasClicked:(NSNotification *)o_notification; - (IBAction)expandMRLfieldAction:(id)sender; +- (IBAction)inputSlaveAction:(id)sender; - (void)openFileGeneric; - (void)openFilePathChanged:(NSNotification *)o_notification; diff --git a/modules/gui/macosx/open.m b/modules/gui/macosx/open.m index ea01ab83d3..02d3b66a30 100644 --- a/modules/gui/macosx/open.m +++ b/modules/gui/macosx/open.m @@ -160,6 +160,13 @@ static VLCOpen *_o_sharedMainInstance = nil; return _o_sharedMainInstance; } +- (void)dealloc +{ + if( o_file_slave_path ) + [o_file_slave_path release]; + [super dealloc]; +} + - (void)awakeFromNib { [o_panel setTitle: _NS("Open Source")]; @@ -175,6 +182,9 @@ static VLCOpen *_o_sharedMainInstance = nil; [o_file_btn_browse setTitle: _NS("Browse...")]; [o_file_stream setTitle: _NS("Treat as a pipe rather than as a file")]; + [o_file_slave_ckbox setTitle: _NS("Play another media synchronously")]; + [o_file_slave_select_btn setTitle: _NS("Choose...")]; + [o_file_slave_filename_txt setStringValue: @""]; [o_disc_device_lbl setStringValue: _NS("Device name")]; [o_disc_title_lbl setStringValue: _NS("Title")]; @@ -409,6 +419,8 @@ static VLCOpen *_o_sharedMainInstance = nil; [[(VLCOutput *)o_sout_options mrl] objectAtIndex: i]]]; } } + if( [o_file_slave_ckbox state] && o_file_slave_path ) + [o_options addObject: [NSString stringWithFormat: @"input-slave=%@", o_file_slave_path]]; if( [[[o_tabview selectedTabViewItem] label] isEqualToString: _NS("Capture")] ) { if( [[[o_capture_mode_pop selectedItem] title] isEqualToString: _NS("Screen")] ) @@ -486,6 +498,34 @@ static VLCOpen *_o_sharedMainInstance = nil; [o_panel displayIfNeeded]; } +- (IBAction)inputSlaveAction:(id)sender +{ + if( sender == o_file_slave_ckbox ) + { + [o_file_slave_select_btn setEnabled: [o_file_slave_ckbox state]]; + [o_file_slave_filename_txt setStringValue: @""]; + } + else + { + NSOpenPanel *o_open_panel; + o_open_panel = [NSOpenPanel openPanel]; + [o_open_panel setCanChooseFiles: YES]; + [o_open_panel setCanChooseDirectories: NO]; + if( [o_open_panel runModalForDirectory: nil file: nil types: nil] == NSOKButton ) + { + if( o_file_slave_path ) + [o_file_slave_path release]; + o_file_slave_path = [[o_open_panel filenames] objectAtIndex: 0]; + [o_file_slave_path retain]; + NSFileWrapper *o_file_wrapper; + o_file_wrapper = [[NSFileWrapper alloc] initWithPath: [[o_open_panel filenames] objectAtIndex: 0]]; + [o_file_slave_filename_txt setStringValue: [NSString stringWithFormat: @"\"%@\"", [o_file_wrapper preferredFilename]]]; + } + else + [o_file_slave_filename_txt setStringValue: @""]; + } +} + - (void)openFileGeneric { [self openFilePathChanged: nil];