]> git.sesse.net Git - kdenlive/blob - src/lib/audio/audioStreamInfo.h
Audio alignment libraries moved to src/lib/audio/
[kdenlive] / src / lib / audio / audioStreamInfo.h
1 /***************************************************************************
2  *   Copyright (C) 2012 by Simon Andreas Eugster (simon.eu@gmail.com)      *
3  *   This file is part of kdenlive. See www.kdenlive.org.                  *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 2 of the License, or     *
8  *   (at your option) any later version.                                   *
9  ***************************************************************************/
10
11 #ifndef AUDIOSTREAMINFO_H
12 #define AUDIOSTREAMINFO_H
13
14 #include <mlt++/Mlt.h>
15 #include <QString>
16
17 /**
18   Provides easy access to properties of an audio stream.
19   */
20 class AudioStreamInfo
21 {
22 public:
23     AudioStreamInfo(Mlt::Producer *producer, int audioStreamIndex);
24     ~AudioStreamInfo();
25
26     int streamIndex() const;
27     int samplingRate() const;
28     int channels() const;
29     int bitrate() const;
30     const QString& codecName(bool longName = false) const;
31     const QString& samplingFormat() const;
32
33     void dumpInfo() const;
34
35 private:
36     int m_audioStreamIndex;
37
38     int m_samplingRate;
39     int m_channels;
40     int m_bitRate;
41     QString m_codecName;
42     QString m_codecLongName;
43     QString m_samplingFormat;
44
45 };
46
47 #endif // AUDIOSTREAMINFO_H