MythTV
master
|
Reads video metadata tags using FFmpeg Raw values for Orientation & Date are read quickly via FFmpeg API. More...
Public Member Functions | |
VideoMetaData (const QString &filePath) | |
Constructor. Opens best video stream from video. More... | |
~VideoMetaData () override | |
Destructor. Closes file. More... | |
bool | IsValid () override |
QStringList | GetAllTags () override |
Reads relevant video metadata by running mythffprobe. More... | |
int | GetOrientation (bool *exists=nullptr) override |
Read FFmpeg video orientation tag. More... | |
QDateTime | GetOriginalDateTime (bool *exists=nullptr) override |
Read video datestamp. More... | |
QString | GetComment (bool *exists=nullptr) override |
Read Video comment from metadata. More... | |
![]() | |
virtual | ~ImageMetaData ()=default |
Protected Member Functions | |
QString | GetTag (const QString &key, bool *exists=nullptr) |
Read a single video tag. More... | |
![]() | |
ImageMetaData (QString filePath) | |
Protected Attributes | |
AVFormatContext * | m_context |
AVDictionary * | m_dict |
FFmpeg tag dictionary. More... | |
![]() | |
QString | m_filePath |
Image filepath. More... | |
Additional Inherited Members | |
![]() | |
using | TagMap = QMultiMap< QString, QStringList > |
![]() | |
static ImageMetaData * | FromPicture (const QString &filePath) |
Factory to retrieve metadata from pictures. More... | |
static ImageMetaData * | FromVideo (const QString &filePath) |
Factory to retrieve metadata from videos. More... | |
static QString | ToString (const QString &name, const QString &label, const QString &value) |
Encodes metadata into a string as <tag name><tag label><tag value> More... | |
static QStringList | FromString (const QString &str) |
Decodes metadata name, label, value from a string. More... | |
static TagMap | ToMap (const QStringList &tags) |
Creates a map of metadata tags as. More... | |
![]() | |
static const QString | kSeparator = "|-|" |
Unique separator to delimit fields within a string. More... | |
Reads video metadata tags using FFmpeg Raw values for Orientation & Date are read quickly via FFmpeg API.
However, as collating and interpreting other tags is messy and dependant on internal FFmpeg changes, informational data is derived via mythffprobe (a slow operation)
Definition at line 484 of file imagemetadata.cpp.
|
explicit |
Constructor. Opens best video stream from video.
filePath | Absolute video path |
Definition at line 510 of file imagemetadata.cpp.
|
override |
Destructor. Closes file.
Definition at line 533 of file imagemetadata.cpp.
|
inlineoverridevirtual |
Implements ImageMetaData.
Definition at line 490 of file imagemetadata.cpp.
Referenced by GetAllTags(), VideoMetaData(), and ~VideoMetaData().
|
overridevirtual |
Reads relevant video metadata by running mythffprobe.
As video tags are unstructured they are massaged into groups of format, stream0, streamN to segregate them and permit reasonable display ordering. The stream indices reflect the stream order returned by mythffprobe and do not necessarily correlate with FFmpeg streams
Implements ImageMetaData.
Definition at line 550 of file imagemetadata.cpp.
|
overridevirtual |
Read FFmpeg video orientation tag.
[out] | exists | (Optional) True if orientation is defined by metadata |
Implements ImageMetaData.
Definition at line 660 of file imagemetadata.cpp.
|
overridevirtual |
Read video datestamp.
[out] | exists | (Optional) True if datestamp is defined by metadata |
Implements ImageMetaData.
Definition at line 672 of file imagemetadata.cpp.
|
overridevirtual |
Read Video comment from metadata.
Always empty
[out] | exists | (Optional) Always false |
Implements ImageMetaData.
Definition at line 687 of file imagemetadata.cpp.
|
protected |
Read a single video tag.
[in] | key | FFmpeg tag name |
[out] | exists | (Optional) True if tag exists in metadata |
Definition at line 634 of file imagemetadata.cpp.
Referenced by GetOrientation(), and GetOriginalDateTime().
|
protected |
Definition at line 500 of file imagemetadata.cpp.
Referenced by VideoMetaData(), and ~VideoMetaData().
|
protected |
FFmpeg tag dictionary.
Definition at line 502 of file imagemetadata.cpp.
Referenced by GetTag(), IsValid(), and VideoMetaData().