MythTV  0.26-pre
Public Member Functions | Private Member Functions
MetaIOMP4 Class Reference

Read and write metadata in MP4 container tags. More...

#include <metaiomp4.h>

Inheritance diagram for MetaIOMP4:
MetaIO

List of all members.

Public Member Functions

 MetaIOMP4 (void)
virtual ~MetaIOMP4 (void)
bool write (const Metadata *mdata)
Metadataread (const QString &filename)

Private Member Functions

int getTrackLength (const QString &filename)
 Find the length of the track (in seconds)
int getTrackLength (AVFormatContext *p_context)
 Find the length of the track (in seconds)
QString getFieldValue (AVFormatContext *context, const char *tagname)
 Retrieve the value of a named metadata field.
void metadataSanityCheck (QString *artist, QString *album, QString *title, QString *genre)
 Replace any empty strings in extracted metadata with sane defaults.

Detailed Description

Read and write metadata in MP4 container tags.

Definition at line 16 of file metaiomp4.h.


Constructor & Destructor Documentation

Definition at line 16 of file metaiomp4.cpp.

MetaIOMP4::~MetaIOMP4 ( void  ) [virtual]

Definition at line 23 of file metaiomp4.cpp.


Member Function Documentation

bool MetaIOMP4::write ( const Metadata mdata) [virtual]

Writes all metadata back to a file.

Parameters:
mdataA pointer to a Metadata object
Returns:
Boolean to indicate success/failure.

Implements MetaIO.

Definition at line 30 of file metaiomp4.cpp.

Metadata * MetaIOMP4::read ( const QString &  filename) [virtual]

Reads Metadata from a file.

Parameters:
filenameThe filename to read metadata from.
Returns:
Metadata pointer or NULL on error

Implements MetaIO.

Definition at line 82 of file metaiomp4.cpp.

int MetaIOMP4::getTrackLength ( const QString &  filename) [private, virtual]

Find the length of the track (in seconds)

Parameters:
filenameThe filename for which we want to find the length.
Returns:
An integer (signed!) to represent the length in seconds.

Implements MetaIO.

Definition at line 181 of file metaiomp4.cpp.

Referenced by read().

int MetaIOMP4::getTrackLength ( AVFormatContext *  pContext) [private]

Find the length of the track (in seconds)

Parameters:
pContextThe AV Format Context.
Returns:
An integer (signed!) to represent the length in seconds.

Definition at line 210 of file metaiomp4.cpp.

QString MetaIOMP4::getFieldValue ( AVFormatContext *  context,
const char *  tagname 
) [private]

Retrieve the value of a named metadata field.

Parameters:
contextAVFormatContext of the file
tagnameThe name of the field
Returns:
A string containing the requested value

Definition at line 163 of file metaiomp4.cpp.

Referenced by read().

void MetaIOMP4::metadataSanityCheck ( QString *  artist,
QString *  album,
QString *  title,
QString *  genre 
) [private]

Replace any empty strings in extracted metadata with sane defaults.

Parameters:
artistArtist
albumAlbum
titleTitle
genreGenre

Definition at line 228 of file metaiomp4.cpp.

Referenced by read().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends