<tfoot id='pOciy'></tfoot>

    • <bdo id='pOciy'></bdo><ul id='pOciy'></ul>

    <legend id='pOciy'><style id='pOciy'><dir id='pOciy'><q id='pOciy'></q></dir></style></legend>
  1. <i id='pOciy'><tr id='pOciy'><dt id='pOciy'><q id='pOciy'><span id='pOciy'><b id='pOciy'><form id='pOciy'><ins id='pOciy'></ins><ul id='pOciy'></ul><sub id='pOciy'></sub></form><legend id='pOciy'></legend><bdo id='pOciy'><pre id='pOciy'><center id='pOciy'></center></pre></bdo></b><th id='pOciy'></th></span></q></dt></tr></i><div id='pOciy'><tfoot id='pOciy'></tfoot><dl id='pOciy'><fieldset id='pOciy'></fieldset></dl></div>
    1. <small id='pOciy'></small><noframes id='pOciy'>

    2. 之后 iOS 视频流式传输和存储在设备上

      iOS video streaming and storing on device afterwards(之后 iOS 视频流式传输和存储在设备上)

        <small id='pLciq'></small><noframes id='pLciq'>

        <legend id='pLciq'><style id='pLciq'><dir id='pLciq'><q id='pLciq'></q></dir></style></legend>
        <tfoot id='pLciq'></tfoot>
        • <bdo id='pLciq'></bdo><ul id='pLciq'></ul>

            <tbody id='pLciq'></tbody>

              <i id='pLciq'><tr id='pLciq'><dt id='pLciq'><q id='pLciq'><span id='pLciq'><b id='pLciq'><form id='pLciq'><ins id='pLciq'></ins><ul id='pLciq'></ul><sub id='pLciq'></sub></form><legend id='pLciq'></legend><bdo id='pLciq'><pre id='pLciq'><center id='pLciq'></center></pre></bdo></b><th id='pLciq'></th></span></q></dt></tr></i><div id='pLciq'><tfoot id='pLciq'></tfoot><dl id='pLciq'><fieldset id='pLciq'></fieldset></dl></div>

                本文介绍了之后 iOS 视频流式传输和存储在设备上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                到目前为止,我知道如何流式传输视频以及如何下载视频,然后再进行流式传输,但有一点很棘手:流式传输一次,将其存储在设备上,以后再从设备上播放.

                So far I know how to stream a video and how to download it and afterwards stream it, but here's the tricky bit: streaming it once, storing it on the device and in the future play it from the device.

                这可能吗?

                推荐答案

                保存视频非常简单.做类似的事情:

                It's quite easy to save the video. Do something similar to this:

                //Saving Movie
                NSMutableData *data = [[NSMutableData alloc] init];
                NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:data];          
                [archiver encodeObject:*MovieObject* forKey:@"MovieObjectDataKey"];
                [archiver finishEncoding];
                [[NSUserDefaults standardUserDefaults] setObject:data forKey:@"MovieObjectDefaultsDataKey"];
                [archiver release];
                [data release];
                
                //Retrieving movie 
                NSData *savedMovieData = [[NSUserDefaults standardUserDefaults] objectForKey:@"MovieObjectDefaultsDataKey"];
                if (savedMovieData != nil) {
                    NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:savedMovieData];
                    *MovieObject* = [[unarchiver decodeObjectForKey:@"MovieObjectDataKey"] retain];
                    [unarchiver finishDecoding];
                    [savedMovieData release];
                    [unarchiver release];
                } else {
                    //Download Stream of Your Movie
                }
                

                你真正需要改变的只有 * MovieObject *,每一步都要改变一次.

                The only thing you really have to change there is * MovieObject *, once in each step.

                这篇关于之后 iOS 视频流式传输和存储在设备上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                EAAccessory/EASession teardown during background(EAAccessory/EASession 在后台拆除)
                Getting an NSArray of a single attribute from an NSArray(从 NSArray 获取单个属性的 NSArray)
                ImageIO: lt;ERRORgt; JPEG Corrupt JPEG data: premature end of data segment iphone - how to catch this?(ImageIO:lt;错误gt;JPEG 损坏的 JPEG 数据:iphone 数据段过早结束 - 如何捕捉到这个?)
                How to get indexPath.row of tableView which is currently being displayed?(如何获取当前正在显示的 tableView 的 indexPath.row?)
                Xcode iOS organizer submit to app store yields quot;The archive is invalidquot; error(Xcode iOS 管理器提交到应用商店产生“存档无效;错误)
                MFMessageComposeViewController alloc returns nil(MFMessageComposeViewController alloc 返回 nil)

                <small id='cxHdS'></small><noframes id='cxHdS'>

                1. <tfoot id='cxHdS'></tfoot>
                  • <bdo id='cxHdS'></bdo><ul id='cxHdS'></ul>

                    <legend id='cxHdS'><style id='cxHdS'><dir id='cxHdS'><q id='cxHdS'></q></dir></style></legend>
                        <i id='cxHdS'><tr id='cxHdS'><dt id='cxHdS'><q id='cxHdS'><span id='cxHdS'><b id='cxHdS'><form id='cxHdS'><ins id='cxHdS'></ins><ul id='cxHdS'></ul><sub id='cxHdS'></sub></form><legend id='cxHdS'></legend><bdo id='cxHdS'><pre id='cxHdS'><center id='cxHdS'></center></pre></bdo></b><th id='cxHdS'></th></span></q></dt></tr></i><div id='cxHdS'><tfoot id='cxHdS'></tfoot><dl id='cxHdS'><fieldset id='cxHdS'></fieldset></dl></div>

                          <tbody id='cxHdS'></tbody>