diff options
author | He Junyan <junyan.he@intel.com> | 2021-01-23 23:25:30 +0800 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2021-01-26 12:22:31 +0000 |
commit | db134d27a078c21c249d5c6e77ba4c6bbd3b72ea (patch) | |
tree | 6d38f1608655e14cba1f06f59e834a5a14cadbd2 /gst/videoparsers | |
parent | be7a9e29df36875bf7b755f07e22b236fb0fa511 (diff) | |
download | gstreamer-plugins-bad-db134d27a078c21c249d5c6e77ba4c6bbd3b72ea.tar.gz |
av1parse: set the default alignment for input and output.
1. Set the default output alignment to frame, rather than current
alignment of obu. This make it the same behaviour as h264/h265
parse, which default align to AU.
2. Set the default input alignment to byte. It can handle the "not
enough data" error while the OBU alignment can not. Also make it
conform to the comments.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1979>
Diffstat (limited to 'gst/videoparsers')
-rw-r--r-- | gst/videoparsers/gstav1parse.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gst/videoparsers/gstav1parse.c b/gst/videoparsers/gstav1parse.c index d5adf411c..048d65629 100644 --- a/gst/videoparsers/gstav1parse.c +++ b/gst/videoparsers/gstav1parse.c @@ -28,10 +28,11 @@ * alignment: byte, obu, frame, tu * * 1. Aligned to byte. The basic and default one for input. - * 2. Aligned to obu(Open Bitstream Units). The default one for output. - * 3. Aligned to frame. This ensures that each buffer contains only one - * frame or frame header with show_existing flag for the base or sub - * layer. It is useful for the decoder. + * 2. Aligned to obu(Open Bitstream Units). + * 3. Aligned to frame. The default one for output. This ensures that + * each buffer contains only one frame or frame header with the + * show_existing flag for the base or sub layer. It is useful for + * the decoder. * 4. Aligned to tu(Temporal Unit). A temporal unit consists of all the * OBUs that are associated with a specific, distinct time instant. * When scalability is disabled, it contains just exact one showing @@ -660,7 +661,7 @@ gst_av1_parse_negotiate (GstAV1Parse * self, GstCaps * in_caps) /* default */ if (align == GST_AV1_PARSE_ALIGN_NONE) - align = GST_AV1_PARSE_ALIGN_OBU; + align = GST_AV1_PARSE_ALIGN_FRAME; done: self->align = align; @@ -746,7 +747,7 @@ gst_av1_parse_set_sink_caps (GstBaseParse * parse, GstCaps * caps) /* default */ if (align == GST_AV1_PARSE_ALIGN_NONE) gst_caps_set_simple (in_caps, "alignment", G_TYPE_STRING, - gst_av1_parse_alignment_to_string (GST_AV1_PARSE_ALIGN_OBU), NULL); + gst_av1_parse_alignment_to_string (GST_AV1_PARSE_ALIGN_BYTE), NULL); /* negotiate with downstream, set output align */ gst_av1_parse_negotiate (self, in_caps); |