gst-libs/gst/audio/gstringbuffer.c: Return NULL instead of an enum that happens to be 0, fixes warning on MSVC (#4921...

Original commit message from CVS:
Patch by: Ole André Vadla Ravnås  <ole.andre.ravnas@tandberg.com>
* gst-libs/gst/audio/gstringbuffer.c: (build_linear_format),
(gst_ring_buffer_parse_caps):
Return NULL instead of an enum that happens to be 0, fixes warning
on MSVC (#492114).
* gst-libs/gst/audio/gstringbuffer.h:
No trailing commas in enum list (for gcc-2.9x).
* gst/videotestsrc/videotestsrc.c: (random_char):
Make information loss explicit instead of implicitly truncating to
eight bits via the return value.  Fixes runtime error on MSVC when
using the debug CRT (#492114).
* win32/common/config.h.in:
Fix a bunch of '#undef FOO bar', which MSVC doesn't like (#492114).
* win32/common/libgstinterfaces.def:
* win32/common/libgstrtp.def:
Export a few more symbols (#492114).
This commit is contained in:
Ole André Vadla Ravnås 2007-11-01 12:51:57 +00:00 committed by Tim-Philipp Müller
parent 28b46c1e5d
commit 05a205860d
7 changed files with 74 additions and 28 deletions

View file

@ -1,3 +1,27 @@
2007-11-01 Tim-Philipp Müller <tim at centricular dot net>
Patch by: Ole André Vadla Ravnås <ole.andre.ravnas@tandberg.com>
* gst-libs/gst/audio/gstringbuffer.c: (build_linear_format),
(gst_ring_buffer_parse_caps):
Return NULL instead of an enum that happens to be 0, fixes warning
on MSVC (#492114).
* gst-libs/gst/audio/gstringbuffer.h:
No trailing commas in enum list (for gcc-2.9x).
* gst/videotestsrc/videotestsrc.c: (random_char):
Make information loss explicit instead of implicitly truncating to
eight bits via the return value. Fixes runtime error on MSVC when
using the debug CRT (#492114).
* win32/common/config.h.in:
Fix a bunch of '#undef FOO bar', which MSVC doesn't like (#492114).
* win32/common/libgstinterfaces.def:
* win32/common/libgstrtp.def:
Export a few more symbols (#492114).
2007-11-01 Stefan Kost <ensonic@users.sf.net>
* gst-libs/gst/audio/audio.c:

View file

@ -189,7 +189,7 @@ build_linear_format (int depth, int width, int unsignd, int big_endian)
formats = &linear24_defs[8];
break;
default:
return GST_UNKNOWN;
return NULL;
}
} else {
switch (depth) {
@ -206,7 +206,7 @@ build_linear_format (int depth, int width, int unsignd, int big_endian)
formats = &linear_defs[12];
break;
default:
return GST_UNKNOWN;
return NULL;
}
}
if (unsignd)
@ -317,6 +317,9 @@ gst_ring_buffer_parse_caps (GstRingBufferSpec * spec, GstCaps * caps)
def = build_linear_format (spec->depth, spec->width, spec->sign ? 0 : 1,
spec->bigend ? 1 : 0);
if (def == NULL)
goto parse_error;
spec->format = def->format;
bytes = spec->width >> 3;

View file

@ -62,7 +62,7 @@ typedef void (*GstRingBufferCallback) (GstRingBuffer *rbuf, guint8* data, guint
typedef enum {
GST_RING_BUFFER_STATE_STOPPED,
GST_RING_BUFFER_STATE_PAUSED,
GST_RING_BUFFER_STATE_STARTED,
GST_RING_BUFFER_STATE_STARTED
} GstRingBufferState;
/**
@ -78,7 +78,7 @@ typedef enum {
GST_SEGSTATE_INVALID,
GST_SEGSTATE_EMPTY,
GST_SEGSTATE_FILLED,
GST_SEGSTATE_PARTIAL,
GST_SEGSTATE_PARTIAL
} GstRingBufferSegState;
/**
@ -101,7 +101,7 @@ typedef enum
GST_BUFTYPE_A_LAW,
GST_BUFTYPE_IMA_ADPCM,
GST_BUFTYPE_MPEG,
GST_BUFTYPE_GSM,
GST_BUFTYPE_GSM
} GstBufferFormatType;
typedef enum
@ -149,10 +149,7 @@ typedef enum
GST_A_LAW,
GST_IMA_ADPCM,
GST_MPEG,
GST_GSM,
/* fill me */
GST_GSM
} GstBufferFormat;
/**

View file

@ -43,7 +43,7 @@ random_char (void)
state *= 1103515245;
state += 12345;
return (state >> 16);
return (state >> 16) & 0xff;
}
#if 0

View file

@ -169,10 +169,10 @@
#undef HAVE_SYS_SOCKET_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H 1
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H 1
#undef HAVE_SYS_TYPES_H
/* support for features: theoradec theoraenc */
#undef HAVE_THEORA
@ -208,16 +208,16 @@
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#undef PACKAGE_NAME "@PACKAGE_NAME@"
#define PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING "@PACKAGE_STRING@"
#define PACKAGE_STRING "@PACKAGE_STRING@"
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME "@PACKAGE_TARNAME@"
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the version of this package. */
#undef PACKAGE_VERSION "@PACKAGE_VERSION@"
#define PACKAGE_VERSION "@PACKAGE_VERSION@"
/* directory where plugins are located */
#undef PLUGINDIR
@ -256,4 +256,6 @@
#undef inline
#endif
/* FIXME: this should probably be hard-coded to some win32 system path */
#define GST_INSTALL_PLUGINS_HELPER "@GST_INSTALL_PLUGINS_HELPER@"

View file

@ -30,6 +30,7 @@ EXPORTS
gst_property_probe_get_property
gst_property_probe_get_type
gst_property_probe_get_values_name
gst_property_probe_probe_and_get_values
gst_property_probe_needs_probe_name
gst_property_probe_probe_property_name
gst_tuner_channel_changed

View file

@ -12,21 +12,40 @@ EXPORTS
gst_base_rtp_depayload_get_type
gst_base_rtp_depayload_push
gst_base_rtp_depayload_push_ts
gst_rtp_buffer_allocate_data
gst_rtp_buffer_new_take_data
gst_rtp_buffer_new_copy_data
gst_rtp_buffer_new_allocate
gst_rtp_buffer_new_allocate_len
gst_rtp_buffer_calc_header_len
gst_rtp_buffer_calc_packet_len
gst_rtp_buffer_calc_payload_len
gst_rtp_buffer_get_marker
gst_rtp_buffer_get_payload
gst_rtp_buffer_get_payload_buffer
gst_rtp_buffer_get_payload_len
gst_rtp_buffer_get_payload_subbuffer
gst_rtp_buffer_get_payload_type
gst_rtp_buffer_get_seq
gst_rtp_buffer_validate_data
gst_rtp_buffer_validate
gst_rtp_buffer_set_packet_len
gst_rtp_buffer_get_packet_len
gst_rtp_buffer_get_version
gst_rtp_buffer_set_version
gst_rtp_buffer_get_padding
gst_rtp_buffer_set_padding
gst_rtp_buffer_pad_to
gst_rtp_buffer_get_extension
gst_rtp_buffer_set_extension
gst_rtp_buffer_get_ssrc
gst_rtp_buffer_get_timestamp
gst_rtp_buffer_new_allocate
gst_rtp_buffer_new_allocate_len
gst_rtp_buffer_new_take_data
gst_rtp_buffer_set_ssrc
gst_rtp_buffer_get_csrc_count
gst_rtp_buffer_get_csrc
gst_rtp_buffer_set_csrc
gst_rtp_buffer_get_marker
gst_rtp_buffer_set_marker
gst_rtp_buffer_get_payload_type
gst_rtp_buffer_set_payload_type
gst_rtp_buffer_validate
gst_rtp_buffer_get_seq
gst_rtp_buffer_set_seq
gst_rtp_buffer_get_timestamp
gst_rtp_buffer_set_timestamp
gst_rtp_buffer_get_payload_buffer
gst_rtp_buffer_get_payload_subbuffer
gst_rtp_buffer_get_payload_len
gst_rtp_buffer_get_payload
gst_rtp_buffer_default_clock_rate