mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
ext/jpeg/: These libjpeg callbacks should return a 'boolean' (unsigned char apparently) and not a 'gboolean' (which m...
Original commit message from CVS: Patch by: Vincent Torri <vtorri at univ-evry fr> * ext/jpeg/gstjpegdec.c: * ext/jpeg/gstjpegenc.c: * ext/jpeg/smokecodec.c: These libjpeg callbacks should return a 'boolean' (unsigned char apparently) and not a 'gboolean' (which maps to gint). Fixes warnings when compiling with MingW (#393427). * gst/rtsp/rtspconnection.c: (rtsp_connection_read): Use ioctlsocket on win32. * gst/udp/gstudpsrc.c: (gst_udpsrc_create): Some printf format fixes for win32.
This commit is contained in:
parent
12359919d3
commit
fd18506657
7 changed files with 35 additions and 11 deletions
17
ChangeLog
17
ChangeLog
|
@ -1,3 +1,20 @@
|
||||||
|
2007-01-08 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
Patch by: Vincent Torri <vtorri at univ-evry fr>
|
||||||
|
|
||||||
|
* ext/jpeg/gstjpegdec.c:
|
||||||
|
* ext/jpeg/gstjpegenc.c:
|
||||||
|
* ext/jpeg/smokecodec.c:
|
||||||
|
These libjpeg callbacks should return a 'boolean' (unsigned char
|
||||||
|
apparently) and not a 'gboolean' (which maps to gint). Fixes
|
||||||
|
warnings when compiling with MingW (#393427).
|
||||||
|
|
||||||
|
* gst/rtsp/rtspconnection.c: (rtsp_connection_read):
|
||||||
|
Use ioctlsocket on win32.
|
||||||
|
|
||||||
|
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
|
||||||
|
Some printf format fixes for win32.
|
||||||
|
|
||||||
2007-01-07 Sébastien Moutte <sebastien@moutte.net>
|
2007-01-07 Sébastien Moutte <sebastien@moutte.net>
|
||||||
|
|
||||||
* gst/cutter/gstcutter.c: (gst_cutter_chain):
|
* gst/cutter/gstcutter.c: (gst_cutter_chain):
|
||||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
||||||
Subproject commit 64f924f6f2ff6275b06facb4c2adbc7c05f70641
|
Subproject commit 8ba5dffb5ee7e7daea1030f6b34bfef10f9801a3
|
|
@ -192,7 +192,7 @@ gst_jpeg_dec_class_init (GstJpegDecClass * klass)
|
||||||
GST_DEBUG_CATEGORY_INIT (jpeg_dec_debug, "jpegdec", 0, "JPEG decoder");
|
GST_DEBUG_CATEGORY_INIT (jpeg_dec_debug, "jpegdec", 0, "JPEG decoder");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static boolean
|
||||||
gst_jpeg_dec_fill_input_buffer (j_decompress_ptr cinfo)
|
gst_jpeg_dec_fill_input_buffer (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
|
@ -230,7 +230,7 @@ gst_jpeg_dec_skip_input_data (j_decompress_ptr cinfo, glong num_bytes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static boolean
|
||||||
gst_jpeg_dec_resync_to_restart (j_decompress_ptr cinfo, gint desired)
|
gst_jpeg_dec_resync_to_restart (j_decompress_ptr cinfo, gint desired)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("resync_to_start");
|
GST_DEBUG ("resync_to_start");
|
||||||
|
|
|
@ -186,7 +186,7 @@ gst_jpegenc_init_destination (j_compress_ptr cinfo)
|
||||||
GST_DEBUG ("gst_jpegenc_chain: init_destination");
|
GST_DEBUG ("gst_jpegenc_chain: init_destination");
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static boolean
|
||||||
gst_jpegenc_flush_destination (j_compress_ptr cinfo)
|
gst_jpegenc_flush_destination (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
GST_DEBUG ("gst_jpegenc_chain: flush_destination: buffer too small !!!");
|
GST_DEBUG ("gst_jpegenc_chain: flush_destination: buffer too small !!!");
|
||||||
|
|
|
@ -72,7 +72,7 @@ smokecodec_init_destination (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static boolean
|
||||||
smokecodec_flush_destination (j_compress_ptr cinfo)
|
smokecodec_flush_destination (j_compress_ptr cinfo)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -88,7 +88,7 @@ smokecodec_init_source (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static boolean
|
||||||
smokecodec_fill_input_buffer (j_decompress_ptr cinfo)
|
smokecodec_fill_input_buffer (j_decompress_ptr cinfo)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -99,7 +99,7 @@ smokecodec_skip_input_data (j_decompress_ptr cinfo, long num_bytes)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static boolean
|
||||||
smokecodec_resync_to_restart (j_decompress_ptr cinfo, int desired)
|
smokecodec_resync_to_restart (j_decompress_ptr cinfo, int desired)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
|
||||||
|
|
||||||
/* we include this here to get the G_OS_* defines */
|
/* we include this here to get the G_OS_* defines */
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
@ -58,6 +57,7 @@
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#else
|
#else
|
||||||
|
#include <sys/ioctl.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -90,8 +90,10 @@ G_STMT_START { \
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
#define IOCTL_SOCKET ioctlsocket
|
||||||
#define CLOSE_SOCKET(sock) closesocket(sock);
|
#define CLOSE_SOCKET(sock) closesocket(sock);
|
||||||
#else
|
#else
|
||||||
|
#define IOCTL_SOCKET ioctl
|
||||||
#define CLOSE_SOCKET(sock) close(sock);
|
#define CLOSE_SOCKET(sock) close(sock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -489,7 +491,12 @@ rtsp_connection_read (RTSPConnection * conn, gpointer data, guint size)
|
||||||
fd_set readfds;
|
fd_set readfds;
|
||||||
guint toread;
|
guint toread;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
gint avail;
|
gint avail;
|
||||||
|
#else
|
||||||
|
gulong avail;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_return_val_if_fail (conn != NULL, RTSP_EINVAL);
|
g_return_val_if_fail (conn != NULL, RTSP_EINVAL);
|
||||||
g_return_val_if_fail (data != NULL, RTSP_EINVAL);
|
g_return_val_if_fail (data != NULL, RTSP_EINVAL);
|
||||||
|
@ -501,7 +508,7 @@ rtsp_connection_read (RTSPConnection * conn, gpointer data, guint size)
|
||||||
|
|
||||||
/* if the call fails, just go in the select.. it should not fail. Else if
|
/* if the call fails, just go in the select.. it should not fail. Else if
|
||||||
* there is enough data to read, skip the select call al together.*/
|
* there is enough data to read, skip the select call al together.*/
|
||||||
if (ioctl (conn->fd, FIONREAD, &avail) < 0)
|
if (IOCTL_SOCKET (conn->fd, FIONREAD, &avail) < 0)
|
||||||
avail = 0;
|
avail = 0;
|
||||||
else if (avail >= toread)
|
else if (avail >= toread)
|
||||||
goto do_read;
|
goto do_read;
|
||||||
|
|
|
@ -420,7 +420,7 @@ gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
|
||||||
if ((ret = IOCTL_SOCKET (udpsrc->sock, FIONREAD, &readsize)) < 0)
|
if ((ret = IOCTL_SOCKET (udpsrc->sock, FIONREAD, &readsize)) < 0)
|
||||||
goto ioctl_failed;
|
goto ioctl_failed;
|
||||||
|
|
||||||
GST_LOG_OBJECT (udpsrc, "ioctl says %d bytes available", readsize);
|
GST_LOG_OBJECT (udpsrc, "ioctl says %d bytes available", (int) readsize);
|
||||||
|
|
||||||
pktdata = g_malloc (readsize);
|
pktdata = g_malloc (readsize);
|
||||||
pktsize = readsize;
|
pktsize = readsize;
|
||||||
|
@ -447,7 +447,7 @@ gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
|
||||||
|
|
||||||
gst_buffer_set_caps (GST_BUFFER_CAST (outbuf), udpsrc->caps);
|
gst_buffer_set_caps (GST_BUFFER_CAST (outbuf), udpsrc->caps);
|
||||||
|
|
||||||
GST_LOG_OBJECT (udpsrc, "read %d bytes", readsize);
|
GST_LOG_OBJECT (udpsrc, "read %d bytes", (int) readsize);
|
||||||
|
|
||||||
*buf = GST_BUFFER_CAST (outbuf);
|
*buf = GST_BUFFER_CAST (outbuf);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue