mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
rtspconnection: remove functions added in GLib 2.34
g_pollable_stream_read and g_pollable_stream_write were added in GLib 2.34, but Ubuntu 12.04 and Debian Wheezy still use GLib 2.32. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=701316
This commit is contained in:
parent
cc5a476fc6
commit
63961242df
1 changed files with 14 additions and 5 deletions
|
@ -863,8 +863,12 @@ write_bytes (GOutputStream * stream, const guint8 * buffer, guint * idx,
|
|||
left = size - *idx;
|
||||
|
||||
while (left) {
|
||||
r = g_pollable_stream_write (stream, (gchar *) & buffer[*idx], left,
|
||||
block, cancellable, &err);
|
||||
if (block)
|
||||
r = g_output_stream_write (stream, (gchar *) & buffer[*idx], left,
|
||||
cancellable, &err);
|
||||
else
|
||||
r = g_pollable_output_stream_write_nonblocking (G_POLLABLE_OUTPUT_STREAM
|
||||
(stream), (gchar *) & buffer[*idx], left, cancellable, &err);
|
||||
if (G_UNLIKELY (r < 0))
|
||||
goto error;
|
||||
|
||||
|
@ -917,9 +921,14 @@ fill_raw_bytes (GstRTSPConnection * conn, guint8 * buffer, guint size,
|
|||
|
||||
if (G_LIKELY (size > (guint) out)) {
|
||||
gssize r;
|
||||
|
||||
r = g_pollable_stream_read (conn->input_stream,
|
||||
(gchar *) & buffer[out], size - out, block, conn->cancellable, err);
|
||||
gsize count = size - out;
|
||||
if (block)
|
||||
r = g_input_stream_read (conn->input_stream, (gchar *) & buffer[out],
|
||||
count, conn->cancellable, err);
|
||||
else
|
||||
r = g_pollable_input_stream_read_nonblocking (G_POLLABLE_INPUT_STREAM
|
||||
(conn->input_stream), (gchar *) & buffer[out], count,
|
||||
conn->cancellable, err);
|
||||
|
||||
if (G_UNLIKELY (r < 0)) {
|
||||
if (out == 0) {
|
||||
|
|
Loading…
Reference in a new issue