When parsing the xmp buffer into the gst taglist store the
found tags into a list to be parsed only after finding all
tags on the buffer. This allows the parser function to search
this list for complimentary tags that should be parsed together
Fixes#613690
This commit is only refactoring, no fetaures added.
Do not store tags in flexible arrays as it doesn't allow us
to use nested flexible arrays. This is going to be needed in the
following commits to map gst tags that are stored into
2 separate tags in xmp (Not that they are alternatives, but
they are complementary).
For example, GST_TAG_ELEVATION is represented in the exif
schema with 2 fields: the absolute altitude and an integer
to indicate if it is above or below sea level.
The previous mappings storage wouldn't allow us to
express it.
Also store a serialization and a deserialization function
for each xmp tag as some of them require some non-trivial
convertion to its string form.
Fixes#613690
Since we no longer use an array of error messages, there is no reason
to clamp the error code, which allows us to simplify the code some more
and also to actually report the correct error code for unknown errors.
2 goals in the refactoring:
- Put the error messages closer to their enum values, so that it's easy
to see which error belongs to which value.
- Make gcc not complain with -Wformat-nonliteral
I initially looked here because I wanted compiles to not fail with
-Wformat-nonliteral but ended up refactoring the code to make it look
nicer.
As I lack a large collection of XMP tagged files, I only did rough
testing of the code. The testsuite passes though.
XMP metadata can be embedded in many media container formats. Implement own
parser and formatter that can be used to convert between an xpacket and a
GstTagList. Add unit tests.
Add set_render_rectangle() vmethod to the interface to better support windowless
toolkits (e.g. qt graphicsview or video on canvas in general). Right now we
always fill the widget to 100%. With the patch we can use a rectangular target
region. Fixes#610249.
API: GstXOverlay::set_render_rectangle()
Add simple videotestsrc ! xvimagesink examples using gtk and qt. This patch also
adds all boilerplate to configure for using c++. The qt based examples are
optional like their gtk counterparts.