From 6e01d1869b0f0f71137e6142367f789bcc2bc01c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 Apr 2013 08:38:34 +0200 Subject: [PATCH] ogg: Prevent some symbol conflicts between the ogg plugin and schroedinger --- ext/ogg/dirac_parse.c | 34 +++++++++++++++++----------------- ext/ogg/dirac_parse.h | 6 ++++-- ext/ogg/gstoggstream.c | 6 +++--- ext/ogg/vorbis_parse.c | 4 ++-- ext/ogg/vorbis_parse.h | 6 ++++-- 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/ext/ogg/dirac_parse.c b/ext/ogg/dirac_parse.c index 3a3193d..0c5c66c 100644 --- a/ext/ogg/dirac_parse.c +++ b/ext/ogg/dirac_parse.c @@ -21,22 +21,22 @@ static unsigned int schro_unpack_decode_bit (Unpack * unpack); static unsigned int schro_unpack_decode_uint (Unpack * unpack); -void schro_video_format_set_std_video_format (DiracSequenceHeader * format, - int index); -void schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, - int index); -void schro_video_format_set_std_aspect_ratio (DiracSequenceHeader * format, - int index); -void schro_video_format_set_std_signal_range (DiracSequenceHeader * format, - int index); -void schro_video_format_set_std_colour_spec (DiracSequenceHeader * format, +static void schro_video_format_set_std_video_format (DiracSequenceHeader * + format, int index); +static void schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, int index); +static void schro_video_format_set_std_aspect_ratio (DiracSequenceHeader * + format, int index); +static void schro_video_format_set_std_signal_range (DiracSequenceHeader * + format, int index); +static void schro_video_format_set_std_colour_spec (DiracSequenceHeader * + format, int index); int -dirac_sequence_header_parse (DiracSequenceHeader * header, +gst_dirac_sequence_header_parse (DiracSequenceHeader * header, unsigned char *data, int n_bytes) { int bit; @@ -165,7 +165,7 @@ dirac_sequence_header_parse (DiracSequenceHeader * header, /* standard stuff */ -static DiracSequenceHeader schro_video_formats[] = { +static const DiracSequenceHeader schro_video_formats[] = { {0, 0, 0, 0, 0, /* custom */ 640, 480, SCHRO_CHROMA_420, @@ -304,7 +304,7 @@ static DiracSequenceHeader schro_video_formats[] = { 3, 0, 0}, }; -void +static void schro_video_format_set_std_video_format (DiracSequenceHeader * format, int index) { @@ -323,7 +323,7 @@ struct _SchroFrameRate int denominator; }; -static SchroFrameRate schro_frame_rates[] = { +static const SchroFrameRate schro_frame_rates[] = { {0, 0}, {24000, 1001}, {24, 1}, @@ -337,7 +337,7 @@ static SchroFrameRate schro_frame_rates[] = { {25, 2} }; -void +static void schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, int index) { if (index < 1 || index >= ARRAY_SIZE (schro_frame_rates)) { @@ -365,7 +365,7 @@ static const SchroPixelAspectRatio schro_aspect_ratios[] = { {4, 3} }; -void +static void schro_video_format_set_std_aspect_ratio (DiracSequenceHeader * format, int index) { @@ -395,7 +395,7 @@ static const SchroSignalRangeStruct schro_signal_ranges[] = { {256, 3504, 2048, 3584} }; -void +static void schro_video_format_set_std_signal_range (DiracSequenceHeader * format, int i) { if (i < 1 || i >= ARRAY_SIZE (schro_signal_ranges)) { @@ -439,7 +439,7 @@ static const SchroColourSpecStruct schro_colour_specs[] = { SCHRO_TRANSFER_CHAR_TV_GAMMA} }; -void +static void schro_video_format_set_std_colour_spec (DiracSequenceHeader * format, int i) { if (i < 0 || i >= ARRAY_SIZE (schro_colour_specs)) { diff --git a/ext/ogg/dirac_parse.h b/ext/ogg/dirac_parse.h index 9dc4ffe..0ee14fc 100644 --- a/ext/ogg/dirac_parse.h +++ b/ext/ogg/dirac_parse.h @@ -2,6 +2,8 @@ #ifndef __DIRAC_PARSE_H__ #define __DIRAC_PARSE_H__ +#include + #ifdef __cplusplus extern "C" { #endif @@ -166,8 +168,8 @@ struct _DiracSequenceHeader { int unused2; }; - -int dirac_sequence_header_parse (DiracSequenceHeader *header, +G_GNUC_INTERNAL +int gst_dirac_sequence_header_parse (DiracSequenceHeader *header, unsigned char *data, int length); #ifdef __cplusplus diff --git a/ext/ogg/gstoggstream.c b/ext/ogg/gstoggstream.c index 26b2f29..44b6690 100644 --- a/ext/ogg/gstoggstream.c +++ b/ext/ogg/gstoggstream.c @@ -517,7 +517,7 @@ setup_dirac_mapper (GstOggStream * pad, ogg_packet * packet) int ret; DiracSequenceHeader header; - ret = dirac_sequence_header_parse (&header, packet->packet + 13, + ret = gst_dirac_sequence_header_parse (&header, packet->packet + 13, packet->bytes - 13); if (ret == 0) { GST_DEBUG ("Failed to parse Dirac sequence header"); @@ -785,7 +785,7 @@ setup_vorbis_mapper (GstOggStream * pad, ogg_packet * packet) if (pad->granulerate_n == 0) return FALSE; - parse_vorbis_header_packet (pad, packet); + gst_parse_vorbis_header_packet (pad, packet); pad->caps = gst_caps_new_simple ("audio/x-vorbis", "rate", G_TYPE_INT, pad->granulerate_n, "channels", G_TYPE_INT, chans, @@ -801,7 +801,7 @@ is_header_vorbis (GstOggStream * pad, ogg_packet * packet) return FALSE; if (packet->packet[0] == 5) { - parse_vorbis_setup_packet (pad, packet); + gst_parse_vorbis_setup_packet (pad, packet); } return TRUE; diff --git a/ext/ogg/vorbis_parse.c b/ext/ogg/vorbis_parse.c index 844f18b..2d85e93 100644 --- a/ext/ogg/vorbis_parse.c +++ b/ext/ogg/vorbis_parse.c @@ -76,7 +76,7 @@ void -parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet) +gst_parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet) { /* * on the first (b_o_s) packet, determine the long and short sizes, @@ -98,7 +98,7 @@ parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet) } void -parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op) +gst_parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op) { /* * the code pages, a whole bunch of other fairly useless stuff, AND, diff --git a/ext/ogg/vorbis_parse.h b/ext/ogg/vorbis_parse.h index 8cf8e09..927a92a 100644 --- a/ext/ogg/vorbis_parse.h +++ b/ext/ogg/vorbis_parse.h @@ -24,7 +24,9 @@ #include -void parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet); -void parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op); +G_GNUC_INTERNAL +void gst_parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet); +G_GNUC_INTERNAL +void gst_parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op); #endif /* __GST_VORBIS_PARSE_H__ */ -- 2.7.4