ext/ffmpeg/: Fix category.

Original commit message from CVS:
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_base_init):
Fix category.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_class_init),
(gst_ffmpegdemux_init), (gst_ffmpegdemux_close):
Slightly rewrite the init function, old one was ugly. Also remove
dispose function since it's obsolete, the change_state function
cleans up already. Also fixes segfault in test-app
gstreamer/tests/instantiate/create
This commit is contained in:
Ronald S. Bultje 2004-03-25 05:14:10 +00:00
parent c9305d90a3
commit d5cfdabbd8
4 changed files with 22 additions and 15 deletions

View file

@ -1,3 +1,15 @@
2004-03-25 Ronald Bultje <rbultje@ronald.bitfreak.net>
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_base_init):
* ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_base_init):
Fix category.
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_class_init),
(gst_ffmpegdemux_init), (gst_ffmpegdemux_close):
Slightly rewrite the init function, old one was ugly. Also remove
dispose function since it's obsolete, the change_state function
cleans up already. Also fixes segfault in test-app
gstreamer/tests/instantiate/create
2004-03-24 Benjamin Otte <otte@gnome.org>
* configure.ac:

View file

@ -132,7 +132,7 @@ gst_ffmpegdec_base_init (GstFFMpegDecClass *klass)
/* construct the element details struct */
details.longname = g_strdup_printf("FFMPEG %s decoder",
params->in_plugin->name);
details.klass = g_strdup_printf("Codec/Decoder/%s",
details.klass = g_strdup_printf("Codec/%s/Decoder",
(params->in_plugin->type == CODEC_TYPE_VIDEO) ?
"Video" : "Audio");
details.description = g_strdup_printf("FFMPEG %s decoder",

View file

@ -94,7 +94,6 @@ static GHashTable *global_plugins;
static void gst_ffmpegdemux_class_init (GstFFMpegDemuxClass *klass);
static void gst_ffmpegdemux_base_init (GstFFMpegDemuxClass *klass);
static void gst_ffmpegdemux_init (GstFFMpegDemux *demux);
static void gst_ffmpegdemux_dispose (GObject *object);
static void gst_ffmpegdemux_loop (GstElement *element);
@ -202,13 +201,13 @@ gst_ffmpegdemux_class_init (GstFFMpegDemuxClass *klass)
parent_class = g_type_class_ref(GST_TYPE_ELEMENT);
gstelement_class->change_state = gst_ffmpegdemux_change_state;
gobject_class->dispose = gst_ffmpegdemux_dispose;
}
static void
gst_ffmpegdemux_init (GstFFMpegDemux *demux)
{
GstFFMpegDemuxClass *oclass = (GstFFMpegDemuxClass *) (G_OBJECT_GET_CLASS (demux));
gint n;
demux->sinkpad = gst_pad_new_from_template (oclass->sinktempl,
"sink");
@ -217,10 +216,13 @@ gst_ffmpegdemux_init (GstFFMpegDemux *demux)
gst_ffmpegdemux_loop);
demux->opened = FALSE;
demux->context = NULL;
memset (demux->srcpads, 0, sizeof (demux->srcpads));
memset (demux->handled, FALSE, sizeof (demux->handled));
memset (demux->last_ts, 0, sizeof (demux->last_ts));
for (n = 0; n < MAX_STREAMS; n++) {
demux->srcpads[n] = NULL;
demux->handled[n] = FALSE;
demux->last_ts[n] = 0;
}
demux->videopads = 0;
demux->audiopads = 0;
}
@ -247,18 +249,11 @@ gst_ffmpegdemux_close (GstFFMpegDemux *demux)
/* close demuxer context from ffmpeg */
av_close_input_file (demux->context);
demux->context = NULL;
demux->opened = FALSE;
}
static void
gst_ffmpegdemux_dispose (GObject *object)
{
GstFFMpegDemux *demux = (GstFFMpegDemux *) demux;
gst_ffmpegdemux_close (demux);
}
static AVStream *
gst_ffmpegdemux_stream_from_pad (GstPad *pad)
{

View file

@ -166,7 +166,7 @@ gst_ffmpegenc_base_init (GstFFMpegEncClass *klass)
/* construct the element details struct */
details.longname = g_strdup_printf("FFMPEG %s encoder",
params->in_plugin->name);
details.klass = g_strdup_printf("Codec/Encoder/%s",
details.klass = g_strdup_printf("Codec/%s/Encoder",
(params->in_plugin->type == CODEC_TYPE_VIDEO) ?
"Video" : "Audio");
details.description = g_strdup_printf("FFMPEG %s encoder",