diff mbox

[FFmpeg-devel,v2] libavcodec/videotoolboxenc: Fix compilation broken on macOS 10.12

Message ID 1559920406-37495-1-git-send-email-lance.lmwang@gmail.com
State Accepted
Commit 268ab17c519f4e34783956092c9edf3ef2c4e280
Headers show

Commit Message

Limin Wang June 7, 2019, 3:13 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavcodec/videotoolboxenc.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Limin Wang June 15, 2019, 11:54 p.m. UTC | #1
On Fri, Jun 7, 2019 at 11:13 PM <lance.lmwang@gmail.com> wrote:

> From: Limin Wang <lance.lmwang@gmail.com>
>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavcodec/videotoolboxenc.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
> index 3665581..f8ccdea 100644
> --- a/libavcodec/videotoolboxenc.c
> +++ b/libavcodec/videotoolboxenc.c
> @@ -39,6 +39,11 @@
>  enum { kCMVideoCodecType_HEVC = 'hvc1' };
>  #endif
>
> +#if !HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE
> +enum { kCVPixelFormatType_420YpCbCr10BiPlanarFullRange = 'xf20' };
> +enum { kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = 'x420' };
> +#endif
> +
>


Anybody can check the patch is OK or not,  I'm glad that the FFmpeg master
will be build on my old Mac pro system without self patch.
Or apply below patch if you prefer to.
https://patchwork.ffmpeg.org/patch/13109/



>  typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef
> videoDesc,
>                                             size_t parameterSetIndex,
>                                             const uint8_t
> **parameterSetPointerOut,
> --
> 2.6.4
>
>
Rick Kern June 16, 2019, 5:27 p.m. UTC | #2
> On Jun 15, 2019, at 7:54 PM, Lance Wang <lance.lmwang@gmail.com> wrote:
> 
>> On Fri, Jun 7, 2019 at 11:13 PM <lance.lmwang@gmail.com> wrote:
>> 
>> From: Limin Wang <lance.lmwang@gmail.com>
>> 
>> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
>> ---
>> libavcodec/videotoolboxenc.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>> 
>> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
>> index 3665581..f8ccdea 100644
>> --- a/libavcodec/videotoolboxenc.c
>> +++ b/libavcodec/videotoolboxenc.c
>> @@ -39,6 +39,11 @@
>> enum { kCMVideoCodecType_HEVC = 'hvc1' };
>> #endif
>> 
>> +#if !HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE
>> +enum { kCVPixelFormatType_420YpCbCr10BiPlanarFullRange = 'xf20' };
>> +enum { kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = 'x420' };
>> +#endif
>> +
>> 
> 
> 
> Anybody can check the patch is OK or not,  I'm glad that the FFmpeg master
> will be build on my old Mac pro system without self patch.
> Or apply below patch if you prefer to.
> https://patchwork.ffmpeg.org/patch/13109/
> 

I’ll look at it tomorrow and push. 

> 
> 
>> typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef
>> videoDesc,
>>                                            size_t parameterSetIndex,
>>                                            const uint8_t
>> **parameterSetPointerOut,
>> --
>> 2.6.4
>> 
>> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 3665581..f8ccdea 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -39,6 +39,11 @@ 
 enum { kCMVideoCodecType_HEVC = 'hvc1' };
 #endif
 
+#if !HAVE_KCVPIXELFORMATTYPE_420YPCBCR10BIPLANARVIDEORANGE
+enum { kCVPixelFormatType_420YpCbCr10BiPlanarFullRange = 'xf20' };
+enum { kCVPixelFormatType_420YpCbCr10BiPlanarVideoRange = 'x420' };
+#endif
+
 typedef OSStatus (*getParameterSetAtIndex)(CMFormatDescriptionRef videoDesc,
                                            size_t parameterSetIndex,
                                            const uint8_t **parameterSetPointerOut,