Metadata ExtractionMetadata is represented within a tree of container nodes, starting at the root node of OMX_ALL. Each container node can encompass any number of child nodes, which in themselves may be container/parent nodes, but each node can only have a single parent. There are two anticipated use cases for extracting metadata from a component -- reading all the metadata tags into a client-side structure, or searching for a specific metadata key within the metadata items.
Extracting the entire treeTo extract the entire tree:
Extracting a specific metadata item by keyTo extract a node from the tree, each level of the tree must be queried in turn to obtain the relevant node IDs.
When each level of the metadata specifiers have been followed, the resulting metadata value should be in nValue, and the length in nValueSize. As an alternative where the metadata for the currently selected stream is on a specific port, nScopeSpecifier can be set to OMX_MetadataScopePortLevel, nScopeSpecifier set to the port number to which the metadata key refers, and nKey / nKeySize set appropriately for the lowest level key name (ie ignoring all the container levels). Assuming the name is unique within the scope of that port, it will return the metadata information for the currently-selected stream on the specified port (assuming the component supports port streams, and a stream is selected).
|