[Bug 707605] Need "reverse-funnel" element

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 8 12:36:54 CEST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=707605
  GStreamer | gstreamer (core) | git

--- Comment #37 from HoonHee Lee <hoonh83.lee at gmail.com> 2013-10-08 10:36:52 UTC ---
::: plugins/elements/gststreamiddemux.c
@@ +191,3 @@
+  demux->active_srcpad = srcpad;
+  g_hash_table_insert (demux->stream_id_pairs, g_strdup (stream_id),
+      (gpointer) srcpad);

Do you want to use the RW lock or the object lock for the hashtable now? You do
both in inconsistent ways currently.
=> I did understand that you want me to use object lock instead of using
g_rw_lock_writer_lock().
If I want to use object lock, I need to remove RW lock with
g_rw_lock_reader_lock()?

@@ +287,3 @@
+    res = gst_pad_event_default (pad, parent, event);
+  else if (demux->active_srcpad)
+    res = gst_pad_push_event (demux->active_srcpad, event);

You need locking to access the active_srcpad as elsewhere.
=> do you think object lock is needed above gst_pad_push_event
(demux->active_srcpad, event)?


@@ +311,3 @@
+  if (srcpad != NULL) {
+    if (GST_OBJECT_REFCOUNT_VALUE (srcpad) > 0)
+      gst_object_unref (srcpad);

Never do something like this, if you need it you get the refcounting wrong
elsewhere.
=> Could you tell me why i am not using GST_OBJECT_REFCOUNT_VALUE() ?
I think that if I could know refcount of srcpad, then I could call
gst_object_unref(srcpad)
Is there any idea for this?

@@ +358,3 @@
+      gst_object_unref (demux->active_srcpad);
+    demux->active_srcpad = NULL;
+  }

hashtable and active_srcpad need proper locking
=> before release hashtable and active_srcpad, object lock is needed, right?

-- 
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