rawparse: Whitespace cleanup

This commit is contained in:
Sebastian Dröge 2016-11-28 14:25:49 +02:00
parent de4bb6e1d4
commit 423e4593aa
12 changed files with 0 additions and 139 deletions

View file

@ -42,14 +42,12 @@
#include <string.h>
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -61,7 +59,6 @@ static GstStaticPadTemplate static_src_template =
"audio/x-mulaw, rate=(int)[1,MAX], channels=(int)[1,MAX]")
);
typedef enum
{
GST_AUDIO_PARSE_FORMAT_RAW,
@ -109,7 +106,6 @@ gst_audio_parse_format_get_type (void)
return audio_parse_format_type;
}
#define gst_audio_parse_parent_class parent_class
G_DEFINE_TYPE (GstAudioParse, gst_audio_parse, GST_TYPE_BIN);

View file

@ -49,7 +49,6 @@ struct _GstAudioParseClass
GstBinClass parent_class;
};
GType gst_audio_parse_get_type (void);
#endif /* __GST_AUDIO_PARSE_H__ */

View file

@ -83,11 +83,9 @@
#include "gstrawaudioparse.h"
#include "unalignedaudio.h"
GST_DEBUG_CATEGORY_STATIC (raw_audio_parse_debug);
#define GST_CAT_DEFAULT raw_audio_parse_debug
enum
{
PROP_0,
@ -99,21 +97,18 @@ enum
PROP_CHANNEL_POSITIONS
};
#define DEFAULT_FORMAT GST_RAW_AUDIO_PARSE_FORMAT_PCM
#define DEFAULT_PCM_FORMAT GST_AUDIO_FORMAT_S16
#define DEFAULT_SAMPLE_RATE 44100
#define DEFAULT_NUM_CHANNELS 2
#define DEFAULT_INTERLEAVED TRUE
#define GST_RAW_AUDIO_PARSE_CAPS \
GST_AUDIO_CAPS_MAKE(GST_AUDIO_FORMATS_ALL) \
", layout = (string) { interleaved, non-interleaved }; " \
"audio/x-alaw, rate = (int) [ 1, MAX ], channels = (int) [ 1, MAX ]; " \
"audio/x-mulaw, rate = (int) [ 1, MAX ], channels = (int) [ 1, MAX ]; "
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -121,7 +116,6 @@ static GstStaticPadTemplate static_sink_template =
GST_STATIC_CAPS (GST_UNALIGNED_RAW_AUDIO_CAPS "; " GST_RAW_AUDIO_PARSE_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -129,11 +123,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_RAW_AUDIO_PARSE_CAPS)
);
#define gst_raw_audio_parse_parent_class parent_class
G_DEFINE_TYPE (GstRawAudioParse, gst_raw_audio_parse, GST_TYPE_RAW_BASE_PARSE);
static void gst_raw_audio_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec);
static void gst_raw_audio_parse_get_property (GObject * object, guint prop_id,
@ -183,8 +175,6 @@ static gboolean gst_raw_audio_parse_caps_to_config (GstRawAudioParse *
static gboolean gst_raw_audio_parse_config_to_caps (GstRawAudioParse *
raw_audio_parse, GstCaps ** caps, GstRawAudioParseConfig * config);
static void
gst_raw_audio_parse_class_init (GstRawAudioParseClass * klass)
{
@ -295,7 +285,6 @@ gst_raw_audio_parse_class_init (GstRawAudioParseClass * klass)
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_raw_audio_parse_init (GstRawAudioParse * raw_audio_parse)
{
@ -312,7 +301,6 @@ gst_raw_audio_parse_init (GstRawAudioParse * raw_audio_parse)
gst_raw_audio_parse_update_config_bpf (&(raw_audio_parse->properties_config));
}
static void
gst_raw_audio_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec)
@ -506,7 +494,6 @@ gst_raw_audio_parse_set_property (GObject * object, guint prop_id,
}
}
static void
gst_raw_audio_parse_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
@ -587,7 +574,6 @@ gst_raw_audio_parse_get_property (GObject * object, guint prop_id,
}
}
static gboolean
gst_raw_audio_parse_stop (GstBaseParse * parse)
{
@ -603,7 +589,6 @@ gst_raw_audio_parse_stop (GstBaseParse * parse)
return GST_BASE_PARSE_CLASS (parent_class)->stop (parse);
}
static gboolean
gst_raw_audio_parse_set_current_config (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -626,7 +611,6 @@ gst_raw_audio_parse_set_current_config (GstRawBaseParse * raw_base_parse,
return TRUE;
}
static GstRawBaseParseConfig
gst_raw_audio_parse_get_current_config (GstRawBaseParse * raw_base_parse)
{
@ -635,7 +619,6 @@ gst_raw_audio_parse_get_current_config (GstRawBaseParse * raw_base_parse)
GST_RAW_BASE_PARSE_CONFIG_SINKCAPS : GST_RAW_BASE_PARSE_CONFIG_PROPERTIES;
}
static gboolean
gst_raw_audio_parse_set_config_from_caps (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config, GstCaps * caps)
@ -645,7 +628,6 @@ gst_raw_audio_parse_set_config_from_caps (GstRawBaseParse * raw_base_parse,
gst_raw_audio_parse_get_config_ptr (raw_audio_parse, config));
}
static gboolean
gst_raw_audio_parse_get_caps_from_config (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config, GstCaps ** caps)
@ -655,7 +637,6 @@ gst_raw_audio_parse_get_caps_from_config (GstRawBaseParse * raw_base_parse,
gst_raw_audio_parse_get_config_ptr (raw_audio_parse, config));
}
static gsize
gst_raw_audio_parse_get_config_frame_size (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -664,7 +645,6 @@ gst_raw_audio_parse_get_config_frame_size (GstRawBaseParse * raw_base_parse,
return gst_raw_audio_parse_get_config_ptr (raw_audio_parse, config)->bpf;
}
static gboolean
gst_raw_audio_parse_is_config_ready (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -754,7 +734,6 @@ gst_raw_audio_parse_process (GstRawBaseParse * raw_base_parse,
return TRUE;
}
static gboolean
gst_raw_audio_parse_is_unit_format_supported (G_GNUC_UNUSED GstRawBaseParse *
raw_base_parse, GstFormat format)
@ -768,7 +747,6 @@ gst_raw_audio_parse_is_unit_format_supported (G_GNUC_UNUSED GstRawBaseParse *
}
}
static void
gst_raw_audio_parse_get_units_per_second (GstRawBaseParse * raw_base_parse,
GstFormat format, GstRawBaseParseConfig config, gsize * units_per_sec_n,
@ -794,7 +772,6 @@ gst_raw_audio_parse_get_units_per_second (GstRawBaseParse * raw_base_parse,
}
}
static gboolean
gst_raw_audio_parse_is_using_sink_caps (GstRawAudioParse * raw_audio_parse)
{
@ -802,7 +779,6 @@ gst_raw_audio_parse_is_using_sink_caps (GstRawAudioParse * raw_audio_parse)
&(raw_audio_parse->sink_caps_config);
}
static GstRawAudioParseConfig *
gst_raw_audio_parse_get_config_ptr (GstRawAudioParse * raw_audio_parse,
GstRawBaseParseConfig config)
@ -822,7 +798,6 @@ gst_raw_audio_parse_get_config_ptr (GstRawAudioParse * raw_audio_parse,
}
}
static void
gst_raw_audio_parse_init_config (GstRawAudioParseConfig * config)
{
@ -839,7 +814,6 @@ gst_raw_audio_parse_init_config (GstRawAudioParseConfig * config)
TRUE);
}
static gboolean
gst_raw_audio_parse_set_config_channels (GstRawAudioParseConfig * config,
guint num_channels, guint64 channel_mask, gboolean set_positions)
@ -865,7 +839,6 @@ gst_raw_audio_parse_set_config_channels (GstRawAudioParseConfig * config,
}
}
static gboolean
gst_raw_audio_parse_update_channel_reordering_flag (GstRawAudioParseConfig *
config)
@ -895,7 +868,6 @@ gst_raw_audio_parse_update_channel_reordering_flag (GstRawAudioParseConfig *
}
}
static void
gst_raw_audio_parse_update_config_bpf (GstRawAudioParseConfig * config)
{
@ -923,7 +895,6 @@ gst_raw_audio_parse_update_config_bpf (GstRawAudioParseConfig * config)
}
}
static gboolean
gst_raw_audio_parse_caps_to_config (GstRawAudioParse * raw_audio_parse,
GstCaps * caps, GstRawAudioParseConfig * config)
@ -1034,7 +1005,6 @@ done:
return ret;
}
static gboolean
gst_raw_audio_parse_config_to_caps (GstRawAudioParse * raw_audio_parse,
GstCaps ** caps, GstRawAudioParseConfig * config)
@ -1102,9 +1072,6 @@ gst_raw_audio_parse_config_to_caps (GstRawAudioParse * raw_audio_parse,
return ret;
}
GType
gst_raw_audio_parse_format_get_type (void)
{

View file

@ -39,14 +39,12 @@ G_BEGIN_DECLS
#define GST_IS_RAW_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RAW_AUDIO_PARSE))
typedef enum _GstRawAudioParseFormat GstRawAudioParseFormat;
typedef struct _GstRawAudioParseConfig GstRawAudioParseConfig;
typedef struct _GstRawAudioParse GstRawAudioParse;
typedef struct _GstRawAudioParseClass GstRawAudioParseClass;
enum _GstRawAudioParseFormat
{
GST_RAW_AUDIO_PARSE_FORMAT_PCM,
@ -54,7 +52,6 @@ enum _GstRawAudioParseFormat
GST_RAW_AUDIO_PARSE_FORMAT_ALAW
};
/* Contains information about the sample rate, format, and channel count to use. */
struct _GstRawAudioParseConfig
{
@ -94,7 +91,6 @@ struct _GstRawAudioParseConfig
gboolean needs_channel_reordering;
};
struct _GstRawAudioParse
{
GstRawBaseParse parent;
@ -115,17 +111,14 @@ struct _GstRawAudioParse
GstRawAudioParseConfig *current_config;
};
struct _GstRawAudioParseClass
{
GstRawBaseParseClass parent_class;
};
GType gst_raw_audio_parse_get_type (void);
GType gst_raw_audio_parse_format_get_type (void);
G_END_DECLS
#endif

View file

@ -109,29 +109,24 @@
#include <string.h>
#include "gstrawbaseparse.h"
GST_DEBUG_CATEGORY_STATIC (raw_base_parse_debug);
#define GST_CAT_DEFAULT raw_base_parse_debug
enum
{
PROP_0,
PROP_USE_SINK_CAPS
};
#define DEFAULT_USE_SINK_CAPS FALSE
#define INITIAL_PARSER_CONFIG \
((DEFAULT_USE_SINK_CAPS) ? GST_RAW_BASE_PARSE_CONFIG_SINKCAPS : \
GST_RAW_BASE_PARSE_CONFIG_PROPERTIES)
#define gst_raw_base_parse_parent_class parent_class
G_DEFINE_ABSTRACT_TYPE (GstRawBaseParse, gst_raw_base_parse,
GST_TYPE_BASE_PARSE);
static void gst_raw_base_parse_finalize (GObject * object);
static void gst_raw_base_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec);
@ -152,8 +147,6 @@ static gboolean gst_raw_base_parse_is_using_sink_caps (GstRawBaseParse *
static gboolean gst_raw_base_parse_is_gstformat_supported (GstRawBaseParse *
raw_base_parse, GstFormat format);
static void
gst_raw_base_parse_class_init (GstRawBaseParseClass * klass)
{
@ -196,7 +189,6 @@ gst_raw_base_parse_class_init (GstRawBaseParseClass * klass)
);
}
static void
gst_raw_base_parse_init (GstRawBaseParse * raw_base_parse)
{
@ -204,7 +196,6 @@ gst_raw_base_parse_init (GstRawBaseParse * raw_base_parse)
g_mutex_init (&(raw_base_parse->config_mutex));
}
static void
gst_raw_base_parse_finalize (GObject * object)
{
@ -215,7 +206,6 @@ gst_raw_base_parse_finalize (GObject * object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gst_raw_base_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec)
@ -291,7 +281,6 @@ gst_raw_base_parse_set_property (GObject * object, guint prop_id,
}
}
static void
gst_raw_base_parse_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
@ -312,7 +301,6 @@ gst_raw_base_parse_get_property (GObject * object, guint prop_id,
}
}
static gboolean
gst_raw_base_parse_start (GstBaseParse * parse)
{
@ -338,7 +326,6 @@ gst_raw_base_parse_start (GstBaseParse * parse)
return TRUE;
}
static gboolean
gst_raw_base_parse_stop (GstBaseParse * parse)
{
@ -351,7 +338,6 @@ gst_raw_base_parse_stop (GstBaseParse * parse)
return TRUE;
}
static gboolean
gst_raw_base_parse_set_sink_caps (GstBaseParse * parse, GstCaps * caps)
{
@ -363,7 +349,6 @@ gst_raw_base_parse_set_sink_caps (GstBaseParse * parse, GstCaps * caps)
g_assert (klass->get_caps_from_config);
g_assert (klass->get_config_frame_size);
GST_RAW_BASE_PARSE_CONFIG_MUTEX_LOCK (raw_base_parse);
GST_DEBUG_OBJECT (parse, "getting config from new sink caps");
@ -488,18 +473,15 @@ gst_raw_base_parse_handle_frame (GstBaseParse * parse,
g_assert (klass->get_config_frame_size);
g_assert (klass->get_units_per_second);
/* We never skip any bytes this way. Instead, subclass takes care
* of skipping any overhead (necessary, since the way it needs to
* be skipped is completely subclass specific). */
*skipsize = 0;
/* The operations below access the current config. Protect
* against race conditions by using the object lock. */
GST_RAW_BASE_PARSE_CONFIG_MUTEX_LOCK (raw_base_parse);
/* If the source pad caps haven't been set yet, or need to be
* set again, do so now, BEFORE any buffers are pushed out */
if (G_UNLIKELY (!raw_base_parse->src_caps_set)) {
@ -544,7 +526,6 @@ gst_raw_base_parse_handle_frame (GstBaseParse * parse,
klass->get_config_frame_size (raw_base_parse,
GST_RAW_BASE_PARSE_CONFIG_CURRENT);
in_size = gst_buffer_get_size (frame->buffer);
/* gst_base_parse_set_min_frame_size() is called when the current
@ -636,7 +617,6 @@ gst_raw_base_parse_handle_frame (GstBaseParse * parse,
* operations, so the lock can be released */
GST_RAW_BASE_PARSE_CONFIG_MUTEX_UNLOCK (raw_base_parse);
/* If any new caps have to be pushed downstrean, do so
* *before* the frame is finished */
if (G_UNLIKELY (new_caps_event != NULL)) {
@ -650,7 +630,6 @@ gst_raw_base_parse_handle_frame (GstBaseParse * parse,
return flow_ret;
config_not_ready:
GST_RAW_BASE_PARSE_CONFIG_MUTEX_UNLOCK (raw_base_parse);
GST_ELEMENT_ERROR (parse, STREAM, FORMAT,
@ -676,7 +655,6 @@ error_end:
return flow_ret;
}
static gboolean
gst_raw_base_parse_convert (GstBaseParse * parse, GstFormat src_format,
gint64 src_value, GstFormat dest_format, gint64 * dest_value)
@ -689,12 +667,10 @@ gst_raw_base_parse_convert (GstBaseParse * parse, GstFormat src_format,
g_assert (klass->is_config_ready);
g_assert (klass->get_units_per_second);
/* The operations below access the current config. Protect
* against race conditions by using the object lock. */
GST_RAW_BASE_PARSE_CONFIG_MUTEX_LOCK (raw_base_parse);
if (!klass->is_config_ready (raw_base_parse,
GST_RAW_BASE_PARSE_CONFIG_CURRENT)) {
if (gst_raw_base_parse_is_using_sink_caps (raw_base_parse)) {
@ -746,7 +722,6 @@ gst_raw_base_parse_convert (GstBaseParse * parse, GstFormat src_format,
GST_RAW_BASE_PARSE_CONFIG_MUTEX_UNLOCK (raw_base_parse);
return ret;
config_not_ready:
GST_RAW_BASE_PARSE_CONFIG_MUTEX_UNLOCK (raw_base_parse);
GST_ELEMENT_ERROR (parse, STREAM, FORMAT,
@ -755,7 +730,6 @@ config_not_ready:
return FALSE;
}
static gboolean
gst_raw_base_parse_is_using_sink_caps (GstRawBaseParse * raw_base_parse)
{
@ -766,7 +740,6 @@ gst_raw_base_parse_is_using_sink_caps (GstRawBaseParse * raw_base_parse)
GST_RAW_BASE_PARSE_CONFIG_SINKCAPS;
}
static gboolean
gst_raw_base_parse_is_gstformat_supported (GstRawBaseParse * raw_base_parse,
GstFormat format)
@ -777,10 +750,6 @@ gst_raw_base_parse_is_gstformat_supported (GstRawBaseParse * raw_base_parse,
return klass->is_unit_format_supported (raw_base_parse, format);
}
/**
* gst_raw_base_parse_invalidate_src_caps:
* @raw_base_parse: a #GstRawBaseParse instance

View file

@ -43,12 +43,10 @@ G_BEGIN_DECLS
#define GST_RAW_BASE_PARSE_CONFIG_MUTEX_LOCK(obj) g_mutex_lock(&(((GstRawBaseParse *)(obj))->config_mutex))
#define GST_RAW_BASE_PARSE_CONFIG_MUTEX_UNLOCK(obj) g_mutex_unlock(&(((GstRawBaseParse *)(obj))->config_mutex))
typedef enum _GstRawBaseParseConfig GstRawBaseParseConfig;
typedef struct _GstRawBaseParse GstRawBaseParse;
typedef struct _GstRawBaseParseClass GstRawBaseParseClass;
/**
* GstRawBaseParseConfig:
* @GST_RAW_BASE_PARSE_CONFIG_CURRENT: configuration that is currently active
@ -64,7 +62,6 @@ enum _GstRawBaseParseConfig
GST_RAW_BASE_PARSE_CONFIG_PROPERTIES
};
/**
* GstRawBaseParse:
*
@ -84,7 +81,6 @@ struct _GstRawBaseParse
GMutex config_mutex;
};
/**
* GstRawBaseParseClass:
* @parent_class: The parent class structure
@ -198,13 +194,10 @@ struct _GstRawBaseParseClass
GstRawBaseParseConfig config);
};
void gst_raw_base_parse_invalidate_src_caps (GstRawBaseParse * raw_base_parse);
GType gst_raw_base_parse_get_type (void);
G_END_DECLS
#endif

View file

@ -86,11 +86,9 @@
#include "gstrawvideoparse.h"
#include "unalignedvideo.h"
GST_DEBUG_CATEGORY_STATIC (raw_video_parse_debug);
#define GST_CAT_DEFAULT raw_video_parse_debug
enum
{
PROP_0,
@ -106,7 +104,6 @@ enum
PROP_FRAME_STRIDE
};
#define DEFAULT_WIDTH 320
#define DEFAULT_HEIGHT 240
#define DEFAULT_FORMAT GST_VIDEO_FORMAT_I420
@ -118,11 +115,9 @@ enum
#define DEFAULT_TOP_FIELD_FIRST FALSE
#define DEFAULT_FRAME_STRIDE 0
#define GST_RAW_VIDEO_PARSE_CAPS \
GST_VIDEO_CAPS_MAKE(GST_VIDEO_FORMATS_ALL) "; "
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -130,7 +125,6 @@ static GstStaticPadTemplate static_sink_template =
GST_STATIC_CAPS (GST_UNALIGNED_RAW_VIDEO_CAPS "; " GST_RAW_VIDEO_PARSE_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -138,11 +132,9 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_RAW_VIDEO_PARSE_CAPS)
);
#define gst_raw_video_parse_parent_class parent_class
G_DEFINE_TYPE (GstRawVideoParse, gst_raw_video_parse, GST_TYPE_RAW_BASE_PARSE);
static void gst_raw_video_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec);
static void gst_raw_video_parse_get_property (GObject * object, guint prop_id,
@ -338,7 +330,6 @@ gst_raw_video_parse_class_init (GstRawVideoParseClass * klass)
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_raw_video_parse_init (GstRawVideoParse * raw_video_parse)
{
@ -356,7 +347,6 @@ gst_raw_video_parse_init (GstRawVideoParse * raw_video_parse)
raw_video_parse->properties_config.frame_stride = DEFAULT_FRAME_STRIDE;
}
static void
gst_raw_video_parse_set_property (GObject * object, guint prop_id,
GValue const *value, GParamSpec * pspec)
@ -653,7 +643,6 @@ gst_raw_video_parse_set_property (GObject * object, guint prop_id,
}
}
static void
gst_raw_video_parse_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
@ -773,7 +762,6 @@ gst_raw_video_parse_get_property (GObject * object, guint prop_id,
}
}
static gboolean
gst_raw_video_parse_stop (GstBaseParse * parse)
{
@ -789,7 +777,6 @@ gst_raw_video_parse_stop (GstBaseParse * parse)
return GST_BASE_PARSE_CLASS (parent_class)->stop (parse);
}
static gboolean
gst_raw_video_parse_set_current_config (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -812,7 +799,6 @@ gst_raw_video_parse_set_current_config (GstRawBaseParse * raw_base_parse,
return TRUE;
}
static GstRawBaseParseConfig
gst_raw_video_parse_get_current_config (GstRawBaseParse * raw_base_parse)
{
@ -821,7 +807,6 @@ gst_raw_video_parse_get_current_config (GstRawBaseParse * raw_base_parse)
GST_RAW_BASE_PARSE_CONFIG_SINKCAPS : GST_RAW_BASE_PARSE_CONFIG_PROPERTIES;
}
static gboolean
gst_raw_video_parse_set_config_from_caps (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config, GstCaps * caps)
@ -886,7 +871,6 @@ gst_raw_video_parse_set_config_from_caps (GstRawBaseParse * raw_base_parse,
return config_ptr->ready;
}
static gboolean
gst_raw_video_parse_get_caps_from_config (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config, GstCaps ** caps)
@ -902,7 +886,6 @@ gst_raw_video_parse_get_caps_from_config (GstRawBaseParse * raw_base_parse,
return *caps != NULL;
}
static gsize
gst_raw_video_parse_get_config_frame_size (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -914,7 +897,6 @@ gst_raw_video_parse_get_config_frame_size (GstRawBaseParse * raw_base_parse,
(gsize) (config_ptr->frame_stride));
}
static guint
gst_raw_video_parse_get_max_frames_per_buffer (G_GNUC_UNUSED GstRawBaseParse *
raw_base_parse, G_GNUC_UNUSED GstRawBaseParseConfig config)
@ -923,7 +905,6 @@ gst_raw_video_parse_get_max_frames_per_buffer (G_GNUC_UNUSED GstRawBaseParse *
return 1;
}
static gboolean
gst_raw_video_parse_is_config_ready (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -995,7 +976,6 @@ gst_raw_video_parse_process (GstRawBaseParse * raw_base_parse,
return TRUE;
}
static gboolean
gst_raw_video_parse_is_unit_format_supported (G_GNUC_UNUSED GstRawBaseParse *
raw_base_parse, GstFormat format)
@ -1009,7 +989,6 @@ gst_raw_video_parse_is_unit_format_supported (G_GNUC_UNUSED GstRawBaseParse *
}
}
static void
gst_raw_video_parse_get_units_per_second (GstRawBaseParse * raw_base_parse,
GstFormat format, GstRawBaseParseConfig config, gsize * units_per_sec_n,
@ -1050,7 +1029,6 @@ gst_raw_video_parse_get_units_per_second (GstRawBaseParse * raw_base_parse,
}
}
static gint
gst_raw_video_parse_get_overhead_size (GstRawBaseParse * raw_base_parse,
GstRawBaseParseConfig config)
@ -1073,7 +1051,6 @@ gst_raw_video_parse_get_overhead_size (GstRawBaseParse * raw_base_parse,
return (frame_size < frame_stride) ? (gint) (frame_stride - frame_size) : 0;
}
static gboolean
gst_raw_video_parse_is_using_sink_caps (GstRawVideoParse * raw_video_parse)
{
@ -1081,7 +1058,6 @@ gst_raw_video_parse_is_using_sink_caps (GstRawVideoParse * raw_video_parse)
&(raw_video_parse->sink_caps_config);
}
static GstRawVideoParseConfig *
gst_raw_video_parse_get_config_ptr (GstRawVideoParse * raw_video_parse,
GstRawBaseParseConfig config)
@ -1101,7 +1077,6 @@ gst_raw_video_parse_get_config_ptr (GstRawVideoParse * raw_video_parse,
}
}
static void
gst_raw_video_parse_init_config (GstRawVideoParseConfig * config)
{
@ -1128,7 +1103,6 @@ gst_raw_video_parse_init_config (GstRawVideoParseConfig * config)
}
}
static void
gst_raw_video_parse_update_info (GstRawVideoParseConfig * config)
{

View file

@ -39,12 +39,10 @@ G_BEGIN_DECLS
#define GST_IS_RAW_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_RAW_VIDEO_PARSE))
typedef struct _GstRawVideoParseConfig GstRawVideoParseConfig;
typedef struct _GstRawVideoParse GstRawVideoParse;
typedef struct _GstRawVideoParseClass GstRawVideoParseClass;
/* Contains information about the video frame format. */
struct _GstRawVideoParseConfig
{
@ -82,7 +80,6 @@ struct _GstRawVideoParseConfig
gboolean custom_plane_strides;
};
struct _GstRawVideoParse
{
GstRawBaseParse parent;
@ -103,16 +100,13 @@ struct _GstRawVideoParse
GstRawVideoParseConfig *current_config;
};
struct _GstRawVideoParseClass
{
GstRawBaseParseClass parent_class;
};
GType gst_raw_video_parse_get_type (void);
G_END_DECLS
#endif

View file

@ -26,24 +26,20 @@
#include "gstunalignedaudioparse.h"
#include "unalignedaudio.h"
GST_DEBUG_CATEGORY (unaligned_audio_parse_debug);
#define GST_CAT_DEFAULT unaligned_audio_parse_debug
struct _GstUnalignedAudioParse
{
GstBin parent;
GstElement *inner_parser;
};
struct _GstUnalignedAudioParseClass
{
GstBinClass parent_class;
};
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -51,7 +47,6 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS (GST_UNALIGNED_RAW_AUDIO_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -60,12 +55,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
", layout = (string) { interleaved, non-interleaved }")
);
G_DEFINE_TYPE (GstUnalignedAudioParse, gst_unaligned_audio_parse, GST_TYPE_BIN);
static void
gst_unaligned_audio_parse_class_init (GstUnalignedAudioParseClass * klass)
{
@ -88,7 +79,6 @@ gst_unaligned_audio_parse_class_init (GstUnalignedAudioParseClass * klass)
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_unaligned_audio_parse_init (GstUnalignedAudioParse * unaligned_audio_parse)
{

View file

@ -26,24 +26,20 @@
#include "gstunalignedvideoparse.h"
#include "unalignedvideo.h"
GST_DEBUG_CATEGORY (unaligned_video_parse_debug);
#define GST_CAT_DEFAULT unaligned_video_parse_debug
struct _GstUnalignedVideoParse
{
GstBin parent;
GstElement *inner_parser;
};
struct _GstUnalignedVideoParseClass
{
GstBinClass parent_class;
};
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
@ -51,7 +47,6 @@ GST_STATIC_PAD_TEMPLATE ("sink",
GST_STATIC_CAPS (GST_UNALIGNED_RAW_VIDEO_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -59,12 +54,8 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE (GST_VIDEO_FORMATS_ALL))
);
G_DEFINE_TYPE (GstUnalignedVideoParse, gst_unaligned_video_parse, GST_TYPE_BIN);
static void
gst_unaligned_video_parse_class_init (GstUnalignedVideoParseClass * klass)
{
@ -87,7 +78,6 @@ gst_unaligned_video_parse_class_init (GstUnalignedVideoParseClass * klass)
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_unaligned_video_parse_init (GstUnalignedVideoParse * unaligned_video_parse)
{

View file

@ -40,14 +40,12 @@
#include "gstvideoparse.h"
#include "gstrawvideoparse.h"
static GstStaticPadTemplate static_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink",
GST_PAD_SINK,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
@ -55,7 +53,6 @@ GST_STATIC_PAD_TEMPLATE ("src",
GST_STATIC_CAPS ("video/x-raw")
);
static void gst_video_parse_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void gst_video_parse_get_property (GObject * object, guint prop_id,

View file

@ -50,7 +50,6 @@ struct _GstVideoParseClass
GstBinClass parent_class;
};
GType gst_video_parse_get_type (void);
#endif /* __GST_VIDEO_PARSE_H__ */