#include "gstmsdkmpeg2dec.h"
#include "gstmsdkmpeg2enc.h"
#include "gstmsdkvp8dec.h"
+#ifdef USE_MSDK_VP9_ENC
#include "gstmsdkvp9enc.h"
+#endif
#include "gstmsdkvc1dec.h"
#ifdef USE_MSDK_VP9_DEC
#include "gstmsdkvp9dec.h"
ret = gst_element_register (plugin, "msdkvp9dec", GST_RANK_NONE,
GST_TYPE_MSDKVP9DEC);
#endif
-
+#ifdef USE_MSDK_VP9_ENC
ret = gst_element_register (plugin, "msdkvp9enc", GST_RANK_NONE,
GST_TYPE_MSDKVP9ENC);
-
+#endif
ret = gst_element_register (plugin, "msdkvpp", GST_RANK_NONE,
GST_TYPE_MSDKVPP);
static gboolean
gst_msdkvp9enc_configure (GstMsdkEnc * encoder)
{
+ GstMsdkVP9Enc *vp9enc = GST_MSDKVP9ENC (encoder);
mfxSession session;
if (encoder->hardware) {
/* Enable Extended coding options */
gst_msdkenc_ensure_extended_coding_options (encoder);
+ memset (&vp9enc->ext_vp9, 0, sizeof (vp9enc->ext_vp9));
+ vp9enc->ext_vp9.Header.BufferId = MFX_EXTBUFF_VP9_PARAM;
+ vp9enc->ext_vp9.Header.BufferSz = sizeof (vp9enc->ext_vp9);
+ vp9enc->ext_vp9.WriteIVFHeaders = MFX_CODINGOPTION_OFF;
+
+ gst_msdkenc_add_extra_param (encoder, (mfxExtBuffer *) & vp9enc->ext_vp9);
+
return TRUE;
}
GstMsdkEnc base;
gint profile;
+
+ mfxExtVP9Param ext_vp9;
};
struct _GstMsdkVP9EncClass
'gstmsdkvc1dec.c',
'gstmsdkvideomemory.c',
'gstmsdkvp8dec.c',
- 'gstmsdkvp9enc.c',
'gstmsdkvpp.c',
'gstmsdkvpputil.c',
'msdk-enums.c',
cdata.set10('USE_MSDK_VP9_DEC', 1)
endif
+# mfx 1.26+ is required to support raw VP9 stream
+mfx_ver126_check_code = '''
+#include <mfxdefs.h>
+#if MFX_VERSION < 1026
+#error "The current version of mfx doesn't support raw vp9 stream"
+#endif'
+'''
+
+have_mfx_ver126 = cc.compiles(mfx_ver126_check_code,
+ include_directories : [configinc, mfx_inc])
+
+if have_mfx_ver126
+ msdk_sources += [ 'gstmsdkvp9enc.c' ]
+ cdata.set10('USE_MSDK_VP9_ENC', 1)
+endif
+
if host_machine.system() == 'windows'
if cc.get_id() != 'msvc' and msdk_option.enabled()
error('msdk plugin can only be built with MSVC')