summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-01-24 16:14:28 +0200
committerSebastian Dröge <sebastian@centricular.com>2020-01-24 16:14:28 +0200
commit63555e5cc72fcd411dfc157c174477634f02b492 (patch)
tree98c70a7d9a86db2fa8ed79eac3e095d57102f56e /ext
parent34b1eb117faa5cc2f13fe1782abd541f4594645c (diff)
downloadgst-libav-63555e5cc72fcd411dfc157c174477634f02b492.tar.gz
avcodecmap: Add some more comments about the assumptions in the ffmpeg code about H264/H265/AAC
Diffstat (limited to 'ext')
-rw-r--r--ext/libav/gstavcodecmap.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/libav/gstavcodecmap.c b/ext/libav/gstavcodecmap.c
index 442d333..3eec6a4 100644
--- a/ext/libav/gstavcodecmap.c
+++ b/ext/libav/gstavcodecmap.c
@@ -1300,6 +1300,9 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
gst_caps_set_value (caps, "stream-format", &arr);
g_value_unset (&arr);
} else if (context) {
+ /* FIXME: ffmpeg currently assumes AVC if there is extradata and
+ * byte-stream otherwise. See for example the MOV or MPEG-TS code.
+ * ffmpeg does not distinguish the different types of AVC. */
if (context->extradata_size > 0) {
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "avc",
NULL);
@@ -1329,8 +1332,10 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
gst_caps_set_value (caps, "stream-format", &arr);
g_value_unset (&arr);
} else if (context) {
+ /* FIXME: ffmpeg currently assumes HVC1 if there is extradata and
+ * byte-stream otherwise. See for example the MOV or MPEG-TS code.
+ * ffmpeg does not distinguish the different types: HVC1/HEV1/etc. */
if (context->extradata_size > 0) {
- /* FIXME: Assume hvc1 */
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "hvc1",
NULL);
} else {
@@ -1467,13 +1472,14 @@ gst_ffmpeg_codecid_to_caps (enum AVCodecID codec_id,
gst_caps_set_simple (caps, "mpegversion", G_TYPE_INT, 4,
"base-profile", G_TYPE_STRING, "lc", NULL);
+ /* FIXME: ffmpeg currently assumes raw if there is extradata and
+ * ADTS otherwise. See for example the FDK AAC encoder. */
if (context && context->extradata_size > 0) {
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "raw",
NULL);
gst_codec_utils_aac_caps_set_level_and_profile (caps,
context->extradata, context->extradata_size);
} else if (context) {
- /* FIXME: Assume adts */
gst_caps_set_simple (caps, "stream-format", G_TYPE_STRING, "adts",
NULL);
}