[vlc-commits] videotoolbox: added support for ProRes

Felix Paul Kühne git at videolan.org
Fri Jul 31 12:58:06 CEST 2015


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Thu Jul 30 23:40:35 2015 +0200| [f4cb3f99196da8391ab05d351bf84b6b57d45024] | committer: Felix Paul Kühne

videotoolbox: added support for ProRes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f4cb3f99196da8391ab05d351bf84b6b57d45024
---

 modules/codec/videotoolbox.m |   33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/modules/codec/videotoolbox.m b/modules/codec/videotoolbox.m
index a5b3c47..4efd2d8 100644
--- a/modules/codec/videotoolbox.m
+++ b/modules/codec/videotoolbox.m
@@ -156,7 +156,34 @@ static CMVideoCodecType CodecPrecheck(decoder_t *p_dec)
             break;
 
 #if !TARGET_OS_IPHONE
-            /* there are no DV decoders on iOS, so bailout early */
+        /* there are no DV or ProRes decoders on iOS, so bailout early */
+        case VLC_CODEC_PRORES:
+            /* the VT decoder can't differenciate between the ProRes flavors, so we do it */
+            switch (p_dec->fmt_in.i_original_fourcc) {
+                case VLC_FOURCC( 'a','p','4','c' ):
+                case VLC_FOURCC( 'a','p','4','h' ):
+                    codec = kCMVideoCodecType_AppleProRes4444;
+                    break;
+
+                case VLC_FOURCC( 'a','p','c','h' ):
+                    codec = kCMVideoCodecType_AppleProRes422HQ;
+                    break;
+
+                case VLC_FOURCC( 'a','p','c','s' ):
+                    codec = kCMVideoCodecType_AppleProRes422LT;
+                    break;
+
+                case VLC_FOURCC( 'a','p','c','o' ):
+                    codec = kCMVideoCodecType_AppleProRes422Proxy;
+                    break;
+
+                default:
+                    codec = kCMVideoCodecType_AppleProRes422;
+                    break;
+            }
+            if (codec != 0)
+                break;
+
         case VLC_CODEC_DV:
             /* the VT decoder can't differenciate between PAL and NTSC, so we need to do it */
             switch (p_dec->fmt_in.i_original_fourcc) {
@@ -234,9 +261,9 @@ static int StartVideoToolbox(decoder_t *p_dec, block_t *p_block)
         /* Do a late opening if there is no extra data and no valid video size */
         if ((p_dec->fmt_in.video.i_width == 0 || p_dec->fmt_in.video.i_height == 0
           || p_dec->fmt_in.i_extra == 0) && p_block == NULL) {
-            msg_Err(p_dec, "waiting for H264 SPS/PPS, extra data %i", p_dec->fmt_in.i_extra);
+            msg_Dbg(p_dec, "waiting for H264 SPS/PPS, will start late");
 
-            return VLC_SUCCESS; // return VLC_GENERIC to leave the waiting to someone else
+            return VLC_SUCCESS;
         }
 
         uint32_t size;



More information about the vlc-commits mailing list