diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2021-08-24 13:28:22 +0100 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-08-24 12:35:47 +0000 |
commit | 43f2fd8081b7d5e32660c3b3bf5455856f7c931f (patch) | |
tree | 392b9c69ff5758a2c8a9dafed80f1de761825103 | |
parent | f510d48ecfbc9d8160827c09514223db64e9a448 (diff) | |
download | gstreamer-plugins-good-43f2fd8081b7d5e32660c3b3bf5455856f7c931f.tar.gz |
qtdemux: add depth for ProRes 4:4:4:4 variants if available
Might be 24bpp in case an alpha channel is coded but
the image is always opaque.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/1061>
-rw-r--r-- | gst/isomp4/qtdemux.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 9e15439c2..6ede64bf3 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -14507,12 +14507,24 @@ qtdemux_video_caps (GstQTDemux * qtdemux, QtDemuxStream * stream, caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "4444", NULL); + + /* 24 bits per sample = an alpha channel is coded but image is always opaque */ + if (entry->bits_per_sample > 0) { + gst_caps_set_simple (caps, "depth", G_TYPE_INT, entry->bits_per_sample, + NULL); + } break; case FOURCC_ap4x: _codec ("Apple ProRes 4444 XQ"); caps = gst_caps_new_simple ("video/x-prores", "variant", G_TYPE_STRING, "4444xq", NULL); + + /* 24 bits per sample = an alpha channel is coded but image is always opaque */ + if (entry->bits_per_sample > 0) { + gst_caps_set_simple (caps, "depth", G_TYPE_INT, entry->bits_per_sample, + NULL); + } break; case FOURCC_cfhd: _codec ("GoPro CineForm"); |