File: audiotagger.h

package info (click to toggle)
mixxx 1.11.0~dfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 96,840 kB
  • ctags: 37,182
  • sloc: cpp: 210,326; xml: 167,911; ansic: 24,880; sh: 12,876; python: 9,407; makefile: 566; php: 57
file content (54 lines) | stat: -rw-r--r-- 1,218 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

#ifndef AUDIOTAGGER_H
#define AUDIOTAGGER_H

#include <QString>
#include <taglib/apetag.h>
#include <taglib/id3v2tag.h>
#include <taglib/xiphcomment.h>
#include <taglib/mp4tag.h>



class AudioTagger
{
public:


    AudioTagger (QString file);
    virtual ~AudioTagger ( );
    void setArtist (QString artist );
    void setTitle (QString title );
    void setAlbum (QString album );
    void setGenre (QString genre );
    void setComposer (QString composer );
    void setYear (QString year );
    void setComment (QString comment );
    void setKey (QString key );
    void setBpm (QString bpm );
    void setTracknumber (QString tracknumber );
    bool save();


private:
    QString m_artist;
    QString m_title;
    QString m_genre;
    QString m_composer;
    QString m_album;
    QString m_year;
    QString m_comment;
    QString m_key;
    QString m_bpm;
    QString m_tracknumber;

    QString m_file;

    /** adds or modifies the ID3v2 tag to include BPM and KEY information **/
    void addID3v2Tag(TagLib::ID3v2::Tag* id3v2);
    void addAPETag(TagLib::APE::Tag* ape);
    void addXiphComment(TagLib::Ogg::XiphComment* xiph);
    void processMP4Tag(TagLib::MP4::Tag* mp4);
};

#endif // AUDIOTAGGER_H