⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizard.m

📁 uclinux 下的vlc播放器源代码
💻 M
📖 第 1 页 / 共 5 页
字号:
        "computers using the Microsoft MMS protocol. This protocol is used as " \        "transport method by many Microsoft's softwares. Note that only a " \        "small part of the MMS protocol is supported (MMS encapsulated in " \        "HTTP)." ), nil];    o_udp_uni = [NSArray arrayWithObjects: @"udp", @"UDP-Unicast", _NS("Enter " \        "the address of the computer to stream to."), _NS("Use this to stream " \        "to a single computer."), nil];    o_udp_multi = [NSArray arrayWithObjects: @"udp", @"UDP-Multicast", _NS("Enter " \        "the multicast address to stream to in this field. This must be an IP " \        "address between 224.0.0.0 and 239.255.255.255. For a private use, " \        "enter an address beginning with 239.255."), _NS("Use this to stream " \        "to a dynamic group of computers on a multicast-enabled network. This " \        "is the most efficient method to stream to several computers, but it " \        "won't work over the Internet."), nil];    o_rtp_uni = [NSArray arrayWithObjects: @"rtp", @"RTP-Unicast", _NS("Enter the " \        "address of the computer to stream to.") , _NS("Use this to stream " \        "to a single computer. RTP headers will be added to the stream"), nil];    o_rtp_multi = [NSArray arrayWithObjects: @"rtp", @"RTP-Multicast", _NS("Enter " \        "the multicast address to stream to in this field. This must be an IP " \        "address between 224.0.0.0 and 239.255.255.255. For a private use, " \        "enter an address beginning with 239.255."), _NS("Use this to stream " \        "to a dynamic group of computers on a multicast-enabled network. This " \        "is the most efficient method to stream to several computers, but it " \        "won't work over Internet. RTP headers will be added to the stream"), nil];    o_strmgMthds = [[NSArray alloc] initWithObjects: o_http, o_mms, \        o_udp_uni, o_udp_multi, o_rtp_uni, o_rtp_multi, nil];}- (void)showWizard{    /* just present the window to the user */    [o_wizard_window center];    [o_wizard_window displayIfNeeded];    [o_wizard_window makeKeyAndOrderFront:nil];}- (void)resetWizard{    /* get the current state of our setting to keep the selections or not */    keepSettingsOrNot = (BOOL *)config_GetInt( VLCIntf, "macosx-wizard-keep" );    /* go to the front page and clean up a bit */    [o_userSelections removeAllObjects];    [o_btn_forward setTitle: _NS("Next")];    [o_tab_pageHolder selectFirstTabViewItem:self];        if( keepSettingsOrNot )        return;        /* reset the wizard-window to its default values if wanted */    [o_t1_matrix_strmgOrTrnscd selectCellAtRow:0 column:0];    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setState: NSOffState];    /* "Input" */    [o_t2_fld_pathToNewStrm setStringValue: @""];    [o_t2_ckb_enblPartExtrct setState: NSOffState];    [self t2_enableExtract:nil];    [o_t2_matrix_inputSourceType selectCellAtRow:0 column:0];    [[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setState: NSOffState];    [o_t2_fld_pathToNewStrm setEnabled:YES];    [o_t2_btn_chooseFile setEnabled:YES];    [o_t2_tbl_plst setEnabled:NO];    /* "Streaming 1" */    [o_t3_fld_address setStringValue: @""];    [o_t3_matrix_stmgMhd selectCellAtRow:0 column:0];    [[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setState: NSOffState];    [[o_t3_matrix_stmgMhd cellAtRow:1 column:1] setState: NSOffState];    [[o_t3_matrix_stmgMhd cellAtRow:1 column:2] setState: NSOffState];    /* "Transcode 1" */    [o_t4_ckb_audio setState: NSOffState];    [o_t4_ckb_video setState: NSOffState];    [self t4_enblVidTrnscd:nil];    [self t4_enblAudTrnscd:nil];    /* "Streaming 2" */    [o_t6_fld_ttl setStringValue: @"1"];    [o_t6_ckb_sap setState: NSOffState];    [self t6_enblSapAnnce:nil];    /* "Transcode 2" */    [o_t7_fld_filePath setStringValue: @""];}- (void)initStrings{    /* localise all strings to the users lang */    /* method is called from intf.m (in method showWizard) */    /* general items */    [o_btn_backward setTitle: _NS("Back")];    [o_btn_cancel setTitle: _NS("Cancel")];    [o_btn_forward setTitle: _NS("Next")];    [o_wizard_window setTitle: _NS("Streaming/Transcoding Wizard")];    /* page one ("Hello") */    [o_t1_txt_title setStringValue: _NS("Streaming/Transcoding Wizard")];    [o_t1_txt_text setStringValue: _NS("This wizard allows to configure " \        "simple streaming or transcoding setups.")];    [o_t1_btn_mrInfo_strmg setTitle: _NS("More Info")];    [o_t1_btn_mrInfo_trnscd setTitle: _NS("More Info")];    [o_t1_txt_notice setStringValue: _NS("This wizard only gives access to " \        "a small subset of VLC's streaming and transcoding capabilities. " \        "The Open and 'Saving/Streaming' dialogs will give access to more " \        "features.")];    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setTitle: _NS("Stream " \        "to network")];    [[o_t1_matrix_strmgOrTrnscd cellAtRow:1 column:0] setTitle: _NS("" \        "Transcode/Save to file")];    /* page two ("Input") */    [o_t2_title setStringValue: _NS("Choose input")];    [o_t2_text setStringValue: _NS("Choose here your input stream.")];    [[o_t2_matrix_inputSourceType cellAtRow:0 column:0] setTitle:  \        _NS("Select a stream")];    [[o_t2_matrix_inputSourceType cellAtRow:1 column:0] setTitle: \        _NS("Existing playlist item")];    [o_t2_btn_chooseFile setTitle: _NS("Choose...")];    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"1"] headerCell] \        setStringValue: _NS("Title")];    [[[o_t2_tbl_plst tableColumnWithIdentifier:@"2"] headerCell] \        setStringValue: _NS("Author")];    [o_t2_box_prtExtrct setTitle: _NS("Partial Extract")];    [o_t2_ckb_enblPartExtrct setTitle: _NS("Enable")];    [o_t2_ckb_enblPartExtrct setToolTip: _NS("This can be used to read only a "\        "part of the stream. It must be possible to control the incoming "\        "stream (for example, a file or a disc, but not an UDP network stream.) " \        "The starting and ending times can be given in seconds.")];    [o_t2_txt_prtExtrctFrom setStringValue: _NS("From")];    [o_t2_txt_prtExtrctTo setStringValue: _NS("To")];    /* page three ("Streaming 1") */    [o_t3_txt_title setStringValue: _NS("Streaming")];    [o_t3_txt_text setStringValue: _NS("This page allows to select how " \        "the input stream will be sent.")];    [o_t3_box_dest setTitle: _NS("Destination")];    [o_t3_box_strmgMthd setTitle: _NS("Streaming method")];    [o_t3_txt_destInfo setStringValue: _NS("Address of the computer " \        "to stream to.")];    [[o_t3_matrix_stmgMhd cellAtRow:0 column:0] setTitle: _NS("UDP Unicast")];    [[o_t3_matrix_stmgMhd cellAtRow:0 column:1] setTitle: _NS("UDP Multicast")];    [o_t3_txt_strgMthdInfo setStringValue: _NS("Use this to stream to a single " \        "computer.")];    /* page four ("Transcode 1") */    [o_t4_title setStringValue: _NS("Transcode")];    [o_t4_text setStringValue: _NS("This page allows to change the compression " \        "format of the audio or video tracks. To change only " \        "the container format, proceed to next page.")];    [o_t4_box_audio setTitle: _NS("Audio")];    [o_t4_box_video setTitle: _NS("Video")];    [o_t4_ckb_audio setTitle: _NS("Transcode audio")];    [o_t4_ckb_video setTitle: _NS("Transcode video")];    [o_t4_txt_videoBitrate setStringValue: _NS("Bitrate (kb/s)")];    [o_t4_txt_videoCodec setStringValue: _NS("Codec")];    [o_t4_txt_hintAudio setStringValue: _NS("Enabling this allows to transcode "\    "the audio track if one is present in the stream.")];    [o_t4_txt_hintVideo setStringValue: _NS("Enabling this allows to transcode "\    "the video track if one is present in the stream.")];    /* page five ("Encap") */    [o_t5_title setStringValue: _NS("Encapsulation format")];    [o_t5_text setStringValue: _NS("This page allows to select how the " \        "stream will be encapsulated. Depending on previously chosen settings "        "all formats won't be available.")];    /* page six ("Streaming 2") */    [o_t6_title setStringValue: _NS("Additional streaming options")];    [o_t6_text setStringValue: _NS("In this page, a few " \                              "additional streaming parameters can be set.")];    [o_t6_txt_ttl setStringValue: _NS("Time-To-Live (TTL)")];    [o_t6_btn_mrInfo_ttl setTitle: _NS("More Info")];    [o_t6_ckb_sap setTitle: _NS("SAP Announce")];    [o_t6_btn_mrInfo_sap setTitle: _NS("More Info")];    [o_t6_ckb_local setTitle: _NS("Local playback")];    [o_t6_btn_mrInfo_local setTitle: _NS("More Info")];    [o_t6_ckb_soverlay setTitle: _NS("Add subtitles to transcoded video")];    /* page seven ("Transcode 2") */    [o_t7_title setStringValue: _NS("Additional transcode options")];    [o_t7_text setStringValue: _NS("In this page, a few " \                              "additional transcoding parameters can be set.")];    [o_t7_txt_saveFileTo setStringValue: _NS("Select the file to save to")];    [o_t7_btn_chooseFile setTitle: _NS("Choose...")];    [o_t7_ckb_local setTitle: _NS("Local playback")];    [o_t7_ckb_soverlay setTitle: _NS("Add subtitles to transcoded video")];    [o_t7_ckb_soverlay setToolTip: _NS("Adds available subtitles directly to " \                                       "the video. These cannot be disabled " \                                       "by the receiving user as they become " \                                       "part of the image.")];    [o_t7_btn_mrInfo_local setTitle: _NS("More Info")];    /* page eight ("Summary") */    [o_t8_txt_text setStringValue: _NS("This page lists all the settings." \        "Click \"Finish\" to start streaming or transcoding.")];    [o_t8_txt_title setStringValue: _NS("Summary")];    [o_t8_txt_destination setStringValue: [_NS("Destination") \        stringByAppendingString: @":"]];    [o_t8_txt_encapFormat setStringValue: [_NS("Encap. format") \        stringByAppendingString: @":"]];    [o_t8_txt_inputStream setStringValue: [_NS("Input stream") \        stringByAppendingString: @":"]];    [o_t8_txt_partExtract setStringValue: [_NS("Partial Extract") \        stringByAppendingString: @":"]];    [o_t8_txt_sap setStringValue: [_NS("SAP Announce") \        stringByAppendingString: @":"]];    [o_t8_txt_saveFileTo setStringValue: [_NS("Save file to") \        stringByAppendingString: @":"]];    [o_t8_txt_strmgMthd setStringValue: [_NS("Streaming method") \        stringByAppendingString: @":"]];    [o_t8_txt_trnscdAudio setStringValue: [_NS("Transcode audio") \        stringByAppendingString: @":"]];    [o_t8_txt_trnscdVideo setStringValue: [_NS("Transcode video") \        stringByAppendingString: @":"]];    [o_t8_txt_soverlay setStringValue: [_NS("Include subtitles") \        stringByAppendingString: @":"]];    [o_t8_txt_local setStringValue: [_NS("Local playback") \        stringByAppendingString: @":"]];}- (void)initWithExtractValuesFrom: (NSString *)from to: (NSString *)to \    ofItem: (NSString *)item{    [self resetWizard];    msg_Dbg(VLCIntf, "wizard was reseted");    [o_userSelections setObject:@"trnscd" forKey:@"trnscdOrStrmg"];    [o_btn_backward setEnabled:YES];    [o_tab_pageHolder selectTabViewItemAtIndex:1];    [o_t2_fld_prtExtrctFrom setStringValue: from];    [o_t2_fld_prtExtrctTo setStringValue: to];    [o_t2_fld_pathToNewStrm setStringValue: item];    [o_t1_matrix_strmgOrTrnscd selectCellAtRow:1 column:0];    [[o_t1_matrix_strmgOrTrnscd cellAtRow:0 column:0] setState: NSOffState];    [o_t2_ckb_enblPartExtrct setState: NSOnState];    [self t2_enableExtract: nil];    msg_Dbg(VLCIntf, "wizard interface is set");        [o_wizard_window center];    [o_wizard_window display];    [o_wizard_window makeKeyAndOrderFront:nil];    msg_Dbg(VLCIntf, "wizard window displayed");}- (IBAction)cancelRun:(id)sender{    [o_wizard_window close];}- (id)getPlaylistWizard{    return o_playlist_wizard;}- (IBAction)nextTab:(id)sender{    if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Hello"])    {        /* check whether the user wants to stream or just to transcode;         * store information for later usage */        NSString *o_mode;        o_mode = [[o_t1_matrix_strmgOrTrnscd selectedCell] title];        if( [o_mode isEqualToString: _NS("Stream to network")] )        {            /* we will be streaming */            [o_userSelections setObject:@"strmg" forKey:@"trnscdOrStrmg"];        }        else

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -