[Bug 627459] theoraenc should provide option for TH_ENCCTL_SET_DUP_COUNT

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon May 16 09:02:05 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=627459
  GStreamer | gst-plugins-base | 0.10.x

Sebastian Dröge <slomo> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #187903|none                        |needs-work
             status|                            |

--- Comment #31 from Sebastian Dröge <slomo at circular-chaos.org> 2011-05-16 16:02:01 UTC ---
Review of attachment 187903:
 --> (https://bugzilla.gnome.org/review?bug=627459&attachment=187903)

::: ext/theora/gsttheoraenc.c
@@ +417,3 @@
           (GParamFlags) G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
+  g_object_class_install_property (gobject_class, PROP_DUP_ON_GAP,
+      g_param_spec_boolean ("dup-on-gap", "Create DUP frame on GAP flag",

The name of the property could be better I guess... but I currently don't have
any suggestions

@@ +1088,3 @@
+{
+  GValue value = { 0 };
+  g_type_init ();

Don't call g_type_init(), that's not required and done as part of gst_init()
already

@@ +1093,3 @@
+
+  if (!enc->prevtimes_array)
+    enc->prevtimes_array = g_value_array_new (enc->force_keyframe);

This array should be cleared on flush-stop events and when going from PAUSED to
READY in the state change function

@@ +1105,3 @@
+  g_assert (enc->prevtimes_array->n_values == 0);
+  value = g_value_get_uint64 (g_value_array_get_nth (enc->prevtimes_array,
0));
+  g_value_array_remove (enc->prevtimes_array, 0);

Maybe a GQueue or another FIFO data structure would be better here, you're
currently copying the complete array when removing an element

@@ +1125,3 @@
+    enc->prevbuf = NULL;
+  }
+  enc->prevbuf = gst_buffer_copy (buffer);

gst_buffer_ref() is enough here

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list