diff --git a/sys/applemedia/Makefile.am b/sys/applemedia/Makefile.am index 01c340c6bb..e05c092f2a 100644 --- a/sys/applemedia/Makefile.am +++ b/sys/applemedia/Makefile.am @@ -33,6 +33,7 @@ libgstapplemedia_la_LIBADD = \ $(GST_PLUGINS_BASE_LIBS) \ -lgstvideo-$(GST_API_VERSION) \ -lgstaudio-$(GST_API_VERSION) \ + -lgstpbutils-$(GST_API_VERSION) \ $(GMODULE_NO_EXPORT_LIBS) libgstapplemedia_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS) --tag=CC diff --git a/sys/applemedia/vtenc.c b/sys/applemedia/vtenc.c index 3f8836b612..1fbd6ce172 100644 --- a/sys/applemedia/vtenc.c +++ b/sys/applemedia/vtenc.c @@ -26,6 +26,7 @@ #include "coremediabuffer.h" #include "corevideobuffer.h" #include "vtutil.h" +#include #define VTENC_DEFAULT_USAGE 6 /* Profile: Baseline Level: 2.1 */ #define VTENC_DEFAULT_BITRATE 0 @@ -445,9 +446,10 @@ gst_vtenc_negotiate_downstream (GstVTEnc * self, CMSampleBufferRef sbuf) CFDictionaryRef atoms; CFStringRef avccKey; CFDataRef avcc; - gpointer codec_data; + guint8 *codec_data; gsize codec_data_size; GstBuffer *codec_data_buf; + guint8 sps[3]; fmt = CMSampleBufferGetFormatDescription (sbuf); atoms = CMFormatDescriptionGetExtension (fmt, @@ -462,6 +464,11 @@ gst_vtenc_negotiate_downstream (GstVTEnc * self, CMSampleBufferRef sbuf) gst_structure_set (s, "codec_data", GST_TYPE_BUFFER, codec_data_buf, NULL); + sps[0] = codec_data[1]; + sps[1] = codec_data[2]; + sps[2] = codec_data[3]; + gst_codec_utils_h264_caps_set_level_and_profile (caps, sps, 3); + gst_buffer_unref (codec_data_buf); }