PROP_MAX_SLICE_SIZE,
};
-#define PROP_LOWPOWER_DEFAULT -1
+#define PROP_LOWPOWER_DEFAULT FALSE
#define PROP_TILE_ROW_DEFAULT 1
#define PROP_TILE_COL_DEFAULT 1
#define PROP_MAX_SLICE_SIZE_DEFAULT 0
}
encoder->param.mfx.LowPower =
- (h265enc->lowpower == 1 ? MFX_CODINGOPTION_ON : (h265enc->lowpower ==
- 0 ? MFX_CODINGOPTION_OFF : MFX_CODINGOPTION_UNKNOWN));
+ (h265enc->lowpower ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF);
return TRUE;
}
switch (prop_id) {
case PROP_LOW_POWER:
- thiz->lowpower = g_value_get_int (value);
+ thiz->lowpower = g_value_get_boolean (value);
break;
case PROP_TILE_ROW:
GST_OBJECT_LOCK (thiz);
switch (prop_id) {
case PROP_LOW_POWER:
- g_value_set_int (value, thiz->lowpower);
+ g_value_set_boolean (value, thiz->lowpower);
break;
case PROP_TILE_ROW:
gst_msdkenc_install_common_properties (encoder_class);
g_object_class_install_property (gobject_class, PROP_LOW_POWER,
- g_param_spec_int ("low-power", "Low power",
- "Enable low power mode(-1: default, 0: disable, 1: enable)",
- -1, 1, PROP_LOWPOWER_DEFAULT,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+ g_param_spec_boolean ("low-power", "Low power", "Enable low power mode",
+ PROP_LOWPOWER_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_TILE_ROW,
g_param_spec_uint ("num-tile-rows", "number of rows for tiled encoding",