ogg: Prevent some symbol conflicts between the ogg plugin and schroedinger

This commit is contained in:
Sebastian Dröge 2013-04-15 08:38:34 +02:00
parent 05c7cd1113
commit 6e01d1869b
5 changed files with 30 additions and 26 deletions

View File

@ -21,22 +21,22 @@ static unsigned int schro_unpack_decode_bit (Unpack * unpack);
static unsigned int schro_unpack_decode_uint (Unpack * unpack); static unsigned int schro_unpack_decode_uint (Unpack * unpack);
void schro_video_format_set_std_video_format (DiracSequenceHeader * format, static void schro_video_format_set_std_video_format (DiracSequenceHeader *
int index); format, int index);
void schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, static 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,
int index); 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 int
dirac_sequence_header_parse (DiracSequenceHeader * header, gst_dirac_sequence_header_parse (DiracSequenceHeader * header,
unsigned char *data, int n_bytes) unsigned char *data, int n_bytes)
{ {
int bit; int bit;
@ -165,7 +165,7 @@ dirac_sequence_header_parse (DiracSequenceHeader * header,
/* standard stuff */ /* standard stuff */
static DiracSequenceHeader schro_video_formats[] = { static const DiracSequenceHeader schro_video_formats[] = {
{0, 0, 0, 0, {0, 0, 0, 0,
0, /* custom */ 0, /* custom */
640, 480, SCHRO_CHROMA_420, 640, 480, SCHRO_CHROMA_420,
@ -304,7 +304,7 @@ static DiracSequenceHeader schro_video_formats[] = {
3, 0, 0}, 3, 0, 0},
}; };
void static void
schro_video_format_set_std_video_format (DiracSequenceHeader * format, schro_video_format_set_std_video_format (DiracSequenceHeader * format,
int index) int index)
{ {
@ -323,7 +323,7 @@ struct _SchroFrameRate
int denominator; int denominator;
}; };
static SchroFrameRate schro_frame_rates[] = { static const SchroFrameRate schro_frame_rates[] = {
{0, 0}, {0, 0},
{24000, 1001}, {24000, 1001},
{24, 1}, {24, 1},
@ -337,7 +337,7 @@ static SchroFrameRate schro_frame_rates[] = {
{25, 2} {25, 2}
}; };
void static void
schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, int index) schro_video_format_set_std_frame_rate (DiracSequenceHeader * format, int index)
{ {
if (index < 1 || index >= ARRAY_SIZE (schro_frame_rates)) { if (index < 1 || index >= ARRAY_SIZE (schro_frame_rates)) {
@ -365,7 +365,7 @@ static const SchroPixelAspectRatio schro_aspect_ratios[] = {
{4, 3} {4, 3}
}; };
void static void
schro_video_format_set_std_aspect_ratio (DiracSequenceHeader * format, schro_video_format_set_std_aspect_ratio (DiracSequenceHeader * format,
int index) int index)
{ {
@ -395,7 +395,7 @@ static const SchroSignalRangeStruct schro_signal_ranges[] = {
{256, 3504, 2048, 3584} {256, 3504, 2048, 3584}
}; };
void static void
schro_video_format_set_std_signal_range (DiracSequenceHeader * format, int i) schro_video_format_set_std_signal_range (DiracSequenceHeader * format, int i)
{ {
if (i < 1 || i >= ARRAY_SIZE (schro_signal_ranges)) { if (i < 1 || i >= ARRAY_SIZE (schro_signal_ranges)) {
@ -439,7 +439,7 @@ static const SchroColourSpecStruct schro_colour_specs[] = {
SCHRO_TRANSFER_CHAR_TV_GAMMA} SCHRO_TRANSFER_CHAR_TV_GAMMA}
}; };
void static void
schro_video_format_set_std_colour_spec (DiracSequenceHeader * format, int i) schro_video_format_set_std_colour_spec (DiracSequenceHeader * format, int i)
{ {
if (i < 0 || i >= ARRAY_SIZE (schro_colour_specs)) { if (i < 0 || i >= ARRAY_SIZE (schro_colour_specs)) {

View File

@ -2,6 +2,8 @@
#ifndef __DIRAC_PARSE_H__ #ifndef __DIRAC_PARSE_H__
#define __DIRAC_PARSE_H__ #define __DIRAC_PARSE_H__
#include <glib.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -166,8 +168,8 @@ struct _DiracSequenceHeader {
int unused2; int unused2;
}; };
G_GNUC_INTERNAL
int dirac_sequence_header_parse (DiracSequenceHeader *header, int gst_dirac_sequence_header_parse (DiracSequenceHeader *header,
unsigned char *data, int length); unsigned char *data, int length);
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -517,7 +517,7 @@ setup_dirac_mapper (GstOggStream * pad, ogg_packet * packet)
int ret; int ret;
DiracSequenceHeader header; DiracSequenceHeader header;
ret = dirac_sequence_header_parse (&header, packet->packet + 13, ret = gst_dirac_sequence_header_parse (&header, packet->packet + 13,
packet->bytes - 13); packet->bytes - 13);
if (ret == 0) { if (ret == 0) {
GST_DEBUG ("Failed to parse Dirac sequence header"); 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) if (pad->granulerate_n == 0)
return FALSE; return FALSE;
parse_vorbis_header_packet (pad, packet); gst_parse_vorbis_header_packet (pad, packet);
pad->caps = gst_caps_new_simple ("audio/x-vorbis", pad->caps = gst_caps_new_simple ("audio/x-vorbis",
"rate", G_TYPE_INT, pad->granulerate_n, "channels", G_TYPE_INT, chans, "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; return FALSE;
if (packet->packet[0] == 5) { if (packet->packet[0] == 5) {
parse_vorbis_setup_packet (pad, packet); gst_parse_vorbis_setup_packet (pad, packet);
} }
return TRUE; return TRUE;

View File

@ -76,7 +76,7 @@
void 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, * 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 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, * the code pages, a whole bunch of other fairly useless stuff, AND,

View File

@ -24,7 +24,9 @@
#include <gst/gst.h> #include <gst/gst.h>
void parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet); G_GNUC_INTERNAL
void parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op); 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__ */ #endif /* __GST_VORBIS_PARSE_H__ */