vaapiencode: fix indentation.

This commit is contained in:
Gwenole Beauchesne 2014-01-03 16:57:25 +01:00
parent 01af353116
commit 076d75aeb8
3 changed files with 42 additions and 31 deletions

View file

@ -43,7 +43,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapiencode_debug);
G_DEFINE_TYPE_WITH_CODE (GstVaapiEncode, G_DEFINE_TYPE_WITH_CODE (GstVaapiEncode,
gst_vaapiencode, GST_TYPE_VIDEO_ENCODER, gst_vaapiencode, GST_TYPE_VIDEO_ENCODER,
GST_VAAPI_PLUGIN_BASE_INIT_INTERFACES) GST_VAAPI_PLUGIN_BASE_INIT_INTERFACES);
enum enum
{ {
@ -479,7 +479,7 @@ gst_vaapiencode_handle_frame (GstVideoEncoder * venc,
gst_video_codec_frame_set_user_data (frame, gst_video_codec_frame_set_user_data (frame,
gst_vaapi_surface_proxy_ref (proxy), gst_vaapi_surface_proxy_ref (proxy),
(GDestroyNotify)gst_vaapi_surface_proxy_unref); (GDestroyNotify) gst_vaapi_surface_proxy_unref);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encode); GST_VIDEO_ENCODER_STREAM_UNLOCK (encode);
status = gst_vaapi_encoder_put_frame (encode->encoder, frame); status = gst_vaapi_encoder_put_frame (encode->encoder, frame);

View file

@ -37,6 +37,7 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_h264_encode_debug);
#define GST_CAPS_CODEC(CODEC) CODEC "; " #define GST_CAPS_CODEC(CODEC) CODEC "; "
/* *INDENT-OFF* */
static const char gst_vaapiencode_h264_sink_caps_str[] = static const char gst_vaapiencode_h264_sink_caps_str[] =
#if GST_CHECK_VERSION(1,1,0) #if GST_CHECK_VERSION(1,1,0)
GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE,
@ -53,24 +54,31 @@ static const char gst_vaapiencode_h264_sink_caps_str[] =
"height = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ], "
#endif #endif
GST_CAPS_INTERLACED_FALSE; GST_CAPS_INTERLACED_FALSE;
/* *INDENT-ON* */
/* *INDENT-OFF* */
static const char gst_vaapiencode_h264_src_caps_str[] = static const char gst_vaapiencode_h264_src_caps_str[] =
GST_CAPS_CODEC ("video/x-h264"); GST_CAPS_CODEC ("video/x-h264");
/* *INDENT-ON* */
/* *INDENT-OFF* */
static GstStaticPadTemplate gst_vaapiencode_h264_sink_factory = static GstStaticPadTemplate gst_vaapiencode_h264_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapiencode_h264_sink_caps_str)); GST_STATIC_CAPS (gst_vaapiencode_h264_sink_caps_str));
/* *INDENT-ON* */
/* *INDENT-OFF* */
static GstStaticPadTemplate gst_vaapiencode_h264_src_factory = static GstStaticPadTemplate gst_vaapiencode_h264_src_factory =
GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapiencode_h264_src_caps_str)); GST_STATIC_CAPS (gst_vaapiencode_h264_src_caps_str));
/* *INDENT-ON* */
/* h264 encode */ /* h264 encode */
G_DEFINE_TYPE (GstVaapiEncodeH264, gst_vaapiencode_h264, GST_TYPE_VAAPIENCODE) G_DEFINE_TYPE (GstVaapiEncodeH264, gst_vaapiencode_h264, GST_TYPE_VAAPIENCODE);
enum enum
{ {
@ -323,13 +331,11 @@ gst_vaapiencode_h264_class_init (GstVaapiEncodeH264Class * klass)
/* sink pad */ /* sink pad */
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_vaapiencode_h264_sink_factory) gst_static_pad_template_get (&gst_vaapiencode_h264_sink_factory));
);
/* src pad */ /* src pad */
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_vaapiencode_h264_src_factory) gst_static_pad_template_get (&gst_vaapiencode_h264_src_factory));
);
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_KEY_PERIOD, PROP_KEY_PERIOD,
@ -344,8 +350,7 @@ gst_vaapiencode_h264_class_init (GstVaapiEncodeH264Class * klass)
g_param_spec_uint ("max-bframes", g_param_spec_uint ("max-bframes",
"Max B-Frames", "Max B-Frames",
"Number of B-frames between I and P", "Number of B-frames between I and P",
0, 10, 0, 0, 10, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_INIT_QP, PROP_INIT_QP,
@ -368,6 +373,5 @@ gst_vaapiencode_h264_class_init (GstVaapiEncodeH264Class * klass)
g_param_spec_uint ("num-slices", g_param_spec_uint ("num-slices",
"Number of Slices", "Number of Slices",
"Number of slices per frame", "Number of slices per frame",
1, 200, 1, 1, 200, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
} }

View file

@ -37,9 +37,10 @@ GST_DEBUG_CATEGORY_STATIC (gst_vaapi_mpeg2_encode_debug);
#define GST_CAPS_CODEC(CODEC) CODEC "; " #define GST_CAPS_CODEC(CODEC) CODEC "; "
/* *INDENT-OFF* */
static const char gst_vaapiencode_mpeg2_sink_caps_str[] = static const char gst_vaapiencode_mpeg2_sink_caps_str[] =
#if GST_CHECK_VERSION(1,1,0) #if GST_CHECK_VERSION(1,1,0)
GST_VIDEO_CAPS_MAKE_WITH_FEATURES(GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE, GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_VAAPI_SURFACE,
"{ ENCODED, NV12, I420, YV12 }") ", " "{ ENCODED, NV12, I420, YV12 }") ", "
#else #else
GST_VAAPI_SURFACE_CAPS ", " GST_VAAPI_SURFACE_CAPS ", "
@ -53,25 +54,33 @@ static const char gst_vaapiencode_mpeg2_sink_caps_str[] =
"height = (int) [ 1, MAX ], " "height = (int) [ 1, MAX ], "
#endif #endif
GST_CAPS_INTERLACED_FALSE; GST_CAPS_INTERLACED_FALSE;
/* *INDENT-ON* */
/* *INDENT-OFF* */
static const char gst_vaapiencode_mpeg2_src_caps_str[] = static const char gst_vaapiencode_mpeg2_src_caps_str[] =
GST_CAPS_CODEC ("video/mpeg," GST_CAPS_CODEC ("video/mpeg, mpegversion = (int) 2, "
"mpegversion = (int) 2, " "systemstream = (boolean) false"); "systemstream = (boolean) false");
/* *INDENT-ON* */
/* *INDENT-OFF* */
static GstStaticPadTemplate gst_vaapiencode_mpeg2_sink_factory = static GstStaticPadTemplate gst_vaapiencode_mpeg2_sink_factory =
GST_STATIC_PAD_TEMPLATE ("sink", GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK, GST_PAD_SINK,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapiencode_mpeg2_sink_caps_str)); GST_STATIC_CAPS (gst_vaapiencode_mpeg2_sink_caps_str));
/* *INDENT-ON* */
/* *INDENT-OFF* */
static GstStaticPadTemplate gst_vaapiencode_mpeg2_src_factory = static GstStaticPadTemplate gst_vaapiencode_mpeg2_src_factory =
GST_STATIC_PAD_TEMPLATE ("src", GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC, GST_PAD_SRC,
GST_PAD_ALWAYS, GST_PAD_ALWAYS,
GST_STATIC_CAPS (gst_vaapiencode_mpeg2_src_caps_str)); GST_STATIC_CAPS (gst_vaapiencode_mpeg2_src_caps_str));
/* *INDENT-ON* */
/* mpeg2 encode */ /* mpeg2 encode */
G_DEFINE_TYPE (GstVaapiEncodeMpeg2, gst_vaapiencode_mpeg2, GST_TYPE_VAAPIENCODE) G_DEFINE_TYPE (GstVaapiEncodeMpeg2, gst_vaapiencode_mpeg2,
GST_TYPE_VAAPIENCODE);
enum enum
{ {
@ -199,13 +208,11 @@ gst_vaapiencode_mpeg2_class_init (GstVaapiEncodeMpeg2Class * klass)
/* sink pad */ /* sink pad */
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_vaapiencode_mpeg2_sink_factory) gst_static_pad_template_get (&gst_vaapiencode_mpeg2_sink_factory));
);
/* src pad */ /* src pad */
gst_element_class_add_pad_template (element_class, gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&gst_vaapiencode_mpeg2_src_factory) gst_static_pad_template_get (&gst_vaapiencode_mpeg2_src_factory));
);
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_QUANTIZER, PROP_QUANTIZER,