美文网首页
IOS VLC 播放rtsp

IOS VLC 播放rtsp

作者: copy_farmer | 来源:发表于2020-09-05 16:10 被阅读0次

    1.**本地集成MobleVLCKit **

    下载通道

    2.pod集成

      pod 'MobileVLCKit'
    

    3.代码

    
         VLCMediaPlayer *player=[[VLCMediaPlayer alloc] init];
        char buf[100];
        NSArray *options = @[@"--rtsp-tcp", @"--clock-synchro=1", @"--network-caching=120"];
        player = [[VLCMediaPlayer alloc] initWithOptions:options];
    //    [player setDeinterlaceFilter:@"blend"];
        VLCMedia *media = [VLCMedia mediaWithURL:url];
        player.media =media;
        player.delegate=self;
        sprintf(buf,"%d:%d",(int)SCREEN_HEIGHT,(int)SCREEN_WIDTH);
        [player setVideoAspectRatio:buf];
        [player setDrawable:self.view];
    

    相关文章

      网友评论

          本文标题:IOS VLC 播放rtsp

          本文链接:https://www.haomeiwen.com/subject/hnlfektx.html