gstreamer/gst/rawparse/plugin.c
Carlos Rafael Giani b415d7b34f rawparse: Add unaligned raw audio parsing to audioparse and add new element
This helps in cases where raw audio data is being delivered, but the
buffers do not come in sample aligned sizes. The new unalignedaudioparse
bin can be autoplugged and configures an internal audioparse element to
align the data. audioparse itself gets support for audio/x-unaligned-raw
input caps; the output caps then contain the same information, except that
the name is changed to audio/x-raw (since audioparse aligns the data).
This ensures that souphttpsrc ! audioparse still works.

https://bugzilla.gnome.org/show_bug.cgi?id=689460
2016-05-15 13:19:48 +03:00

29 lines
774 B
C

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <gst/gst.h>
#include "gstunalignedaudioparse.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 ());
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);