After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 756252 - Resurrect NetSim
Resurrect NetSim
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-08 16:58 UTC by Håvard Graff (hgr)
Modified: 2016-05-06 08:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
implementation with tests (21.45 KB, patch)
2015-10-08 16:58 UTC, Håvard Graff (hgr)
none Details | Review
updated patch (21.47 KB, patch)
2016-02-12 09:39 UTC, Håvard Graff (hgr)
committed Details | Review

Description Håvard Graff (hgr) 2015-10-08 16:58:50 UTC
Created attachment 312917 [details] [review]
implementation with tests

Found and ported to 1.6
Comment 1 Nicolas Dufresne (ndufresne) 2015-10-10 09:22:48 UTC
Review of attachment 312917 [details] [review]:

::: gst/netsim/gstnetsim.c
@@ +88,3 @@
+    GST_STATIC_CAPS_ANY);
+
+G_DEFINE_TYPE (GstNetSim, gst_net_sim, GST_TYPE_ELEMENT);

I do believe this element could benefit from being a GstBaseTransform based.
Comment 2 Håvard Graff (hgr) 2015-10-12 07:14:16 UTC
(In reply to Nicolas Dufresne (stormer) from comment #1)
> Review of attachment 312917 [details] [review] [review]:
> 
> ::: gst/netsim/gstnetsim.c
> @@ +88,3 @@
> +    GST_STATIC_CAPS_ANY);
> +
> +G_DEFINE_TYPE (GstNetSim, gst_net_sim, GST_TYPE_ELEMENT);
> 
> I do believe this element could benefit from being a GstBaseTransform based.

Given that the push happens in a different thread to the chain, I am not sure this is ideal for BaseTransform. Do you have any examples of BaseTransform being used in an element where buffer input and output happens in different threads?
Comment 3 Nicolas Dufresne (ndufresne) 2015-10-13 00:25:49 UTC
That is a fair argument, a fact I didn't notice as I didn't yet read it. There is a bug about creating (or enhancing current) a BaseTransform base class for that. I don't believe it should block this from being merged imho.
Comment 4 Håvard Graff (hgr) 2016-02-12 09:39:50 UTC
Created attachment 320937 [details] [review]
updated patch

Rebased to latest master with a few more fixes
Comment 5 Tim-Philipp Müller 2016-02-12 10:14:27 UTC
commit e3f9e854f08e82bfab11182c5a2aa6f9a0c73cd5
Author: Stian Selnes <stian@pexip.com>
Date:   Wed Oct 7 23:49:58 2015 +0200

    netsim: Add netsim element
    
    Resurrected from the Farstream repository and given an
    overhaul to fix races, deadlocks etc.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=756252
Comment 6 Tim-Philipp Müller 2016-05-06 08:50:34 UTC
Just got this btw, you happen to have a fix for that already? :)

nexpected critical/warning: gstpad.c:4156:gst_pad_chain_data_unchecked:<netsim0:sink> Got data flow before stream-start event
50%: Checks: 2, Failures: 1, Errors: 0
gstcheck.c:79:F:general:netsim_stress:0: Unexpected critical/warning: gstpad.c:4156:gst_pad_chain_data_unchecked:<netsim0:sink> Got data flow before stream-start event
FAIL elements/netsim (exit status: 1)


Hard to reproduce here though.