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... | |
Public Member Functions inherited from ImageMetaData | |
virtual | ~ImageMetaData ()=default |
Protected Member Functions | |
QString | GetTag (const QString &key, bool *exists=nullptr) |
Read a single video tag. More... | |
Protected Member Functions inherited from ImageMetaData | |
ImageMetaData (QString filePath) | |
Protected Attributes | |
AVFormatContext * | m_context { nullptr } |
AVDictionary * | m_dict { nullptr } |
FFmpeg tag dictionary. More... | |
Protected Attributes inherited from ImageMetaData | |
QString | m_filePath |
Image filepath. More... | |
Additional Inherited Members | |
Public Types inherited from ImageMetaData | |
using | TagMap = QMultiMap< QString, QStringList > |
Static Public Member Functions inherited from ImageMetaData | |
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 Public Attributes inherited from ImageMetaData | |
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 482 of file imagemetadata.cpp.
|
explicit |
Constructor. Opens best video stream from video.
filePath | Absolute video path |
Definition at line 508 of file imagemetadata.cpp.
|
override |
Destructor. Closes file.
Definition at line 531 of file imagemetadata.cpp.
|
inlineoverridevirtual |
Implements ImageMetaData.
Definition at line 488 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 548 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 658 of file imagemetadata.cpp.
|
overridevirtual |
Read video datestamp.
[out] | exists | (Optional) True if datestamp is defined by metadata |
Implements ImageMetaData.
Definition at line 670 of file imagemetadata.cpp.
|
overridevirtual |
Read Video comment from metadata.
Always empty
[out] | exists | (Optional) Always false |
Implements ImageMetaData.
Definition at line 685 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 632 of file imagemetadata.cpp.
Referenced by GetOrientation(), and GetOriginalDateTime().
|
protected |
Definition at line 498 of file imagemetadata.cpp.
Referenced by VideoMetaData(), and ~VideoMetaData().
|
protected |
FFmpeg tag dictionary.
Definition at line 500 of file imagemetadata.cpp.
Referenced by GetTag(), IsValid(), and VideoMetaData().