mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
... almost done now
Original commit message from CVS: ... almost done now
This commit is contained in:
parent
7d62325204
commit
26f632e630
3 changed files with 39 additions and 35 deletions
|
@ -21,37 +21,27 @@
|
|||
#include <gstrtjpegenc.h>
|
||||
#include <gstrtjpegdec.h>
|
||||
|
||||
/* elementfactory information */
|
||||
extern GstElementDetails gst_rtjpegenc_details;
|
||||
extern GstElementDetails gst_rtjpegdec_details;
|
||||
|
||||
static gboolean
|
||||
plugin_init (GModule *module, GstPlugin *plugin)
|
||||
plugin_init (GstPlugin *plugin)
|
||||
{
|
||||
GstElementFactory *enc, *dec;
|
||||
|
||||
gst_plugin_set_longname(plugin,"Justin Schoeman's RTjpeg codec and \
|
||||
conversion utilities");
|
||||
|
||||
/* create an elementfactory for the rtjpegenc element */
|
||||
enc = gst_element_factory_new("rtjpegenc",GST_TYPE_RTJPEGENC,
|
||||
&gst_rtjpegenc_details);
|
||||
g_return_val_if_fail(enc != NULL, FALSE);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (enc));
|
||||
|
||||
/* create an elementfactory for the rtjpegdec element */
|
||||
dec = gst_element_factory_new("rtjpegdec",GST_TYPE_RTJPEGDEC,
|
||||
&gst_rtjpegdec_details);
|
||||
g_return_val_if_fail(dec != NULL, FALSE);
|
||||
gst_element_factory_set_rank (dec, GST_ELEMENT_RANK_PRIMARY);
|
||||
gst_plugin_add_feature (plugin, GST_PLUGIN_FEATURE (dec));
|
||||
if (!gst_element_register (plugin, "rtjpegenc",
|
||||
GST_RANK_NONE, GST_TYPE_RTJPEGENC) ||
|
||||
!gst_element_register (plugin, "rtjpegdec",
|
||||
GST_RANK_NONE, GST_TYPE_RTJPEGDEC))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GstPluginDesc plugin_desc = {
|
||||
GST_PLUGIN_DEFINE (
|
||||
GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
"rtjpeg",
|
||||
plugin_init
|
||||
};
|
||||
"Justin Schoeman's RTjpeg codec",
|
||||
plugin_init,
|
||||
VERSION,
|
||||
"GPL",
|
||||
"(c) 2000 Justin Schoeman <justin@suntiger.ee.up.ac.za>",
|
||||
GST_PACKAGE,
|
||||
GST_ORIGIN
|
||||
)
|
||||
|
|
|
@ -29,11 +29,8 @@
|
|||
GstElementDetails gst_rtjpegdec_details = {
|
||||
"RTjpeg decoder",
|
||||
"Codec/Video/Decoder",
|
||||
"GPL",
|
||||
"Decodes video in RTjpeg format",
|
||||
VERSION,
|
||||
"Erik Walthinsen <omega@cse.ogi.edu>",
|
||||
"(C) 1999",
|
||||
"Erik Walthinsen <omega@cse.ogi.edu>"
|
||||
};
|
||||
|
||||
/* GstRTJpegDec signals and args */
|
||||
|
@ -49,6 +46,7 @@ enum {
|
|||
|
||||
|
||||
static void gst_rtjpegdec_class_init (GstRTJpegDecClass *klass);
|
||||
static void gst_rtjpegdec_base_init (GstRTJpegDecClass *klass);
|
||||
static void gst_rtjpegdec_init (GstRTJpegDec *rtjpegdec);
|
||||
|
||||
static void gst_rtjpegdec_chain (GstPad *pad, GstData *_data);
|
||||
|
@ -63,7 +61,8 @@ gst_rtjpegdec_get_type (void)
|
|||
|
||||
if (!rtjpegdec_type) {
|
||||
static const GTypeInfo rtjpegdec_info = {
|
||||
sizeof(GstRTJpegDecClass), NULL,
|
||||
sizeof(GstRTJpegDecClass),
|
||||
(GBaseInitFunc)gst_rtjpegdec_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_rtjpegdec_class_init,
|
||||
NULL,
|
||||
|
@ -77,6 +76,14 @@ gst_rtjpegdec_get_type (void)
|
|||
return rtjpegdec_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtjpegdec_base_init (GstRTJpegDecClass *klass)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_set_details (element_class, &gst_rtjpegdec_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtjpegdec_class_init (GstRTJpegDecClass *klass)
|
||||
{
|
||||
|
|
|
@ -27,11 +27,8 @@
|
|||
GstElementDetails gst_rtjpegenc_details = {
|
||||
"RTjpeg encoder",
|
||||
"Codec/Video/Encoder",
|
||||
"GPL",
|
||||
"Encodes video in RTjpeg format",
|
||||
VERSION,
|
||||
"Erik Walthinsen <omega@cse.ogi.edu>",
|
||||
"(C) 1999",
|
||||
"Erik Walthinsen <omega@cse.ogi.edu>"
|
||||
};
|
||||
|
||||
/* GstRTJpegEnc signals and args */
|
||||
|
@ -47,6 +44,7 @@ enum {
|
|||
|
||||
|
||||
static void gst_rtjpegenc_class_init (GstRTJpegEncClass *klass);
|
||||
static void gst_rtjpegenc_base_init (GstRTJpegEncClass *klass);
|
||||
static void gst_rtjpegenc_init (GstRTJpegEnc *rtjpegenc);
|
||||
|
||||
static void gst_rtjpegenc_chain (GstPad *pad, GstData *_data);
|
||||
|
@ -61,7 +59,8 @@ gst_rtjpegenc_get_type (void)
|
|||
|
||||
if (!rtjpegenc_type) {
|
||||
static const GTypeInfo rtjpegenc_info = {
|
||||
sizeof(GstRTJpegEncClass), NULL,
|
||||
sizeof(GstRTJpegEncClass),
|
||||
(GBaseInitFunc)gst_rtjpegenc_base_init,
|
||||
NULL,
|
||||
(GClassInitFunc)gst_rtjpegenc_class_init,
|
||||
NULL,
|
||||
|
@ -75,6 +74,14 @@ gst_rtjpegenc_get_type (void)
|
|||
return rtjpegenc_type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtjpegenc_base_init (GstRTJpegEncClass *klass)
|
||||
{
|
||||
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
|
||||
|
||||
gst_element_class_set_details (element_class, &gst_rtjpegenc_details);
|
||||
}
|
||||
|
||||
static void
|
||||
gst_rtjpegenc_class_init (GstRTJpegEncClass *klass)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue