mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 05:45:58 +00:00
ext/ffmpeg/gstffmpeg.c: Remove redundant calls which are called internally already.
Original commit message from CVS: * ext/ffmpeg/gstffmpeg.c: (plugin_init): Remove redundant calls which are called internally already. * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid): Indenting... * ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop), (gst_ffmpegdemux_register): Remove typefind functions and rank for demuxers for any demuxer that we already have in GStreamer.
This commit is contained in:
parent
bf808bd484
commit
bc0e141ee7
5 changed files with 30 additions and 9 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2004-06-06 Ronald Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* ext/ffmpeg/gstffmpeg.c: (plugin_init):
|
||||
Remove redundant calls which are called internally already.
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid):
|
||||
Indenting...
|
||||
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop),
|
||||
(gst_ffmpegdemux_register):
|
||||
Remove typefind functions and rank for demuxers for any demuxer
|
||||
that we already have in GStreamer.
|
||||
|
||||
2004-05-18 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_caps_with_codecid):
|
||||
|
|
2
common
2
common
|
@ -1 +1 @@
|
|||
Subproject commit 5f51018de093a26d447de03e1ec6dd0377fc4c77
|
||||
Subproject commit cf0828313f7cea4d5840c0959e9113f13309a56f
|
|
@ -47,8 +47,6 @@ plugin_init (GstPlugin * plugin)
|
|||
if (!gst_library_load ("gstbytestream"))
|
||||
return FALSE;
|
||||
|
||||
avcodec_init ();
|
||||
avcodec_register_all ();
|
||||
av_register_all ();
|
||||
|
||||
gst_ffmpegenc_register (plugin);
|
||||
|
|
|
@ -1151,8 +1151,7 @@ gst_ffmpeg_caps_with_codecid (enum CodecID codec_id,
|
|||
|
||||
if ((value = gst_structure_get_value (str, "codec_data"))) {
|
||||
buf = g_value_get_boxed (value);
|
||||
if (GST_BUFFER_SIZE (buf) != 0)
|
||||
{
|
||||
if (GST_BUFFER_SIZE (buf) != 0) {
|
||||
context->extradata = av_mallocz (GST_BUFFER_SIZE (buf));
|
||||
memcpy (context->extradata, GST_BUFFER_DATA (buf),
|
||||
GST_BUFFER_SIZE (buf));
|
||||
|
|
|
@ -596,7 +596,6 @@ gst_ffmpegdemux_loop (GstElement * element)
|
|||
GST_EVENT_TYPE (GST_EVENT (data)) != GST_EVENT_EOS) {
|
||||
gst_data_unref (data);
|
||||
data = NULL;
|
||||
continue;
|
||||
}
|
||||
} while (!data);
|
||||
|
||||
|
@ -683,6 +682,7 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
|||
gchar *type_name, *typefind_name;
|
||||
gchar *p, *name = NULL;
|
||||
GstCaps *sinkcaps, *audiosrccaps, *videosrccaps;
|
||||
gint rank = GST_RANK_MARGINAL;
|
||||
|
||||
/* no emulators */
|
||||
if (!strncmp (in_plugin->long_name, "raw ", 4) ||
|
||||
|
@ -693,6 +693,18 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
|||
!strcmp (in_plugin->name, "mjpeg"))
|
||||
goto next;
|
||||
|
||||
if (!strcmp (in_plugin->name, "mov,mp4,m4a,3gp") ||
|
||||
!strcmp (in_plugin->name, "avi") ||
|
||||
!strcmp (in_plugin->name, "asf") ||
|
||||
!strcmp (in_plugin->name, "mpegvideo") ||
|
||||
!strcmp (in_plugin->name, "mp3") ||
|
||||
!strcmp (in_plugin->name, "matroska") ||
|
||||
!strcmp (in_plugin->name, "mpeg") ||
|
||||
!strcmp (in_plugin->name, "wav") ||
|
||||
!strcmp (in_plugin->name, "au") ||
|
||||
!strcmp (in_plugin->name, "rm"))
|
||||
rank = GST_RANK_NONE;
|
||||
|
||||
p = name = g_strdup (in_plugin->name);
|
||||
while (*p) {
|
||||
if (*p == '.' || *p == ',')
|
||||
|
@ -763,9 +775,10 @@ gst_ffmpegdemux_register (GstPlugin * plugin)
|
|||
else
|
||||
extensions = NULL;
|
||||
|
||||
if (!gst_element_register (plugin, type_name, GST_RANK_MARGINAL, type) ||
|
||||
!gst_type_find_register (plugin, typefind_name, GST_RANK_MARGINAL,
|
||||
gst_ffmpegdemux_type_find, extensions, sinkcaps, params)) {
|
||||
if (!gst_element_register (plugin, type_name, rank, type) ||
|
||||
(rank != GST_RANK_NONE &&
|
||||
!gst_type_find_register (plugin, typefind_name, rank,
|
||||
gst_ffmpegdemux_type_find, extensions, sinkcaps, params))) {
|
||||
g_warning ("Register of type ffdemux_%s failed", name);
|
||||
g_free (type_name);
|
||||
g_free (typefind_name);
|
||||
|
|
Loading…
Reference in a new issue