简体   繁体   English

iOS,RTSP后台流式传输超过3分钟

[英]iOS , RTSP Live streaming in Background more than 3 minutes

I'm trying to upload RTSP stream from one IP camera to Server . 我正在尝试将RTSP stream从一台IP摄像机上传到Server I'm using " FFmpeg " third-party c library for uploading.Is it possible to continue uploading in background?Currently the live streaming got disconnected after 3 minutes in background.I want to continue the live streaming with out any interruption,if the user locked his iPhone.I've enabled: 我正在使用“ FFmpeg ”第三方c库进行上传。是否可以在后台继续上传?目前,实时流在后台运行3分钟后就断开了。我想在不中断的情况下继续进行实时流。用户锁定了他的iPhone。我已启用:

Project Target -> Capabilities ->Background modes ->External Accessory Communications and Background Fetch. 项目目标->功能->背景模式->外部附件通信和后台获取。

Is it possible to continue streaming without any interruption after 3 minutes ,the user lock his iPhone? 用户锁定自己的iPhone后3分钟后是否可以继续播放而不中断播放?

let queue:dispatch_queue_t = dispatch_queue_create("streaming", DISPATCH_QUEUE_SERIAL)

                    dispatch_async(queue, { () -> Void in
                        self.startStreaming()
                    })

_ _

func startStreaming()
{
    let taskId = UIApplication.sharedApplication().beginBackgroundTaskWithExpirationHandler { () -> Void in }

    start_stream()   // This will call FFmpeg code for live streaming

    if(taskId != UIBackgroundTaskInvalid)
    {
        UIApplication.sharedApplication().endBackgroundTask(taskId)
        self.clearStreamingDefaults()
    }
}

No. 没有。

The only apps that are allowed to continue to run in the background are VoIP apps, but if you abuse that background mode, your app will be rejected on submission. 唯一允许在后台继续运行的应用是VoIP应用,但是如果您滥用该后台模式,则您的应用将在提交后被拒绝。

Why do you need the iOS device to stand between the camera and the server? 为什么需要iOS设备站在相机和服务器之间? Why no have the camera send directly to the server? 为什么没有将相机直接发送到服务器?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM