#define DEFAULT_TILE_COLUMNS 6
#define DEFAULT_TILE_ROWS 0
+#define DEFAULT_ROW_MT 0
+
enum
{
PROP_0,
PROP_TILE_COLUMNS,
PROP_TILE_ROWS,
+ PROP_ROW_MT,
};
/* FIXME: Y42B do not work yet it seems */
0, 2, DEFAULT_TILE_ROWS,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+ /**
+ * GstVP9Enc:row-mt:
+ *
+ * Whether each row should be encoded using multiple threads
+ *
+ * Since: 1.20
+ */
+ g_object_class_install_property (gobject_class, PROP_ROW_MT,
+ g_param_spec_boolean ("row-mt", "Row Multithreading",
+ "Whether each row should be encoded using multiple threads",
+ DEFAULT_ROW_MT,
+ (GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
+
gst_element_class_add_static_pad_template (element_class,
&gst_vp9_enc_src_template);
gst_element_class_add_static_pad_template (element_class,
gst_vp9_enc->tile_columns = DEFAULT_TILE_COLUMNS;
gst_vp9_enc->tile_rows = DEFAULT_TILE_ROWS;
+ gst_vp9_enc->row_mt = DEFAULT_ROW_MT;
}
static void
}
}
break;
+ case PROP_ROW_MT:
+ gst_vp9_enc->row_mt = g_value_get_boolean (value);
+ if (gst_vpx_enc->inited) {
+ status =
+ vpx_codec_control (&gst_vpx_enc->encoder, VP9E_SET_ROW_MT,
+ gst_vp9_enc->row_mt ? 1 : 0);
+ if (status != VPX_CODEC_OK) {
+ GST_WARNING_OBJECT (gst_vpx_enc,
+ "Failed to set VP9E_SET_ROW_MT: %s", gst_vpx_error_name (status));
+ }
+ }
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
case PROP_TILE_ROWS:
g_value_set_int (value, gst_vp9_enc->tile_rows);
break;
+ case PROP_ROW_MT:
+ g_value_set_boolean (value, gst_vp9_enc->row_mt);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
GST_DEBUG_OBJECT (encoder, "Failed to set VP9E_SET_TILE_ROWS: %s",
gst_vpx_error_name (status));
}
+ status =
+ vpx_codec_control (&encoder->encoder, VP9E_SET_ROW_MT,
+ vp9enc->row_mt ? 1 : 0);
+ if (status != VPX_CODEC_OK) {
+ GST_DEBUG_OBJECT (encoder,
+ "Failed to set VP9E_SET_ROW_MT: %s", gst_vpx_error_name (status));
+ }
return TRUE;
}