summaryrefslogtreecommitdiff
path: root/recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch')
-rw-r--r--recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch b/recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch
new file mode 100644
index 0000000..f74f278
--- /dev/null
+++ b/recipes-multimedia/libgstomx-1.0/files/r21.6.0-sources-gstomx1_src.patch
@@ -0,0 +1,90 @@
+diff -Naur r21.5.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.c r21.6.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.c
+--- r21.5.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.c 2016-06-08 06:17:32.000000000 +0200
++++ r21.6.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.c 2017-10-14 03:23:25.000000000 +0200
+@@ -48,13 +48,15 @@
+ {
+ PROP_0,
+ PROP_INSERT_SPS_PPS,
+- PROP_NO_BFRAMES,
++ PROP_NUM_BFRAMES,
+ PROP_SLICE_HEADER_SPACING,
+ PROP_PROFILE
+ };
+
+ #define DEFAULT_SLICE_HEADER_SPACING 0
+ #define DEFAULT_PROFILE OMX_VIDEO_AVCProfileBaseline
++#define DEFAULT_NUM_B_FRAMES 0
++#define MAX_NUM_B_FRAMES 2
+
+
+ #define GST_TYPE_OMX_VID_ENC_PROFILE (gst_omx_videnc_profile_get_type ())
+@@ -132,11 +134,12 @@
+ "Insert H.264 SPS, PPS at every IDR frame",
+ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+
+- g_object_class_install_property (gobject_class, PROP_NO_BFRAMES,
+- g_param_spec_boolean ("no-B-Frames",
+- "Do not encode B Frames",
+- "Do not use B Frames while encoding",
+- FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
++ g_object_class_install_property (gobject_class, PROP_NUM_BFRAMES,
++ g_param_spec_uint ("num-B-Frames",
++ "B Frames between two reference frames",
++ "Number of B Frames between two reference frames (not recommended)",
++ 0, MAX_NUM_B_FRAMES, DEFAULT_NUM_B_FRAMES,
++ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS |
+ GST_PARAM_MUTABLE_READY));
+
+ g_object_class_install_property (gobject_class, PROP_PROFILE,
+@@ -151,7 +154,7 @@
+ gst_omx_h264_enc_init (GstOMXH264Enc * self)
+ {
+ self->insert_sps_pps = FALSE;
+- self->no_BFrames = FALSE;
++ self->nBFrames = 0;
+ self->slice_header_spacing = DEFAULT_SLICE_HEADER_SPACING;
+ self->profile = DEFAULT_PROFILE;
+ }
+@@ -679,8 +682,8 @@
+ case PROP_INSERT_SPS_PPS:
+ self->insert_sps_pps = g_value_get_boolean (value);
+ break;
+- case PROP_NO_BFRAMES:
+- self->no_BFrames = g_value_get_boolean (value);
++ case PROP_NUM_BFRAMES:
++ self->nBFrames = g_value_get_uint (value);
+ break;
+ case PROP_SLICE_HEADER_SPACING:
+ self->slice_header_spacing = g_value_get_ulong (value);
+@@ -704,8 +707,8 @@
+ case PROP_INSERT_SPS_PPS:
+ g_value_set_boolean (value, self->insert_sps_pps);
+ break;
+- case PROP_NO_BFRAMES:
+- g_value_set_boolean (value, self->no_BFrames);
++ case PROP_NUM_BFRAMES:
++ g_value_set_uint (value, self->nBFrames);
+ break;
+ case PROP_SLICE_HEADER_SPACING:
+ g_value_set_ulong (value, self->slice_header_spacing);
+@@ -734,7 +737,7 @@
+ gst_omx_component_get_parameter (GST_OMX_VIDEO_ENC (self)->enc,
+ OMX_IndexParamVideoAvc, &oH264Type);
+ if (eError == OMX_ErrorNone) {
+- oH264Type.nBFrames = self->no_BFrames;
++ oH264Type.nBFrames = self->nBFrames;
+ oH264Type.nSliceHeaderSpacing = self->slice_header_spacing;
+ oH264Type.eProfile = self->profile;
+
+diff -Naur r21.5.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.h r21.6.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.h
+--- r21.5.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.h 2016-06-08 06:17:32.000000000 +0200
++++ r21.6.0-sources-gstomx1_src-gst-omx1/omx/gstomxh264enc.h 2017-10-14 03:23:25.000000000 +0200
+@@ -56,7 +56,7 @@
+ GstOMXVideoEnc parent;
+ h264_sf stream_format;
+ gboolean insert_sps_pps;
+- gboolean no_BFrames;
++ gboolean nBFrames;
+ glong slice_header_spacing;
+ guint profile;
+ };