mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
gst/: Fix compiler warnings shown by Forte.
Original commit message from CVS: * gst/librfb/rfbbuffer.c: (rfb_buffer_new_and_alloc): * gst/librfb/rfbbuffer.h: * gst/librfb/rfbdecoder.c: (rfb_socket_get_buffer): * gst/mpegvideoparse/mpegvideoparse.c: (gst_mpegvideoparse_chain): * gst/nsf/nes6502.c: (nes6502_execute): * gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps): * gst/real/gstrealvideodec.c: (open_library): * gst/real/gstrealvideodec.h: * gst/rtpmanager/gstrtpsession.c: (create_recv_rtp_sink), (create_recv_rtcp_sink), (create_send_rtp_sink): Fix compiler warnings shown by Forte.
This commit is contained in:
parent
4865b3bf14
commit
1fe4050c0a
10 changed files with 61 additions and 26 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2007-10-08 Jan Schmidt <Jan.Schmidt@sun.com>
|
||||
|
||||
* gst/librfb/rfbbuffer.c: (rfb_buffer_new_and_alloc):
|
||||
* gst/librfb/rfbbuffer.h:
|
||||
* gst/librfb/rfbdecoder.c: (rfb_socket_get_buffer):
|
||||
* gst/mpegvideoparse/mpegvideoparse.c: (gst_mpegvideoparse_chain):
|
||||
* gst/nsf/nes6502.c: (nes6502_execute):
|
||||
* gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps):
|
||||
* gst/real/gstrealvideodec.c: (open_library):
|
||||
* gst/real/gstrealvideodec.h:
|
||||
* gst/rtpmanager/gstrtpsession.c: (create_recv_rtp_sink),
|
||||
(create_recv_rtcp_sink), (create_send_rtp_sink):
|
||||
Fix compiler warnings shown by Forte.
|
||||
|
||||
2007-10-08 Wim Taymans <wim.taymans@gmail.com>
|
||||
|
||||
* gst/rtpmanager/gstrtpbin.c: (get_pt_map),
|
||||
|
|
|
@ -16,7 +16,7 @@ rfb_buffer_new_and_alloc (int len)
|
|||
RfbBuffer *buffer = g_new0 (RfbBuffer, 1);
|
||||
|
||||
buffer->data = g_malloc (len);
|
||||
buffer->free_data = (void *) g_free;
|
||||
buffer->free_data = (RfbBufferFreeFunc) g_free;
|
||||
|
||||
return buffer;
|
||||
}
|
||||
|
|
|
@ -6,10 +6,11 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _RfbBuffer RfbBuffer;
|
||||
typedef void(*RfbBufferFreeFunc)(guint8 *data, gpointer priv);
|
||||
|
||||
struct _RfbBuffer
|
||||
{
|
||||
void (*free_data) (guint8 *data, gpointer priv);
|
||||
RfbBufferFreeFunc free_data;
|
||||
gpointer buffer_private;
|
||||
|
||||
guint8 *data;
|
||||
|
|
|
@ -642,7 +642,7 @@ rfb_socket_get_buffer (gint length, gpointer user_data)
|
|||
buffer = rfb_buffer_new ();
|
||||
|
||||
buffer->data = g_malloc (length);
|
||||
buffer->free_data = (void *) g_free;
|
||||
buffer->free_data = (RfbBufferFreeFunc) g_free;
|
||||
|
||||
// g_print ("calling read(%d, %p, %d)\n", fd, buffer->data, length);
|
||||
ret = read (fd, buffer->data, length);
|
||||
|
|
|
@ -380,7 +380,7 @@ gst_mpegvideoparse_chain (GstPad * pad, GstBuffer * buf)
|
|||
MpegVideoParse *mpegvideoparse;
|
||||
GstFlowReturn res;
|
||||
gboolean have_discont;
|
||||
gint64 next_offset = GST_BUFFER_OFFSET_NONE;
|
||||
guint64 next_offset = GST_BUFFER_OFFSET_NONE;
|
||||
|
||||
g_return_val_if_fail (pad != NULL, GST_FLOW_ERROR);
|
||||
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
|
||||
|
|
|
@ -944,7 +944,7 @@
|
|||
ADD_CYCLES(cycles); \
|
||||
}
|
||||
|
||||
#define SEC() \
|
||||
#define NSF_SEC() \
|
||||
{ \
|
||||
SET_FLAG(C_FLAG); \
|
||||
ADD_CYCLES(2); \
|
||||
|
@ -1641,7 +1641,7 @@ nes6502_execute (int remaining_cycles)
|
|||
break;
|
||||
|
||||
case 0x38: /* SEC */
|
||||
SEC ();
|
||||
NSF_SEC ();
|
||||
break;
|
||||
|
||||
case 0x39: /* AND $nnnn,Y */
|
||||
|
@ -2394,7 +2394,20 @@ nes6502_setdma (int cycles)
|
|||
|
||||
/*
|
||||
** $Log$
|
||||
** Revision 1.1 2006/07/13 15:07:28 wtay
|
||||
** Revision 1.2 2007/10/08 17:46:44 thaytan
|
||||
** * gst/librfb/rfbbuffer.c: (rfb_buffer_new_and_alloc):
|
||||
** * gst/librfb/rfbbuffer.h:
|
||||
** * gst/librfb/rfbdecoder.c: (rfb_socket_get_buffer):
|
||||
** * gst/mpegvideoparse/mpegvideoparse.c: (gst_mpegvideoparse_chain):
|
||||
** * gst/nsf/nes6502.c: (nes6502_execute):
|
||||
** * gst/real/gstrealaudiodec.c: (gst_real_audio_dec_setcaps):
|
||||
** * gst/real/gstrealvideodec.c: (open_library):
|
||||
** * gst/real/gstrealvideodec.h:
|
||||
** * gst/rtpmanager/gstrtpsession.c: (create_recv_rtp_sink),
|
||||
** (create_recv_rtcp_sink), (create_send_rtp_sink):
|
||||
** Fix compiler warnings shown by Forte.
|
||||
**
|
||||
** Revision 1.1 2006-07-13 15:07:28 wtay
|
||||
** Based on patches by: Johan Dahlin <johan at gnome dot org>
|
||||
** Ronald Bultje <rbultje at ronald dot bitfreak dot net>
|
||||
** * configure.ac:
|
||||
|
|
|
@ -282,14 +282,16 @@ codec_search_done:
|
|||
g_module_symbol (module, "RASetPwd", &ra_set_pwd);
|
||||
g_module_symbol (module, "SetDLLAccessPath", &set_dll_access_path);
|
||||
|
||||
funcs.RACloseCodec = ra_close_codec;
|
||||
funcs.RADecode = ra_decode;
|
||||
funcs.RAFreeDecoder = ra_free_decoder;
|
||||
funcs.RAOpenCodec2 = ra_open_codec2;
|
||||
funcs.RAInitDecoder = ra_init_decoder;
|
||||
funcs.RASetFlavor = ra_set_flavor;
|
||||
funcs.RASetPwd = ra_set_pwd;
|
||||
funcs.SetDLLAccessPath = set_dll_access_path;
|
||||
funcs.RACloseCodec = (guint16 (*)(gpointer)) ra_close_codec;
|
||||
funcs.RADecode =
|
||||
(guint16 (*)(gpointer, guint8 *, guint32, guint8 *, guint32 *, guint32))
|
||||
ra_decode;
|
||||
funcs.RAFreeDecoder = (guint16 (*)(gpointer)) ra_free_decoder;
|
||||
funcs.RAOpenCodec2 = (guint16 (*)(gpointer, const gchar *)) ra_open_codec2;
|
||||
funcs.RAInitDecoder = (guint16 (*)(gpointer, gpointer)) ra_init_decoder;
|
||||
funcs.RASetFlavor = (guint16 (*)(gpointer, guint16)) ra_set_flavor;
|
||||
funcs.RASetPwd = (void (*)(gpointer, gchar *)) ra_set_pwd;
|
||||
funcs.SetDLLAccessPath = (void (*)(gchar *)) set_dll_access_path;
|
||||
|
||||
if (funcs.SetDLLAccessPath)
|
||||
funcs.SetDLLAccessPath (split_path[i]);
|
||||
|
|
|
@ -461,10 +461,10 @@ codec_search_done:
|
|||
goto could_not_load;
|
||||
}
|
||||
|
||||
hooks->init = rv_init;
|
||||
hooks->free = rv_free;
|
||||
hooks->transform = rv_transform;
|
||||
hooks->custom_message = rv_custom_msg;
|
||||
hooks->init = (GstRealVideoDecInitFunc) rv_init;
|
||||
hooks->free = (GstRealVideoDecFreeFunc) rv_free;
|
||||
hooks->transform = (GstRealVideoDecTransformFunc) rv_transform;
|
||||
hooks->custom_message = (GstRealVideoDecMessageFunc) rv_custom_msg;
|
||||
hooks->module = module;
|
||||
|
||||
dec->error_count = 0;
|
||||
|
|
|
@ -35,6 +35,11 @@ typedef struct _GstRealVideoDec GstRealVideoDec;
|
|||
typedef struct _GstRealVideoDecClass GstRealVideoDecClass;
|
||||
typedef enum _GstRealVideoDecVersion GstRealVideoDecVersion;
|
||||
|
||||
typedef guint32 (*GstRealVideoDecMessageFunc) (gpointer, gpointer);
|
||||
typedef guint32 (*GstRealVideoDecFreeFunc) (gpointer);
|
||||
typedef guint32 (*GstRealVideoDecInitFunc) (gpointer, gpointer);
|
||||
typedef guint32 (*GstRealVideoDecTransformFunc) (gchar *, gchar *, gpointer, gpointer, gpointer);
|
||||
|
||||
enum _GstRealVideoDecVersion
|
||||
{
|
||||
GST_REAL_VIDEO_DEC_VERSION_2 = 2,
|
||||
|
@ -45,10 +50,10 @@ enum _GstRealVideoDecVersion
|
|||
typedef struct {
|
||||
GModule *module;
|
||||
|
||||
guint32 (*custom_message) (gpointer, gpointer);
|
||||
guint32 (*free) (gpointer);
|
||||
guint32 (*init) (gpointer, gpointer);
|
||||
guint32 (*transform) (gchar *, gchar *, gpointer, gpointer, gpointer);
|
||||
GstRealVideoDecMessageFunc custom_message;
|
||||
GstRealVideoDecFreeFunc free;
|
||||
GstRealVideoDecInitFunc init;
|
||||
GstRealVideoDecTransformFunc transform;
|
||||
|
||||
gpointer context;
|
||||
} GstRealVideoDecHooks;
|
||||
|
|
|
@ -1356,7 +1356,7 @@ create_recv_rtp_sink (GstRtpSession * rtpsession)
|
|||
gst_pad_set_chain_function (rtpsession->recv_rtp_sink,
|
||||
gst_rtp_session_chain_recv_rtp);
|
||||
gst_pad_set_event_function (rtpsession->recv_rtp_sink,
|
||||
gst_rtp_session_event_recv_rtp_sink);
|
||||
(GstPadEventFunction) gst_rtp_session_event_recv_rtp_sink);
|
||||
gst_pad_set_setcaps_function (rtpsession->recv_rtp_sink,
|
||||
gst_rtp_session_sink_setcaps);
|
||||
gst_pad_set_internal_link_function (rtpsession->recv_rtp_sink,
|
||||
|
@ -1392,7 +1392,7 @@ create_recv_rtcp_sink (GstRtpSession * rtpsession)
|
|||
gst_pad_set_chain_function (rtpsession->recv_rtcp_sink,
|
||||
gst_rtp_session_chain_recv_rtcp);
|
||||
gst_pad_set_event_function (rtpsession->recv_rtcp_sink,
|
||||
gst_rtp_session_event_recv_rtcp_sink);
|
||||
(GstPadEventFunction) gst_rtp_session_event_recv_rtcp_sink);
|
||||
gst_pad_set_active (rtpsession->recv_rtcp_sink, TRUE);
|
||||
gst_element_add_pad (GST_ELEMENT_CAST (rtpsession),
|
||||
rtpsession->recv_rtcp_sink);
|
||||
|
@ -1424,7 +1424,7 @@ create_send_rtp_sink (GstRtpSession * rtpsession)
|
|||
gst_pad_set_getcaps_function (rtpsession->send_rtp_sink,
|
||||
gst_rtp_session_getcaps_send_rtp);
|
||||
gst_pad_set_event_function (rtpsession->send_rtp_sink,
|
||||
gst_rtp_session_event_send_rtp_sink);
|
||||
(GstPadEventFunction) gst_rtp_session_event_send_rtp_sink);
|
||||
gst_pad_set_internal_link_function (rtpsession->send_rtp_sink,
|
||||
gst_rtp_session_internal_links);
|
||||
gst_pad_set_active (rtpsession->send_rtp_sink, TRUE);
|
||||
|
|
Loading…
Reference in a new issue