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

MetaIOMP4::MetaIOMP4 ( void   ) 

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:
mdata A 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:
filename The 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:
filename The 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:
pContext The 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:
context AVFormatContext of the file
tagname The 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:
artist Artist
album Album
title Title
genre Genre

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
Generated on Mon May 28 06:42:09 2012 for MythTV by  doxygen 1.6.3