2005-04-21 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+ * ext/ffmpeg/gstffmpegcodecmap.c: (gst_ffmpeg_codecid_to_caps),
+ (gst_ffmpeg_caps_with_codecid), (gst_ffmpeg_caps_to_codecid),
+ (gst_ffmpeg_get_codecid_longname):
+ Add ALAC, shorten and some more in new FFMPEG snapshot of
+ 21/4, somewhere this afternoon.
+ * ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_register):
+ * ext/ffmpeg/gstffmpegenc.c: (gst_ffmpegenc_register):
+ Add warnings to decoder registration to easier add new ones
+ during snapshot updates.
+
+2005-04-21 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
+
* ext/ffmpeg/gstffmpegcodecmap.c:
(gst_ffmpeg_formatid_get_codecids):
Enable MPEG muxer.
"indeoversion", G_TYPE_INT, 3, NULL);
break;
+ case CODEC_ID_INDEO2:
+ caps = GST_FF_VID_CAPS_NEW ("video/x-indeo",
+ "indeoversion", G_TYPE_INT, 2, NULL);
+ break;
+
case CODEC_ID_VP3:
caps = GST_FF_VID_CAPS_NEW ("video/x-vp3", NULL);
break;
"msvideoversion", G_TYPE_INT, 1, NULL);
break;
+ case CODEC_ID_WMV3:
+ case CODEC_ID_VC9:
+ caps = GST_FF_VID_CAPS_NEW ("video/x-wmv",
+ "wmvversion", G_TYPE_INT, 3, NULL);
+ break;
+
case CODEC_ID_WS_VQA:
case CODEC_ID_IDCIN:
case CODEC_ID_8BPS:
case CODEC_ID_PGMYUV:
case CODEC_ID_PAM:
case CODEC_ID_FFVHUFF:
+ case CODEC_ID_LOCO:
+ case CODEC_ID_WNV1:
+ case CODEC_ID_AASC:
+ case CODEC_ID_MP3ADU:
+ case CODEC_ID_MP3ON4:
+ case CODEC_ID_WESTWOOD_SND1:
buildcaps = TRUE;
break;
case CODEC_ID_ADPCM_EA:
case CODEC_ID_ADPCM_G726:
case CODEC_ID_ADPCM_CT:
+ case CODEC_ID_ADPCM_SWF:
do {
gchar *layout = NULL;
case CODEC_ID_ADPCM_CT:
layout = "ct";
break;
+ case CODEC_ID_ADPCM_SWF:
+ layout = "swf";
+ break;
default:
g_assert (0); /* don't worry, we never get here */
break;
} while (0);
break;
+ case CODEC_ID_SHORTEN:
+ caps = gst_caps_new_simple ("audio/x-shorten", NULL);
+ break;
+
+ case CODEC_ID_ALAC:
+ caps = GST_FF_AUD_CAPS_NEW ("audio/x-alac", NULL);
+ if (context) {
+ gst_caps_set_simple (caps,
+ "samplesize", G_TYPE_INT, context->bits_per_sample, NULL);
+ }
+ break;
+
case CODEC_ID_FLAC:
/* Note that ffmpeg has no encoder yet, but just for safety. In the
* encoder case, we want to add things like samplerate, channels... */
} while (0);
break;
+ case CODEC_ID_ALAC:
+ gst_structure_get_int (str, "samplesize", &context->bits_per_sample);
+ break;
+
default:
break;
}
case 2:
id = CODEC_ID_WMV2;
break;
+ case 3:
+ id = CODEC_ID_WMV3;
+ break;
}
}
if (id != CODEC_ID_NONE)
} else if (!strcmp (mimetype, "video/x-indeo")) {
gint indeoversion = 0;
- if (gst_structure_get_int (structure, "indeoversion", &indeoversion) &&
- indeoversion == 3) {
- id = CODEC_ID_INDEO3;
- video = TRUE;
+ if (gst_structure_get_int (structure, "indeoversion", &indeoversion)) {
+ switch (indeoversion) {
+ case 3:
+ id = CODEC_ID_INDEO3;
+ break;
+ case 2:
+ id = CODEC_ID_INDEO2;
+ break;
+ }
+ if (id != CODEC_ID_NONE)
+ video = TRUE;
}
} else if (!strcmp (mimetype, "video/x-divx")) {
gint divxversion = 0;
id = CODEC_ID_ADPCM_G726;
} else if (!strcmp (layout, "ct")) {
id = CODEC_ID_ADPCM_CT;
+ } else if (!strcmp (layout, "swf")) {
+ id = CODEC_ID_ADPCM_SWF;
}
if (id != CODEC_ID_NONE)
audio = TRUE;
} else if (!strcmp (mimetype, "audio/x-flac")) {
id = CODEC_ID_FLAC;
audio = TRUE;
+ } else if (!strcmp (mimetype, "audio/x-shorten")) {
+ id = CODEC_ID_SHORTEN;
+ audio = TRUE;
+ } else if (!strcmp (mimetype, "audio/x-alac")) {
+ id = CODEC_ID_ALAC;
+ audio = TRUE;
} else if (!strcmp (mimetype, "video/x-cinepak")) {
id = CODEC_ID_CINEPAK;
video = TRUE;
case CODEC_ID_WMV2:
name = "Windows Media Video v8";
break;
+ case CODEC_ID_WMV3:
+ name = "Windows Media Video v9";
+ break;
+ case CODEC_ID_VC9:
+ name = "Microsoft Video Codec v1";
+ break;
case CODEC_ID_H263P:
name = "H.263 (P) video";
break;
case CODEC_ID_INDEO3:
name = "Indeo-3 video";
break;
+ case CODEC_ID_INDEO2:
+ name = "Indeo=2 video";
+ break;
case CODEC_ID_VP3:
name = "VP3 video";
break;
case CODEC_ID_FFVHUFF:
name = "FFMPEG non-compliant Huffyuv video";
break;
+ case CODEC_ID_LOCO:
+ name = "LOCO video";
+ break;
+ case CODEC_ID_WNV1:
+ name = "Winnov video 1";
+ break;
+ case CODEC_ID_AASC:
+ name = "Autodesk RLE video";
+ break;
+ case CODEC_ID_MP3ADU:
+ name = "ADU-formatted MPEG-1 layer 3 audio";
+ break;
+ case CODEC_ID_MP3ON4:
+ name = "MP3ON4";
+ break;
+ case CODEC_ID_WESTWOOD_SND1:
+ name = "Westwood Sound-1";
+ break;
case CODEC_ID_PCM_MULAW:
name = "Mu-law audio";
break;
case CODEC_ID_ADPCM_CT:
name = "CT ADPCM";
break;
+ case CODEC_ID_ADPCM_SWF:
+ name = "Shockwave ADPCM";
+ break;
case CODEC_ID_RA_144:
name = "Realaudio 14k4bps";
break;
case CODEC_ID_FLAC:
name = "FLAC lossless audio";
break;
+ case CODEC_ID_SHORTEN:
+ name = "Shorten lossless audio";
+ break;
+ case CODEC_ID_ALAC:
+ name = "Apple lossless audio";
+ break;
default:
GST_WARNING ("Unknown codecID 0x%x", codec_id);
break;
}
/* name */
- if (!gst_ffmpeg_get_codecid_longname (in_plugin->id))
+ if (!gst_ffmpeg_get_codecid_longname (in_plugin->id)) {
+ g_warning ("Add decoder %s (%d) please",
+ in_plugin->name, in_plugin->id);
goto next;
+ }
/* first make sure we've got a supported type */
sinkcaps = gst_ffmpeg_codecid_to_caps (in_plugin->id, NULL, FALSE);
/* (Ronald) MPEG-4 gets a higher priority because it has been well-
* tested and by far outperforms divxdec/xviddec - so we prefer it.
* msmpeg4v3 same, as it outperforms divxdec for divx3 playback.
- * H263 has the same mimetype as H263I and since H263 works for the
- * few streams that I've tried (see, e.g., #155163), I'll use that
- * and use rank=none for H263I for now, until I know what the diff
- * is. */
+ * VC1/WMV3 are not working and thus unpreferred for now. */
switch (in_plugin->id) {
case CODEC_ID_MPEG4:
case CODEC_ID_MSMPEG4V3:
default:
rank = GST_RANK_MARGINAL;
break;
+ case CODEC_ID_WMV3:
+ case CODEC_ID_VC9:
/* what's that? */
case CODEC_ID_SP5X:
rank = GST_RANK_NONE;