Commit 498ee680 authored by Sebastian Dröge's avatar Sebastian Dröge

Merge branch 'rawparse-moved-plugin'

parents f6f4ae19 4cde3555
plugin_LTLIBRARIES = libgstrawparse.la
libgstrawparse_la_SOURCES = \
gstunalignedaudioparse.c \
gstunalignedvideoparse.c \
gstaudioparse.c \
gstvideoparse.c \
gstrawbaseparse.c \
gstrawaudioparse.c \
gstrawvideoparse.c \
plugin.c
libgstrawparse_la_CFLAGS = \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_CFLAGS)
libgstrawparse_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-@GST_API_VERSION@ -lgstaudio-@GST_API_VERSION@ \
$(GST_BASE_LIBS) \
$(GST_LIBS)
libgstrawparse_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstrawparse_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
noinst_HEADERS = \
unalignedaudio.h \
unalignedvideo.h \
gstunalignedaudioparse.h \
gstunalignedvideoparse.h \
gstaudioparse.h \
gstvideoparse.h \
gstrawbaseparse.h \
gstrawaudioparse.h \
gstrawvideoparse.h
This diff is collapsed.
/* GStreamer
* Copyright (C) <2016> Carlos Rafael Giani <dv at pseudoterminal dot org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_RAW_AUDIO_PARSE_H__
#define __GST_RAW_AUDIO_PARSE_H__
#include <gst/gst.h>
#include <gst/audio/audio.h>
#include "gstrawbaseparse.h"
G_BEGIN_DECLS
#define GST_TYPE_RAW_AUDIO_PARSE \
(gst_raw_audio_parse_get_type())
#define GST_RAW_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RAW_AUDIO_PARSE, GstRawAudioParse))
#define GST_RAW_AUDIO_PARSE_CAST(obj) \
((GstRawAudioParse *)(obj))
#define GST_RAW_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RAW_AUDIO_PARSE, GstRawAudioParseClass))
#define GST_IS_RAW_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RAW_AUDIO_PARSE))
#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,
GST_RAW_AUDIO_PARSE_FORMAT_MULAW,
GST_RAW_AUDIO_PARSE_FORMAT_ALAW
};
/* Contains information about the sample rate, format, and channel count to use. */
struct _GstRawAudioParseConfig
{
/* If TRUE, then this configuration is ready to use */
gboolean ready;
/* Format of the configuration. Can be PCM, a-law, mu-law. */
GstRawAudioParseFormat format;
/* If format is set to PCM, this specifies the exact PCM format in use.
* Meaningless if format is set to anything other than PCM. */
GstAudioFormat pcm_format;
/* Bytes per frame. Calculated as: bpf = bytes_per_sample * num_channels
* Must be nonzero. This is the size of one frame, the value returned
* by the GstRawBaseParseClass get_config_frame_size() vfunc. */
guint bpf;
/* Sample rate in Hz - must be nonzero */
guint sample_rate;
/* Number of channels - must be nonzero */
guint num_channels;
/* TRUE if the data is interleaved, FALSE otherwise */
gboolean interleaved;
/* Array of channel positions, one position per channel; its first
* num_channels values are valid. They are computed out of the number
* of channels if no positions are explicitely given. */
GstAudioChannelPosition channel_positions[64];
/* If the channel_positions are in a valid GStreamer channel order, then
* this is not used, and needs_channel_reordering is FALSE. Otherwise,
* this contains the same positions as in channel_positions, but in the
* order GStreamer expects. needs_channel_reordering will be TRUE in that
* case. This is used for reordering samples in outgoing buffers if
* necessary. */
GstAudioChannelPosition reordered_channel_positions[64];
/* TRUE if channel reordering is necessary, FALSE otherwise. See above
* for details. */
gboolean needs_channel_reordering;
};
struct _GstRawAudioParse
{
GstRawBaseParse parent;
/*< private > */
/* Configuration controlled by the object properties. Its ready value
* is set to TRUE from the start, so it can be used right away.
*/
GstRawAudioParseConfig properties_config;
/* Configuration controlled by the sink caps. Its ready value is
* initially set to FALSE until valid sink caps come in. It is set to
* FALSE again when the stream-start event is observed.
*/
GstRawAudioParseConfig sink_caps_config;
/* Currently active configuration. Points either to properties_config
* or to sink_caps_config. This is never NULL. */
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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* GStreamer
* Copyright (C) <2016> Carlos Rafael Giani <dv at pseudoterminal dot org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_RAW_VIDEO_PARSE_H__
#define __GST_RAW_VIDEO_PARSE_H__
#include <gst/gst.h>
#include <gst/video/video.h>
#include "gstrawbaseparse.h"
G_BEGIN_DECLS
#define GST_TYPE_RAW_VIDEO_PARSE \
(gst_raw_video_parse_get_type())
#define GST_RAW_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_RAW_VIDEO_PARSE, GstRawVideoParse))
#define GST_RAW_VIDEO_PARSE_CAST(obj) \
((GstRawVideoParse *)(obj))
#define GST_RAW_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_RAW_VIDEO_PARSE, GstRawVideoParseClass))
#define GST_IS_RAW_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_RAW_VIDEO_PARSE))
#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
{
/* If TRUE, then this configuration is ready to use */
gboolean ready;
/* FIXME: These values should not be necessary, since there's
* GstVideoInfo. However, setting these values in the video
* info independently is currently difficult. For example,
* setting the video format requires the gst_video_info_set_format()
* function, but this function also overwrites plane strides
* and offsets. */
gint width, height;
GstVideoFormat format;
gint pixel_aspect_ratio_n, pixel_aspect_ratio_d;
gint framerate_n, framerate_d;
gboolean interlaced;
gsize plane_offsets[GST_VIDEO_MAX_PLANES];
gint plane_strides[GST_VIDEO_MAX_PLANES];
/* If TRUE, then TFF flags are added to outgoing buffers and
* their video metadata */
gboolean top_field_first;
/* Distance between the start of each frame, in bytes. If this value
* is larger than the actual size of a frame, then the extra bytes
* are skipped. For example, with frames that have 115200 bytes, a
* frame_stride value of 120000 means that 4800 trailing bytes are
* skipped after the 115200 frame bytes. This is useful to skip
* metadata in between frames. */
guint frame_stride;
GstVideoInfo info;
gboolean custom_plane_strides;
};
struct _GstRawVideoParse
{
GstRawBaseParse parent;
/*< private > */
/* Configuration controlled by the object properties. Its ready value
* is set to TRUE from the start, so it can be used right away.
*/
GstRawVideoParseConfig properties_config;
/* Configuration controlled by the sink caps. Its ready value is
* initially set to FALSE until valid sink caps come in. It is set to
* FALSE again when the stream-start event is observed.
*/
GstRawVideoParseConfig sink_caps_config;
/* Currently active configuration. Points either to properties_config
* or to sink_caps_config. This is never NULL. */
GstRawVideoParseConfig *current_config;
};
struct _GstRawVideoParseClass
{
GstRawBaseParseClass parent_class;
};
GType gst_raw_video_parse_get_type (void);
G_END_DECLS
#endif
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* gstunalignedaudioparse.c:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <string.h>
#include <stdio.h>
#include <gst/gst.h>
#include <gst/audio/audio.h>
#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,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_UNALIGNED_RAW_AUDIO_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_AUDIO_CAPS_MAKE (GST_AUDIO_FORMATS_ALL)
", 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)
{
GstElementClass *element_class;
GST_DEBUG_CATEGORY_INIT (unaligned_audio_parse_debug, "unalignedaudioparse",
0, "Unaligned raw audio parser");
element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_src_template));
gst_element_class_set_static_metadata (element_class,
"unalignedaudioparse",
"Codec/Parser/Bin/Audio",
"Parse unaligned raw audio data",
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_unaligned_audio_parse_init (GstUnalignedAudioParse * unaligned_audio_parse)
{
GstPad *inner_pad;
GstPad *ghostpad;
unaligned_audio_parse->inner_parser =
gst_element_factory_make ("rawaudioparse", "inner_parser");
g_assert (unaligned_audio_parse->inner_parser != NULL);
g_object_set (G_OBJECT (unaligned_audio_parse->inner_parser),
"use-sink-caps", TRUE, NULL);
gst_bin_add (GST_BIN (unaligned_audio_parse),
unaligned_audio_parse->inner_parser);
inner_pad =
gst_element_get_static_pad (unaligned_audio_parse->inner_parser, "sink");
ghostpad =
gst_ghost_pad_new_from_template ("sink", inner_pad,
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS
(unaligned_audio_parse), "sink"));
gst_element_add_pad (GST_ELEMENT (unaligned_audio_parse), ghostpad);
gst_object_unref (GST_OBJECT (inner_pad));
inner_pad = gst_element_get_static_pad (unaligned_audio_parse->inner_parser,
"src");
ghostpad =
gst_ghost_pad_new_from_template ("src", inner_pad,
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS
(unaligned_audio_parse), "src"));
gst_element_add_pad (GST_ELEMENT (unaligned_audio_parse), ghostpad);
gst_object_unref (GST_OBJECT (inner_pad));
}
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* gstunalignedaudioparse.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_UNALIGNED_AUDIO_PARSE_H___
#define __GST_UNALIGNED_AUDIO_PARSE_H___
#include <gst/gst.h>
G_BEGIN_DECLS
#define GST_TYPE_UNALIGNED_AUDIO_PARSE \
(gst_unaligned_audio_parse_get_type())
#define GST_UNALIGNED_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_UNALIGNED_AUDIO_PARSE, GstUnalignedAudioParse))
#define GST_UNALIGNED_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_UNALIGNED_AUDIO_PARSE, GstUnalignedAudioParseClass))
#define GST_UNALIGNED_AUDIO_PARSE_CAST(obj) \
((GstUnalignedAudioParse *)(obj))
#define GST_IS_UNALIGNED_AUDIO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_UNALIGNED_AUDIO_PARSE))
#define GST_IS_UNALIGNED_AUDIO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_UNALIGNED_AUDIO_PARSE))
typedef struct _GstUnalignedAudioParse GstUnalignedAudioParse;
typedef struct _GstUnalignedAudioParseClass GstUnalignedAudioParseClass;
GType gst_unaligned_audio_parse_get_type (void);
G_END_DECLS
#endif /* __GST_UNALIGNED_AUDIO_PARSE_H___ */
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* gstunalignedvideoparse.c:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <string.h>
#include <stdio.h>
#include <gst/gst.h>
#include <gst/video/video.h>
#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,
GST_PAD_ALWAYS,
GST_STATIC_CAPS (GST_UNALIGNED_RAW_VIDEO_CAPS)
);
static GstStaticPadTemplate static_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
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)
{
GstElementClass *element_class;
GST_DEBUG_CATEGORY_INIT (unaligned_video_parse_debug, "unalignedvideoparse",
0, "Unaligned raw video parser");
element_class = GST_ELEMENT_CLASS (klass);
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_sink_template));
gst_element_class_add_pad_template (element_class,
gst_static_pad_template_get (&static_src_template));
gst_element_class_set_static_metadata (element_class,
"unalignedvideoparse",
"Codec/Parser/Bin/Video",
"Parse unaligned raw video data",
"Carlos Rafael Giani <dv@pseudoterminal.org>");
}
static void
gst_unaligned_video_parse_init (GstUnalignedVideoParse * unaligned_video_parse)
{
GstPad *inner_pad;
GstPad *ghostpad;
unaligned_video_parse->inner_parser =
gst_element_factory_make ("rawvideoparse", "inner_parser");
g_assert (unaligned_video_parse->inner_parser != NULL);
g_object_set (G_OBJECT (unaligned_video_parse->inner_parser),
"use-sink-caps", TRUE, NULL);
gst_bin_add (GST_BIN (unaligned_video_parse),
unaligned_video_parse->inner_parser);
inner_pad =
gst_element_get_static_pad (unaligned_video_parse->inner_parser, "sink");
ghostpad =
gst_ghost_pad_new_from_template ("sink", inner_pad,
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS
(unaligned_video_parse), "sink"));
gst_element_add_pad (GST_ELEMENT (unaligned_video_parse), ghostpad);
gst_object_unref (GST_OBJECT (inner_pad));
inner_pad = gst_element_get_static_pad (unaligned_video_parse->inner_parser,
"src");
ghostpad =
gst_ghost_pad_new_from_template ("src", inner_pad,
gst_element_class_get_pad_template (GST_ELEMENT_GET_CLASS
(unaligned_video_parse), "src"));
gst_element_add_pad (GST_ELEMENT (unaligned_video_parse), ghostpad);
gst_object_unref (GST_OBJECT (inner_pad));
}
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* gstunalignedvideoparse.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_UNALIGNED_VIDEO_PARSE_H___
#define __GST_UNALIGNED_VIDEO_PARSE_H___
#include <gst/gst.h>
G_BEGIN_DECLS
#define GST_TYPE_UNALIGNED_VIDEO_PARSE \
(gst_unaligned_video_parse_get_type())
#define GST_UNALIGNED_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_CAST((obj), GST_TYPE_UNALIGNED_VIDEO_PARSE, GstUnalignedVideoParse))
#define GST_UNALIGNED_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST((klass), GST_TYPE_UNALIGNED_VIDEO_PARSE, GstUnalignedVideoParseClass))
#define GST_UNALIGNED_VIDEO_PARSE_CAST(obj) \
((GstUnalignedVideoParse *)(obj))
#define GST_IS_UNALIGNED_VIDEO_PARSE(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE((obj), GST_TYPE_UNALIGNED_VIDEO_PARSE))
#define GST_IS_UNALIGNED_VIDEO_PARSE_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE((klass), GST_TYPE_UNALIGNED_VIDEO_PARSE))
typedef struct _GstUnalignedVideoParse GstUnalignedVideoParse;
typedef struct _GstUnalignedVideoParseClass GstUnalignedVideoParseClass;
GType gst_unaligned_video_parse_get_type (void);
G_END_DECLS
#endif /* __GST_UNALIGNED_VIDEO_PARSE_H___ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gst/gst.h>
#include "gstrawaudioparse.h"
#include "gstrawvideoparse.h"
#include "gstunalignedaudioparse.h"
#include "gstunalignedvideoparse.h"
#include "gstaudioparse.h"
#include "gstvideoparse.h"
static gboolean
plugin_init (GstPlugin * plugin)
{
gboolean ret;
ret = gst_element_register (plugin, "videoparse", GST_RANK_NONE,
gst_video_parse_get_type ());
ret &= gst_element_register (plugin, "audioparse", GST_RANK_NONE,
gst_audio_parse_get_type ());
ret &= gst_element_register (plugin, "unalignedaudioparse", GST_RANK_MARGINAL,
gst_unaligned_audio_parse_get_type ());
ret &= gst_element_register (plugin, "unalignedvideoparse", GST_RANK_MARGINAL,
gst_unaligned_video_parse_get_type ());
ret &= gst_element_register (plugin, "rawaudioparse", GST_RANK_NONE,
gst_raw_audio_parse_get_type ());
ret &= gst_element_register (plugin, "rawvideoparse", GST_RANK_NONE,
gst_raw_video_parse_get_type ());
return ret;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
rawparse,
"Parses byte streams into raw frames",
plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* unalignedaudio.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_UNALIGNED_AUDIO_H__
#define __GST_UNALIGNED_AUDIO_H__
#include <gst/gst.h>
#include <gst/audio/audio.h>
#define GST_UNALIGNED_RAW_AUDIO_CAPS \
"audio/x-unaligned-raw" \
", format = (string) " GST_AUDIO_FORMATS_ALL \
", rate = (int) [ 1, MAX ]" \
", channels = (int) [ 1, MAX ]" \
", layout = (string) { interleaved, non-interleaved }"
#endif /* __GST_UNALIGNED_AUDIO_H__ */
/* GStreamer
* Copyright (C) 2016 Carlos Rafael Giani <dv@pseudoterminal.org>
*
* unalignedvideo.h:
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __GST_UNALIGNED_VIDEO_H__
#define __GST_UNALIGNED_VIDEO_H__
#include <gst/gst.h>
#include <gst/video/video.h>
#define GST_UNALIGNED_RAW_VIDEO_CAPS \
"video/x-unaligned-raw" \
", format = (string) " GST_VIDEO_FORMATS_ALL \
", width = " GST_VIDEO_SIZE_RANGE \
", height = " GST_VIDEO_SIZE_RANGE \
", framerate = " GST_VIDEO_FPS_RANGE
#endif /* __GST_UNALIGNED_VIDEO_H__ */
This diff is collapsed.
This diff is collapsed.
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