mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
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
This commit is contained in:
parent
557b19e64e
commit
e428c10605
3 changed files with 21 additions and 8 deletions
|
@ -44,7 +44,9 @@
|
||||||
|
|
||||||
#include "gstvp8utils.h"
|
#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_CAT_DEFAULT gst_vp8dec_debug
|
||||||
|
|
||||||
#define GST_TYPE_VP8_DEC \
|
#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->reset = gst_vp8_dec_reset;
|
||||||
base_video_decoder_class->parse_data = gst_vp8_dec_parse_data;
|
base_video_decoder_class->parse_data = gst_vp8_dec_parse_data;
|
||||||
base_video_decoder_class->handle_frame = gst_vp8_dec_handle_frame;
|
base_video_decoder_class->handle_frame = gst_vp8_dec_handle_frame;
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_vp8dec_debug, "vp8dec", 0, "VP8 Decoder");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -527,3 +531,5 @@ gst_vp8_dec_handle_frame (GstBaseVideoDecoder * decoder, GstVideoFrame * frame)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_VP8_DECODER */
|
||||||
|
|
|
@ -45,7 +45,9 @@
|
||||||
|
|
||||||
#include "gstvp8utils.h"
|
#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_CAT_DEFAULT gst_vp8enc_debug
|
||||||
|
|
||||||
#define GST_TYPE_VP8_ENC \
|
#define GST_TYPE_VP8_ENC \
|
||||||
|
@ -253,6 +255,8 @@ gst_vp8_enc_class_init (GstVP8EncClass * klass)
|
||||||
"Speed",
|
"Speed",
|
||||||
0, 2, DEFAULT_SPEED,
|
0, 2, DEFAULT_SPEED,
|
||||||
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
(GParamFlags) (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)));
|
||||||
|
|
||||||
|
GST_DEBUG_CATEGORY_INIT (gst_vp8enc_debug, "vp8enc", 0, "VP8 Encoder");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -839,3 +843,5 @@ gst_vp8_enc_sink_event (GstPad * pad, GstEvent * event)
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* CONFIG_VP8_ENCODER */
|
||||||
|
|
|
@ -25,22 +25,23 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
#include <vpx/vpx_config.h>
|
||||||
|
|
||||||
GType gst_vp8_dec_get_type (void);
|
GType gst_vp8_dec_get_type (void);
|
||||||
GType gst_vp8_enc_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
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
{
|
{
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_vp8dec_debug, "vp8dec", 0, "VP8 Decoder");
|
#if CONFIG_VP8_DECODER
|
||||||
GST_DEBUG_CATEGORY_INIT (gst_vp8enc_debug, "vp8enc", 0, "VP8 Encoder");
|
|
||||||
|
|
||||||
gst_element_register (plugin, "vp8dec", GST_RANK_PRIMARY,
|
gst_element_register (plugin, "vp8dec", GST_RANK_PRIMARY,
|
||||||
gst_vp8_dec_get_type ());
|
gst_vp8_dec_get_type ());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_VP8_ENCODER
|
||||||
gst_element_register (plugin, "vp8enc", GST_RANK_PRIMARY,
|
gst_element_register (plugin, "vp8enc", GST_RANK_PRIMARY,
|
||||||
gst_vp8_enc_get_type ());
|
gst_vp8_enc_get_type ());
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue