Commit 43b16834 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

Add -Wmissing-declarations -Wmissing-prototypes to warning flags

Includes all the fixes necessary to make stuff compile again.
parent 86a6b39b
......@@ -308,10 +308,10 @@ dnl set location of plugin directory
AG_GST_SET_PLUGINDIR
dnl define an ERROR_CFLAGS Makefile variable
AG_GST_SET_ERROR_CFLAGS($GST_GIT)
AG_GST_SET_ERROR_CFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes])
dnl define an ERROR_CXXFLAGS Makefile variable
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT)
AG_GST_SET_ERROR_CXXFLAGS($GST_GIT, [-Wmissing-declarations -Wmissing-prototypes])
dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
......
......@@ -11,7 +11,8 @@ libgstogg_la_SOURCES = \
gstoggstream.h \
dirac_parse.c \
dirac_parse.h \
vorbis_parse.c
vorbis_parse.c \
vorbis_parse.h
noinst_HEADERS = \
gstoggdemux.h gstoggmux.h
......
......@@ -23,11 +23,9 @@
#include <gst/gst.h>
extern gboolean gst_ogg_demux_plugin_init (GstPlugin * plugin);
extern gboolean gst_ogg_mux_plugin_init (GstPlugin * plugin);
extern gboolean gst_ogm_parse_plugin_init (GstPlugin * plugin);
extern gboolean gst_ogg_parse_plugin_init (GstPlugin * plugin);
extern gboolean gst_ogg_avi_parse_plugin_init (GstPlugin * plugin);
#include "gstogg.h"
#include "gstoggdemux.h"
#include "gstoggmux.h"
static gboolean
plugin_init (GstPlugin * plugin)
......
/* GStreamer
* Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
*
* gstoggdemux.c: ogg stream demuxer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_OGG_H__
#define __GST_OGG_H__
#include <gst/gst.h>
gboolean gst_ogm_parse_plugin_init (GstPlugin * plugin);
gboolean gst_ogg_parse_plugin_init (GstPlugin * plugin);
gboolean gst_ogg_avi_parse_plugin_init (GstPlugin * plugin);
#endif /* __GST_OGG_H__ */
......@@ -37,6 +37,8 @@
#include <ogg/ogg.h>
#include <string.h>
#include "gstogg.h"
static const GstElementDetails gst_ogg_avi_parse_details =
GST_ELEMENT_DETAILS ("Ogg AVI parser",
"Codec/Parser",
......
......@@ -132,6 +132,7 @@ static GstFlowReturn gst_ogg_demux_combine_flows (GstOggDemux * ogg,
GstOggPad * pad, GstFlowReturn ret);
static void gst_ogg_demux_sync_streams (GstOggDemux * ogg);
GType gst_ogg_pad_get_type (void);
G_DEFINE_TYPE (GstOggPad, gst_ogg_pad, GST_TYPE_PAD);
static void
......
......@@ -170,6 +170,7 @@ struct _GstOggDemuxClass
GstElementClass parent_class;
};
gboolean gst_ogg_demux_plugin_init (GstPlugin * plugin);
G_END_DECLS
......
......@@ -282,7 +282,7 @@ gst_ogg_mux_finalize (GObject * object)
static void
gst_ogg_mux_ogg_pad_destroy_notify (GstCollectData * data)
{
GstOggPad *oggpad = (GstOggPad *) data;
GstOggPadData *oggpad = (GstOggPadData *) data;
GstBuffer *buf;
ogg_stream_clear (&oggpad->stream);
......@@ -314,7 +314,7 @@ static gboolean
gst_ogg_mux_sink_event (GstPad * pad, GstEvent * event)
{
GstOggMux *ogg_mux = GST_OGG_MUX (gst_pad_get_parent (pad));
GstOggPad *ogg_pad = (GstOggPad *) gst_pad_get_element_private (pad);
GstOggPadData *ogg_pad = (GstOggPadData *) gst_pad_get_element_private (pad);
gboolean ret;
GST_DEBUG ("Got %s event on pad %s:%s", GST_EVENT_TYPE_NAME (event),
......@@ -380,11 +380,11 @@ gst_ogg_mux_request_new_pad (GstElement * element,
/* construct our own wrapper data structure for the pad to
* keep track of its status */
{
GstOggPad *oggpad;
GstOggPadData *oggpad;
oggpad = (GstOggPad *)
oggpad = (GstOggPadData *)
gst_collect_pads_add_pad_full (ogg_mux->collect, newpad,
sizeof (GstOggPad), gst_ogg_mux_ogg_pad_destroy_notify);
sizeof (GstOggPadData), gst_ogg_mux_ogg_pad_destroy_notify);
ogg_mux->active_pads++;
oggpad->serial = serial;
......@@ -516,7 +516,7 @@ static gboolean
gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
{
GSList *walk;
GstOggPad *opad = NULL; /* "oldest" pad */
GstOggPadData *opad = NULL; /* "oldest" pad */
GstClockTime oldest = GST_CLOCK_TIME_NONE;
GstBuffer *buf = NULL;
gboolean ret = FALSE;
......@@ -525,7 +525,7 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
walk = mux->collect->data;
while (walk) {
GstOggPad *pad = (GstOggPad *) walk->data;
GstOggPadData *pad = (GstOggPadData *) walk->data;
/* We need each queue to either be at EOS, or have one or more pages
* available with a set granulepos (i.e. not -1), otherwise we don't have
......@@ -566,7 +566,7 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
walk = mux->collect->data;
while (walk) {
GstOggPad *pad = (GstOggPad *) walk->data;
GstOggPadData *pad = (GstOggPadData *) walk->data;
/* any page with a granulepos of -1 can be pushed immediately.
* TODO: it CAN be, but it seems silly to do so? */
......@@ -629,8 +629,8 @@ gst_ogg_mux_dequeue_page (GstOggMux * mux, GstFlowReturn * flowret)
* counting.
*/
static GstFlowReturn
gst_ogg_mux_pad_queue_page (GstOggMux * mux, GstOggPad * pad, ogg_page * page,
gboolean delta)
gst_ogg_mux_pad_queue_page (GstOggMux * mux, GstOggPadData * pad,
ogg_page * page, gboolean delta)
{
GstFlowReturn ret;
GstBuffer *buffer = gst_ogg_mux_buffer_from_page (mux, page, delta);
......@@ -671,8 +671,8 @@ gst_ogg_mux_pad_queue_page (GstOggMux * mux, GstOggPad * pad, ogg_page * page,
* of muxed pages
*/
static gint
gst_ogg_mux_compare_pads (GstOggMux * ogg_mux, GstOggPad * first,
GstOggPad * second)
gst_ogg_mux_compare_pads (GstOggMux * ogg_mux, GstOggPadData * first,
GstOggPadData * second)
{
guint64 firsttime, secondtime;
......@@ -731,20 +731,20 @@ gst_ogg_mux_compare_pads (GstOggMux * ogg_mux, GstOggPad * first,
* NULL when no pad was usable. "best" means the buffer marked
* with the lowest timestamp. If best->buffer == NULL then nothing
* should be done until more data arrives */
static GstOggPad *
static GstOggPadData *
gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
{
GstOggPad *bestpad = NULL, *still_hungry = NULL;
GstOggPadData *bestpad = NULL, *still_hungry = NULL;
GSList *walk;
/* try to make sure we have a buffer from each usable pad first */
walk = ogg_mux->collect->data;
while (walk) {
GstOggPad *pad;
GstOggPadData *pad;
GstCollectData *data;
data = (GstCollectData *) walk->data;
pad = (GstOggPad *) data;
pad = (GstOggPadData *) data;
walk = g_slist_next (walk);
......@@ -840,7 +840,7 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
}
static GList *
gst_ogg_mux_get_headers (GstOggPad * pad)
gst_ogg_mux_get_headers (GstOggPadData * pad)
{
GList *res = NULL;
GstStructure *structure;
......@@ -957,10 +957,10 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
walk = mux->collect->data;
while (walk) {
GstOggPad *pad;
GstOggPadData *pad;
GstPad *thepad;
pad = (GstOggPad *) walk->data;
pad = (GstOggPadData *) walk->data;
thepad = pad->collect.pad;
walk = g_slist_next (walk);
......@@ -978,7 +978,7 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
GST_LOG_OBJECT (mux, "creating BOS pages");
walk = mux->collect->data;
while (walk) {
GstOggPad *pad;
GstOggPadData *pad;
GstBuffer *buf;
ogg_packet packet;
ogg_page page;
......@@ -987,7 +987,7 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
GstStructure *structure;
GstBuffer *hbuf;
pad = (GstOggPad *) walk->data;
pad = (GstOggPadData *) walk->data;
thepad = pad->collect.pad;
caps = gst_pad_get_negotiated_caps (thepad);
structure = gst_caps_get_structure (caps, 0);
......@@ -1063,10 +1063,10 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
GST_LOG_OBJECT (mux, "creating next headers");
walk = mux->collect->data;
while (walk) {
GstOggPad *pad;
GstOggPadData *pad;
GstPad *thepad;
pad = (GstOggPad *) walk->data;
pad = (GstOggPadData *) walk->data;
thepad = pad->collect.pad;
walk = walk->next;
......@@ -1168,7 +1168,7 @@ gst_ogg_mux_send_headers (GstOggMux * mux)
* pads are at EOS)
*/
static GstFlowReturn
gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPad * best)
gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPadData * best)
{
GstFlowReturn ret = GST_FLOW_OK;
gboolean delta_unit;
......@@ -1191,7 +1191,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPad * best)
* for the pad we were pulling from before */
if (ogg_mux->pulling && best &&
ogg_mux->pulling != best && ogg_mux->pulling->buffer) {
GstOggPad *pad = ogg_mux->pulling;
GstOggPadData *pad = ogg_mux->pulling;
GstClockTime last_ts = GST_BUFFER_END_TIME (pad->buffer);
......@@ -1249,7 +1249,7 @@ gst_ogg_mux_process_best_pad (GstOggMux * ogg_mux, GstOggPad * best)
ogg_packet packet;
ogg_page page;
GstBuffer *buf, *tmpbuf;
GstOggPad *pad = ogg_mux->pulling;
GstOggPadData *pad = ogg_mux->pulling;
gint64 duration;
gboolean force_flush;
......@@ -1497,7 +1497,7 @@ beach:
static GstFlowReturn
gst_ogg_mux_collected (GstCollectPads * pads, GstOggMux * ogg_mux)
{
GstOggPad *best;
GstOggPadData *best;
GstFlowReturn ret;
gint activebefore;
......@@ -1593,7 +1593,7 @@ gst_ogg_mux_init_collectpads (GstCollectPads * collect)
walk = collect->data;
while (walk) {
GstOggPad *oggpad = (GstOggPad *) walk->data;
GstOggPadData *oggpad = (GstOggPadData *) walk->data;
ogg_stream_init (&oggpad->stream, oggpad->serial);
oggpad->packetno = 0;
......@@ -1617,7 +1617,7 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect)
GSList *walk;
for (walk = collect->data; walk; walk = g_slist_next (walk)) {
GstOggPad *oggpad = (GstOggPad *) walk->data;
GstOggPadData *oggpad = (GstOggPadData *) walk->data;
GstBuffer *buf;
ogg_stream_clear (&oggpad->stream);
......
......@@ -24,6 +24,7 @@
#include <ogg/ogg.h>
#include <gst/gst.h>
#include <gst/base/gstcollectpads.h>
G_BEGIN_DECLS
......@@ -82,7 +83,7 @@ typedef struct
gboolean always_flush_page;
}
GstOggPad;
GstOggPadData;
/**
* GstOggMux:
......@@ -103,7 +104,7 @@ struct _GstOggMux
gint active_pads;
/* the pad we are currently using to fill a page */
GstOggPad *pulling;
GstOggPadData *pulling;
/* next timestamp for the page */
GstClockTime next_ts;
......@@ -120,7 +121,7 @@ struct _GstOggMux
guint64 max_delay;
guint64 max_page_delay;
GstOggPad *delta_pad; /* when a delta frame is detected on a stream, we mark
GstOggPadData *delta_pad; /* when a delta frame is detected on a stream, we mark
pages as delta frames up to the page that has the
keyframe */
......@@ -133,6 +134,8 @@ struct _GstOggMuxClass
GType gst_ogg_mux_get_type (void);
gboolean gst_ogg_mux_plugin_init (GstPlugin * plugin);
G_END_DECLS
#endif /* __GST_OGG_MUX_H__ */
......@@ -36,6 +36,7 @@
#include <ogg/ogg.h>
#include <string.h>
#include "gstogg.h"
#include "gstoggstream.h"
static const GstElementDetails gst_ogg_parse_details =
......
......@@ -24,9 +24,11 @@
#include "gstoggstream.h"
#include "dirac_parse.h"
#include "vorbis_parse.h"
#include <gst/riff/riff-media.h>
#include <stdlib.h>
#include <string.h>
GST_DEBUG_CATEGORY_EXTERN (gst_ogg_demux_debug);
......@@ -165,6 +167,7 @@ gst_ogg_stream_granule_to_granulepos (GstOggStream * pad, gint64 granule,
keyframe_granule);
}
#if 0
gboolean
gst_ogg_stream_packet_granulepos_is_key_frame (GstOggStream * pad,
gint64 granulepos)
......@@ -180,6 +183,7 @@ gst_ogg_stream_packet_granulepos_is_key_frame (GstOggStream * pad,
return mappers[pad->map].is_key_frame_func (pad, granulepos);
}
#endif
gboolean
gst_ogg_stream_packet_is_header (GstOggStream * pad, ogg_packet * packet)
......@@ -459,10 +463,6 @@ granule_to_granulepos_dirac (GstOggStream * pad, gint64 granule,
/* vorbis */
void parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * op);
void parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op);
static gboolean
setup_vorbis_mapper (GstOggStream * pad, ogg_packet * packet)
{
......@@ -708,49 +708,6 @@ setup_fishead_mapper (GstOggStream * pad, ogg_packet * packet)
return TRUE;
}
gboolean
gst_ogg_map_add_fisbone (GstOggStream * pad,
const guint8 * data, guint size, GstClockTime * p_start_time,
guint32 * p_preroll)
{
GstClockTime start_time;
gint64 start_granule;
guint32 preroll;
if (size < SKELETON_FISBONE_MIN_SIZE || memcmp (data, "fisbone\0", 8) != 0) {
GST_WARNING ("invalid fisbone packet, ignoring");
return FALSE;
}
if (pad->have_fisbone) {
GST_DEBUG ("already have fisbone, ignoring second one");
return FALSE;
}
/* skip "fisbone\0" + headers offset + serialno + num headers */
data += 8 + 4 + 4 + 4;
pad->have_fisbone = TRUE;
/* we just overwrite whatever was set before by the format-specific setup */
pad->granulerate_n = GST_READ_UINT64_LE (data);
pad->granulerate_d = GST_READ_UINT64_LE (data + 8);
start_granule = GST_READ_UINT64_LE (data + 16);
preroll = GST_READ_UINT32_LE (data + 24);
pad->granuleshift = GST_READ_UINT8 (data + 28);
start_time = granulepos_to_granule_default (pad, start_granule);
if (p_start_time)
*p_start_time = start_time;
if (p_preroll)
*p_preroll = preroll;
return TRUE;
}
/* Do we need these for something?
* ogm->hdr.size = GST_READ_UINT32_LE (&data[13]);
* ogm->hdr.time_unit = GST_READ_UINT64_LE (&data[17]);
......
......@@ -30,6 +30,8 @@
#include <gst/riff/riff-media.h>
#include <gst/riff/riff-read.h>
#include "gstogg.h"
GST_DEBUG_CATEGORY_STATIC (gst_ogm_parse_debug);
#define GST_CAT_DEFAULT gst_ogm_parse_debug
......
......@@ -45,6 +45,7 @@
#include <string.h>
#include "gstoggstream.h"
#include "vorbis_parse.h"
/*
* Vorbis packets can be short or long, and each packet overlaps the previous
......
/* GStreamer
* Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
*
* gstoggdemux.c: ogg stream demuxer
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GST_VORBIS_PARSE_H__
#define __GST_VORBIS_PARSE_H__
#include <gst/gst.h>
void parse_vorbis_header_packet (GstOggStream * pad, ogg_packet * packet);
void parse_vorbis_setup_packet (GstOggStream * pad, ogg_packet * op);
#endif /* __GST_VORBIS_PARSE_H__ */
......@@ -105,6 +105,8 @@ struct _GstTheoraDecClass
GstElementClass parent_class;
};
GType gst_theora_dec_get_type (void);
G_END_DECLS
#endif /* __GST_THEORADEC_H__ */
......@@ -110,6 +110,8 @@ struct _GstTheoraEncClass
GstElementClass parent_class;
};
GType gst_theora_enc_get_type (void);
G_END_DECLS
#endif /* __GST_THEORAENC_H__ */
......
......@@ -237,6 +237,8 @@ typedef enum
GST_AUDIO_FIELD_DEPTH = (1 << 4),
GST_AUDIO_FIELD_SIGNED = (1 << 5),
} GstAudioFieldFlag;
void
gst_audio_structure_set_int (GstStructure * structure, GstAudioFieldFlag flag);
#endif /* GST_DISABLE_DEPRECATED */
void
......
......@@ -32,6 +32,8 @@
#include <gst/gst.h>
#include "riff-read.h"
GST_DEBUG_CATEGORY (riff_debug);
/**
......
......@@ -46,6 +46,9 @@
*/
/* This isn't efficient, but it doesn't need to be */
#ifndef GST_REMOVE_DEPRECATED
#ifdef GST_DISABLE_DEPRECATED
gchar *gst_rtsp_base64_encode (const gchar * data, gsize len);
#endif
gchar *
gst_rtsp_base64_encode (const gchar * data, gsize len)
{
......
......@@ -3505,6 +3505,11 @@ gst_rtsp_watch_send_message (GstRTSPWatch * watch, GstRTSPMessage * message,
* Since: 0.10.24
*/
#ifndef GST_REMOVE_DEPRECATED
#ifdef GST_DISABLE_DEPRECATED
guint
gst_rtsp_watch_queue_data (GstRTSPWatch * watch, const guint8 * data,
guint size);
#endif
guint
gst_rtsp_watch_queue_data (GstRTSPWatch * watch, const guint8 * data,
guint size)
......@@ -3560,6 +3565,10 @@ gst_rtsp_watch_queue_data (GstRTSPWatch * watch, const guint8 * data,
* Since: 0.10.23
*/
#ifndef GST_REMOVE_DEPRECATED
#ifdef GST_DISABLE_DEPRECATED
guint
gst_rtsp_watch_queue_message (GstRTSPWatch * watch, GstRTSPMessage * message);
#endif
guint
gst_rtsp_watch_queue_message (GstRTSPWatch * watch, GstRTSPMessage * message)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment