oggmux: Fix test build when theora and vorbis aren't available

Ifdef properly to avoid build failures
This commit is contained in:
Thiago Santos 2010-08-02 11:06:00 -03:00
parent d123ab7bb1
commit 3dbf96faa3

View file

@ -46,11 +46,11 @@ typedef struct
ChainCodec codec;
} ChainState;
#if (defined (HAVE_THEORA) || defined (HAVE_VORBIS))
static ogg_sync_state oggsync;
static GHashTable *eos_chain_states;
static gulong probe_id;
static ChainCodec
get_page_codec (ogg_page * page)
{
@ -77,15 +77,6 @@ get_page_codec (ogg_page * page)
return codec;
}
static gboolean
check_chain_final_state (gpointer key, ChainState * state, gpointer data)
{
fail_unless (state->eos, "missing EOS flag on chain %u", state->serialno);
/* return TRUE to empty the chain table */
return TRUE;
}
static void
fail_if_audio (gpointer key, ChainState * state, gpointer data)
{
@ -157,6 +148,14 @@ is_video (gpointer key, ChainState * state, gpointer data)
*((gboolean *) data) = TRUE;
}
static gboolean
check_chain_final_state (gpointer key, ChainState * state, gpointer data)
{
fail_unless (state->eos, "missing EOS flag on chain %u", state->serialno);
/* return TRUE to empty the chain table */
return TRUE;
}
static gboolean
eos_buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused)
@ -309,6 +308,7 @@ test_pipeline (const char *pipeline)
gst_object_unref (pad);
gst_object_unref (bin);
}
#endif
#ifdef HAVE_VORBIS
GST_START_TEST (test_vorbis)