socketsrc: Refactor to simplify
authorWilliam Manley <will@williammanley.net>
Fri, 13 Mar 2015 13:30:48 +0000 (13:30 +0000)
committerWim Taymans <wtaymans@redhat.com>
Fri, 13 Mar 2015 19:05:00 +0000 (20:05 +0100)
commit0c054aa00d99f02a73e83261ccb08f237c5e7b70
tree06efec28f4d4f1aae2bc7998a194299b02b73293
parent7c10499ecdfb3743e893eac8439c03d58895dd46
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
gst/tcp/gstsocketsrc.c