[Bug 739546] Add new element socketsrc, base class for tcpclientsrc and tcpserversrc

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Mar 13 12:10:45 PDT 2015


https://bugzilla.gnome.org/show_bug.cgi?id=739546

--- Comment #13 from Wim Taymans <wim.taymans at gmail.com> ---
pushed now with some minor fixes.

commit a297b0545f664c82351bbae1fd3f943d068b5031
Author: William Manley <will at williammanley.net>
Date:   Fri Mar 13 13:56:13 2015 +0000

    socketsrc: Add `connection-closed-by-peer` signal

    This provides notification that the socket in use was closed by the peer
    and gives an opportunity to replace it with a new one which is not
    closed, allowing reading from many sockets in order.

    I use this in pulsevideo to implement reconnection logic to handle the
    pulsevideo service dieing, such that is can be restarted without
    disrupting downstream.

    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=739546

commit a19ac4b85c9dbd930bf68058e8581b7e09a640ea
Author: William Manley <will at williammanley.net>
Date:   Fri Mar 13 13:43:59 2015 +0000

    socketsrc: Tidy up usage of `g_object_unref`/`g_clear_object` and locking

    This is clearer, and should make future changes safer.  No functional
    change intended.

    See https://bugzilla.gnome.org/show_bug.cgi?id=739546

commit 0c054aa00d99f02a73e83261ccb08f237c5e7b70
Author: William Manley <will at williammanley.net>
Date:   Fri Mar 13 13:30:48 2015 +0000

    socketsrc: Refactor to simplify

    * Don't bother polling, just do a blocking read, the `GCancellable` will
      take care of unlocking.  This should also be faster on MS Windows where
      the GIO documentation for `g_socket_get_available_bytes` states: "Note
      that on Windows, this function is rather inefficient in the UDP case".

    * Implement `GstPushSrc.fill` rather than `GstPushSrc.create`.  This means
      that we will be using the downstream allocator which may be more
      efficient.  It also means that socketsrc is likely to respect its
      "blocksize" property (assuming that there is enough data available).

    See https://bugzilla.gnome.org/show_bug.cgi?id=739546

commit 7c10499ecdfb3743e893eac8439c03d58895dd46
Author: William Manley <will at williammanley.net>
Date:   Mon Nov 3 02:47:14 2014 +0000

    tcp: Add element socketsrc

    `socketsrc` can be considered a source counterpart to `multisocketsink`.
    It can be considered a generalization of `tcpclientsrc` and
    `tcpserversrc`:  it contains all the logic required to communicate over
    the socket but none of the logic for creating the sockets/establishing
    the connection in the first place, allowing the user to accomplish this
    externally in whatever manner they wish making it applicable to other
    types of sockets besides TCP.

    This commit essentially copies the implementation directly from
    tcpserversrc.  Later patches will tidy the implementation up and
    re-implement `tcpclientsrc` and `tcpserversrc` in terms of `socketsrc`.

    See https://bugzilla.gnome.org/show_bug.cgi?id=739546

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