Commit 2c0d247a authored by Philip Jägenstedt's avatar Philip Jägenstedt Committed by Sebastian Dröge

[MOVED FROM BAD 026/134] vp8: exlcude dec/enc based on CONFIG_VP8_DECODER/ENCODER

This may not be very autotoolish, but works with libvpx in the state
that libvpx is actually in. Moved the debug init to the elements
themselves to minimize amount of #ifdefs
parent 80d2b434
......@@ -44,7 +44,9 @@
#include "gstvp8utils.h"
GST_DEBUG_CATEGORY (gst_vp8dec_debug);
#if CONFIG_VP8_DECODER
GST_DEBUG_CATEGORY_STATIC (gst_vp8dec_debug);
#define GST_CAT_DEFAULT gst_vp8dec_debug
#define GST_TYPE_VP8_DEC \
......@@ -223,6 +225,8 @@ gst_vp8_dec_class_init (GstVP8DecClass * klass)
base_video_decoder_class->reset = gst_vp8_dec_reset;
base_video_decoder_class->parse_data = gst_vp8_dec_parse_data;
base_video_decoder_class->handle_frame = gst_vp8_dec_handle_frame;
GST_DEBUG_CATEGORY_INIT (gst_vp8dec_debug, "vp8dec", 0, "VP8 Decoder");
}
static void
......@@ -527,3 +531,5 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame)
return ret;
}
#endif /* CONFIG_VP8_DECODER */
......@@ -45,7 +45,9 @@
#include "gstvp8utils.h"
GST_DEBUG_CATEGORY (gst_vp8enc_debug);
#if CONFIG_VP8_ENCODER
GST_DEBUG_CATEGORY_STATIC (gst_vp8enc_debug);
#define GST_CAT_DEFAULT gst_vp8enc_debug
#define GST_TYPE_VP8_ENC \
......@@ -253,6 +255,8 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
"Speed",
0, 2, DEFAULT_SPEED,
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
GST_DEBUG_CATEGORY_INIT (gst_vp8enc_debug, "vp8enc", 0, "VP8 Encoder");
}
static void
......@@ -839,3 +843,5 @@ gst_vp8_enc_sink_event (GstPad * pad, GstEvent * event)
return ret;
}
#endif /* CONFIG_VP8_ENCODER */
......@@ -25,22 +25,23 @@
#include <gst/gst.h>
#include <vpx/vpx_config.h>
GType gst_vp8_dec_get_type (void);
GType gst_vp8_enc_get_type (void);
GST_DEBUG_CATEGORY_EXTERN (gst_vp8dec_debug);
GST_DEBUG_CATEGORY_EXTERN (gst_vp8enc_debug);
static gboolean
plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_vp8dec_debug, "vp8dec", 0, "VP8 Decoder");
GST_DEBUG_CATEGORY_INIT (gst_vp8enc_debug, "vp8enc", 0, "VP8 Encoder");
#if CONFIG_VP8_DECODER
gst_element_register (plugin, "vp8dec", GST_RANK_PRIMARY,
gst_vp8_dec_get_type ());
#endif
#if CONFIG_VP8_ENCODER
gst_element_register (plugin, "vp8enc", GST_RANK_PRIMARY,
gst_vp8_enc_get_type ());
#endif
return TRUE;
}
......
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