mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
applemedia: vtenc: accept UYVY on Mac
When doing GLMemory avfvideosrc negotiates UYVY. This change allows avfvideosrc ! tee name=t ! ... ! glimagesink t. ! ... ! gldownload ! vtenc_h264 ! ... to do GLMemory and 0-copy with the encoder (with the CV meta).
This commit is contained in:
parent
a15d8acff0
commit
e0d65937bc
1 changed files with 8 additions and 0 deletions
|
@ -136,8 +136,13 @@ static void gst_pixel_buffer_release_cb (void *releaseRefCon,
|
|||
const void *planeAddresses[]);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_IOS
|
||||
static GstStaticCaps sink_caps =
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ NV12, I420 }"));
|
||||
#else
|
||||
static GstStaticCaps sink_caps =
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE ("{ UYVY, NV12, I420 }"));
|
||||
#endif
|
||||
|
||||
static void
|
||||
gst_vtenc_base_init (GstVTEncClass * klass)
|
||||
|
@ -1164,6 +1169,9 @@ gst_vtenc_encode_frame (GstVTEnc * self, GstVideoCodecFrame * frame)
|
|||
case GST_VIDEO_FORMAT_NV12:
|
||||
pixel_format_type = kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange;
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_UYVY:
|
||||
pixel_format_type = kCVPixelFormatType_422YpCbCr8;
|
||||
break;
|
||||
default:
|
||||
gst_vtenc_frame_free (vframe);
|
||||
goto cv_error;
|
||||
|
|
Loading…
Reference in a new issue