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

📄 wizard.m

📁 VLC Player Source Code
💻 M
📖 第 1 页 / 共 5 页
字号:
                }                if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])                {                    if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                        @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])                    {                        [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];                        [o_t5_matrix_encap selectCellAtRow:9 column:0];                    }                }            } else {                /* we just transcoding the audio */                /* select formats supported by the audio codec */                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_PS"])                {                    [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:0 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_TS"])                {                    [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:1 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MPEG"])                {                    [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:2 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_OGG"])                {                    [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:3 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_RAW"])                {                    [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:4 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_ASF"])                {                    [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:5 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_AVI"])                {                    [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:6 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MP4"])                {                    [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:7 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_MOV"])                {                    [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:8 column:0];                }                if ([[o_audioCodecs objectAtIndex:[[o_userSelections objectForKey:                    @"trnscdAudioCodec"] intValue]] containsObject: @"MUX_WAV"])                {                    [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];                    [o_t5_matrix_encap selectCellAtRow:9 column:0];                }            }        }        else if ([[o_userSelections objectForKey:@"trnscdVideo"] isEqualTo: @"YES"])        {            /* we are just transcoding the video */            /* select formats supported by the video-codec */            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_PS"])            {                [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:0 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_TS"])            {                [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:1 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MPEG"])            {                [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:2 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_OGG"])            {                [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:3 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_RAW"])            {                [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:4 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_ASF"])            {                [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:5 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_AVI"])            {                [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:6 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MP4"])            {                [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:7 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_MOV"])            {                [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:8 column:0];            }            if ([[o_videoCodecs objectAtIndex:[[o_userSelections objectForKey:                @"trnscdVideoCodec"] intValue]] containsObject: @"MUX_WAV"])            {                [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:YES];                [o_t5_matrix_encap selectCellAtRow:9 column:0];            }        } else {            /* we don't do any transcoding             * -> enabled the encap-formats allowed when streaming content via             * http plus MP4 since this should work fine in most cases */            /* FIXME: choose a selection of encap-formats based upon the             * actually used codecs */            /* enable MPEG PS, MPEG TS, MPEG 1, OGG, RAW, ASF, MP4 and MOV             * select MPEG PS */            [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:YES];            [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];            [o_t5_matrix_encap selectCellAtRow:0 column:0];        }        if ( [o_userSelections objectForKey:@"stmgMhd"] == @"1" )        {            /* if MMS is the streaming protocol, only ASFH is available */            [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:YES];            [o_t5_matrix_encap selectCellAtRow:10 column:0];        }        else if ( [o_userSelections objectForKey:@"stmgMhd"] == @"0" )        {            /* if HTTP is the streaming protocol, disable all unsupported             * encap-formats, but don't touch the other ones selected above */            [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];        }        else if ( [[o_userSelections objectForKey:@"stmgMhd"] intValue] >= 2 )        {            /* if UDP/RTP is the streaming protocol, only MPEG-TS is available */            [[o_t5_matrix_encap cellAtRow:0 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:2 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:3 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:4 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:5 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:6 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:7 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:8 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:9 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:10 column:0] setEnabled:NO];            [[o_t5_matrix_encap cellAtRow:1 column:0] setEnabled:YES];            [o_t5_matrix_encap selectCellAtRow:1 column:0];        }        int x;        BOOL anythingEnabled;        x = 0;        anythingEnabled = NO;        while (x != [o_t5_matrix_encap numberOfRows])        {            if ([[o_t5_matrix_encap cellAtRow:x column:0] isEnabled])            {                anythingEnabled = YES;            }            x += 1;        }        if (anythingEnabled == YES)        {            /* go the encap-tab */            [o_tab_pageHolder selectTabViewItemAtIndex:4];        } else {            /* show a sheet that the selected codecs are not compatible */            NSBeginInformationalAlertSheet(_NS("Invalid selection"), _NS("OK"),                @"", @"", o_wizard_window, nil, nil, nil, nil, _NS("The "                "chosen codecs are not compatible with each other. For example: "                "It is impossibleto  mix uncompressed audio with any video codec.\n\n"                "Correct your selection and try again."));        }    }    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString: @"Encap"])    {        /* get the chosen encap format and store it */        NSNumber * theNum;        theNum = [NSNumber numberWithInt:[[o_t5_matrix_encap selectedCell] tag]];        [o_userSelections setObject:[theNum stringValue] forKey:@"encapFormat"];        /* show either "Streaming 2" or "Transcode 2" to the user */        if ([[o_userSelections objectForKey:@"trnscdOrStrmg"] isEqualToString:@"strmg"])        {            /* we are streaming */            [o_tab_pageHolder selectTabViewItemAtIndex:5];        }else{            /* we are just transcoding */            [o_tab_pageHolder selectTabViewItemAtIndex:6];            /* in case that we are processing multiple items, let the user             * select a folder instead of a localtion for a single item */            if( [[o_userSelections objectForKey:@"pathToStrm"] count] > 1 )            {                [o_t7_txt_saveFileTo setStringValue:                    _NS("Select the directory to save to")];            }            else            {                [o_t7_txt_saveFileTo setStringValue:                    _NS("Select the file to save to")];            }        }    }    else if ([[[o_tab_pageHolder selectedTabViewItem] label] isEqualToString:        @"Streaming 2"])    {        /* store the chosen TTL */        [o_userSelections setObject:[o_t6_fld_ttl stringValue] forKey:@"ttl"];        /* check whether SAP is enabled and store the announce, if needed */        if ([o_t6_ckb_sap state] == NSOnState)        {

⌨️ 快捷键说明

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