[Bug 610364] udpsrc allocates buffers with size a lot bigger than needed.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Oct 23 11:55:43 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=610364
  GStreamer | gst-plugins-good | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t.i.m at zen.co.uk

--- Comment #4 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-10-23 18:55:35 UTC ---
Hrm, tricky. So we use g_socket_get_available_bytes() now in udpsrc, which
however is implemented as:

  #ifndef G_OS_WIN32
    if (ioctl (socket->priv->fd, FIONREAD, &avail) < 0)
      return -1;
  #else
    if (ioctlsocket (socket->priv->fd, FIONREAD, &avail) == SOCKET_ERROR)
      return -1;
  #endif


On Windows, "FIONREAD returns the amount of data that can be read in a single
call to the recv function, which may not be the same as the total amount of
data queued on the socket. If s is message oriented (for example, type
SOCK_DGRAM), FIONREAD still returns the amount of pending data in the network
buffer, however, the amount that can actually be read in a single call to the
recv function is limited to the data size written in the send or sendto
function call.", which means this is not really what we want.

On OSX, ioctl(FIONREAD) returns the total buffersize according to Olivier in
comment #1, so also not what we want.

Question is if the GLib folks let us fix _get_available_bytes(), which arguably
slightly changes the semantics, or whether we need a new function for that.

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