[gstreamer-bugs] [Bug 370836] Looping feature for gnlobject

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Aug 30 08:12:34 PDT 2010


https://bugzilla.gnome.org/show_bug.cgi?id=370836
  GStreamer | gnonlin | git

Edward Hervey <bilboed> changed:

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

--- Comment #9 from Edward Hervey <bilboed at gmail.com> 2010-08-30 15:12:27 UTC ---
Review of attachment 168764:
 --> (https://bugzilla.gnome.org/review?bug=370836&attachment=168764)

A couple of minor issues, it would make a lot more sense (and cleaner code) if
the handling was done in gnlghostpad and just having to add a boolean regarding
how to behave if duration != media_duration.

::: gnl/gnlobject.c
@@ +492,3 @@
+      || (object->loop_duration > 0
+          && ((object->media_start + object->media_duration) !=
+              object->media_start))) {

a bit confusing, didn't you mean media_stop at the end ?

::: gnl/gnlobject.h
@@ +101,3 @@
   gboolean rate_1;

+  GstClockTime loop_duration;

It would be better to re-use media_duration for the loop duration and then just
add a gboolean looping variable.

::: gnl/gnlsource.c
@@ +26,2 @@
 #include "gnl.h"
+#include "glib.h"

This include is useless imho (should already have been imported by gst)

@@ +256,3 @@
+      source->priv->loop_probe =
+          gst_pad_add_event_probe (pad, G_CALLBACK (looping_eos_handler),
+          source);

There already is an event handler in gnlghostpad.c
(internalpad_event_function).

It would be cleaner to re-use that

@@ +636,3 @@
+      GnlObject *object = GNL_OBJECT (source);
+      GST_LOG_OBJECT (source, "Received EOS");
+      source->loop_progress += GNL_OBJECT_LOOP_DURATION (object);

It would be better to just re-use GnlObject::media_duration

::: gnl/gnlsource.h
@@ +50,3 @@
   /* controlled source element, acces with gst_bin_[add|remove]_element */
   GstElement *element;
+  GstClockTime loop_progress;

It would be nicer if all this code was moved to gnlobject, so one could use it
not only in sources, but also in compositions.

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




More information about the Gstreamer-bugs mailing list