audio/video: Copy more metas by default in the codec base classes
authorSebastian Dröge <sebastian@centricular.com>
Fri, 28 Aug 2020 09:56:38 +0000 (12:56 +0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sun, 30 Aug 2020 22:12:22 +0000 (22:12 +0000)
commit391d09dc245a72391ef5a72bb6e3053573f1614c
tree151b5a6014b24fcdba7f45f53891942922603c4c
parent4f12ce62139586e68bc6e41922fc68396c89ff62
audio/video: Copy more metas by default in the codec base classes

For audio we copy metas that have no tags at all, or that only have the
"audio" and/or "audio-channels" tag. Audio codecs don't change the
audio aspect of the stream and in almost all cases don't change the
number of channels. They might however change the sample rate (e.g.
Opus). Subclasses that change the number of channels will have to
override ::transform_meta() accordingly.

For video we copy metas that have no tags at all, or that only have the
"video" and/or "video-size" and/or "video-orientation" tag. Video codecs
don't change the "video" aspect of the stream and in almost all cases
don't change the resolution or orientation. Subclasses that rescale or
change the orientation will have to override ::transform_meta()
accordingly.

See https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/576#note_610581

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/801>
gst-libs/gst/audio/gstaudiodecoder.c
gst-libs/gst/audio/gstaudioencoder.c
gst-libs/gst/video/gstvideodecoder.c
gst-libs/gst/video/gstvideoencoder.c