decoder plugins: don't include gcc.h
Use GLib's G_GNUC_UNUSED instead of gcc.h's mpd_unused.
This commit is contained in:
parent
7dfe301b54
commit
17bdcc8bae
@ -21,6 +21,8 @@
|
||||
|
||||
#include "_flac_common.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <FLAC/format.h>
|
||||
#include <FLAC/metadata.h>
|
||||
|
||||
@ -169,7 +171,7 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
|
||||
|
||||
void flac_error_common_cb(const char *plugin,
|
||||
const FLAC__StreamDecoderErrorStatus status,
|
||||
mpd_unused FlacData * data)
|
||||
G_GNUC_UNUSED FlacData * data)
|
||||
{
|
||||
if (decoder_get_command(data->decoder) == DECODE_COMMAND_STOP)
|
||||
return;
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "../decoder_api.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@ -26,7 +28,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <glib.h>
|
||||
|
||||
#ifdef OLD_FFMPEG_INCLUDES
|
||||
#include <avcodec.h>
|
||||
@ -73,7 +74,7 @@ static struct ffmpeg_stream *url_to_struct(const char *url)
|
||||
}
|
||||
|
||||
static int mpd_ffmpeg_open(URLContext *h, const char *filename,
|
||||
mpd_unused int flags)
|
||||
G_GNUC_UNUSED int flags)
|
||||
{
|
||||
struct ffmpeg_stream *stream = url_to_struct(filename);
|
||||
h->priv_data = stream;
|
||||
|
@ -18,12 +18,14 @@
|
||||
|
||||
#include "_flac_common.h"
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* this code was based on flac123, from flac-tools */
|
||||
|
||||
static flac_read_status flacRead(mpd_unused const flac_decoder * flacDec,
|
||||
static flac_read_status flacRead(G_GNUC_UNUSED const flac_decoder * flacDec,
|
||||
FLAC__byte buf[],
|
||||
flac_read_status_size_t *bytes,
|
||||
void *fdata)
|
||||
@ -45,7 +47,7 @@ static flac_read_status flacRead(mpd_unused const flac_decoder * flacDec,
|
||||
return flac_read_status_continue;
|
||||
}
|
||||
|
||||
static flac_seek_status flacSeek(mpd_unused const flac_decoder * flacDec,
|
||||
static flac_seek_status flacSeek(G_GNUC_UNUSED const flac_decoder * flacDec,
|
||||
FLAC__uint64 offset,
|
||||
void *fdata)
|
||||
{
|
||||
@ -57,7 +59,7 @@ static flac_seek_status flacSeek(mpd_unused const flac_decoder * flacDec,
|
||||
return flac_seek_status_ok;
|
||||
}
|
||||
|
||||
static flac_tell_status flacTell(mpd_unused const flac_decoder * flacDec,
|
||||
static flac_tell_status flacTell(G_GNUC_UNUSED const flac_decoder * flacDec,
|
||||
FLAC__uint64 * offset,
|
||||
void *fdata)
|
||||
{
|
||||
@ -68,7 +70,7 @@ static flac_tell_status flacTell(mpd_unused const flac_decoder * flacDec,
|
||||
return flac_tell_status_ok;
|
||||
}
|
||||
|
||||
static flac_length_status flacLength(mpd_unused const flac_decoder * flacDec,
|
||||
static flac_length_status flacLength(G_GNUC_UNUSED const flac_decoder * flacDec,
|
||||
FLAC__uint64 * length,
|
||||
void *fdata)
|
||||
{
|
||||
@ -82,7 +84,7 @@ static flac_length_status flacLength(mpd_unused const flac_decoder * flacDec,
|
||||
return flac_length_status_ok;
|
||||
}
|
||||
|
||||
static FLAC__bool flacEOF(mpd_unused const flac_decoder * flacDec, void *fdata)
|
||||
static FLAC__bool flacEOF(G_GNUC_UNUSED const flac_decoder * flacDec, void *fdata)
|
||||
{
|
||||
FlacData *data = (FlacData *) fdata;
|
||||
|
||||
@ -91,7 +93,7 @@ static FLAC__bool flacEOF(mpd_unused const flac_decoder * flacDec, void *fdata)
|
||||
input_stream_eof(data->inStream);
|
||||
}
|
||||
|
||||
static void flacError(mpd_unused const flac_decoder *dec,
|
||||
static void flacError(G_GNUC_UNUSED const flac_decoder *dec,
|
||||
FLAC__StreamDecoderErrorStatus status, void *fdata)
|
||||
{
|
||||
flac_error_common_cb("flac", status, (FlacData *) fdata);
|
||||
@ -191,7 +193,7 @@ static void flacPrintErroredState(FLAC__StreamDecoderState state)
|
||||
}
|
||||
#endif /* FLAC_API_VERSION_CURRENT >= 7 */
|
||||
|
||||
static void flacMetadata(mpd_unused const flac_decoder * dec,
|
||||
static void flacMetadata(G_GNUC_UNUSED const flac_decoder * dec,
|
||||
const FLAC__StreamMetadata * block, void *vdata)
|
||||
{
|
||||
flac_metadata_common_cb(block, (FlacData *) vdata);
|
||||
|
@ -73,7 +73,7 @@ static int ogg_seek_cb(void *vdata, ogg_int64_t offset, int whence)
|
||||
}
|
||||
|
||||
/* TODO: check Ogg libraries API and see if we can just not have this func */
|
||||
static int ogg_close_cb(mpd_unused void *vdata)
|
||||
static int ogg_close_cb(G_GNUC_UNUSED void *vdata)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t count)
|
||||
* This function converts floating point sample data to 24-bit integer.
|
||||
*/
|
||||
static void
|
||||
format_samples_float(mpd_unused int bytes_per_sample, void *buffer,
|
||||
format_samples_float(G_GNUC_UNUSED int bytes_per_sample, void *buffer,
|
||||
uint32_t count)
|
||||
{
|
||||
int32_t *dst = buffer;
|
||||
|
Loading…
Reference in New Issue
Block a user