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 |
virtual bool | IsValid ()=0 |
virtual QStringList | GetAllTags ()=0 |
virtual int | GetOrientation (bool *exists=nullptr)=0 |
virtual QDateTime | GetOriginalDateTime (bool *exists=nullptr)=0 |
virtual QString | GetComment (bool *exists=nullptr)=0 |
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 { nullptr } |
AVDictionary * | m_dict { nullptr } |
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 427 of file imagemetadata.cpp.
|
explicit |
Constructor. Opens best video stream from video.
filePath | Absolute video path |
Definition at line 453 of file imagemetadata.cpp.
|
override |
Destructor. Closes file.
Definition at line 476 of file imagemetadata.cpp.
|
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 493 of file imagemetadata.cpp.
|
overridevirtual |
Read Video comment from metadata.
Always empty
[out] | exists | (Optional) Always false |
Implements ImageMetaData.
Definition at line 630 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 603 of file imagemetadata.cpp.
|
overridevirtual |
Read video datestamp.
[out] | exists | (Optional) True if datestamp is defined by metadata |
Implements ImageMetaData.
Definition at line 615 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 577 of file imagemetadata.cpp.
Referenced by GetOrientation(), and GetOriginalDateTime().
|
inlineoverridevirtual |
Implements ImageMetaData.
Definition at line 433 of file imagemetadata.cpp.
Referenced by GetAllTags(), VideoMetaData(), and ~VideoMetaData().
|
protected |
Definition at line 443 of file imagemetadata.cpp.
Referenced by VideoMetaData(), and ~VideoMetaData().
|
protected |
FFmpeg tag dictionary.
Definition at line 445 of file imagemetadata.cpp.
Referenced by GetTag(), IsValid(), and VideoMetaData().