TagLib  2.0.2
mp4properties.h
Go to the documentation of this file.
1 /**************************************************************************
2  copyright : (C) 2007 by Lukáš Lalinský
3  email : lalinsky@gmail.com
4  **************************************************************************/
5 
6 /***************************************************************************
7  * This library is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU Lesser General Public License version *
9  * 2.1 as published by the Free Software Foundation. *
10  * *
11  * This library is distributed in the hope that it will be useful, but *
12  * WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the Free Software *
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA *
19  * 02110-1301 USA *
20  * *
21  * Alternatively, this file is available under the Mozilla Public *
22  * License Version 1.1. You may obtain a copy of the License at *
23  * http://www.mozilla.org/MPL/ *
24  ***************************************************************************/
25 
26 #ifndef TAGLIB_MP4PROPERTIES_H
27 #define TAGLIB_MP4PROPERTIES_H
28 
29 #include "taglib_export.h"
30 #include "audioproperties.h"
31 
32 namespace TagLib {
33  namespace MP4 {
34  class Atoms;
35  class File;
36 
39  {
40  public:
41  enum Codec {
42  Unknown = 0,
43  AAC,
44  ALAC
45  };
46 
47  Properties(File *file, const Atoms *atoms, ReadStyle style = Average);
48  ~Properties() override;
49 
50  Properties(const Properties &) = delete;
51  Properties &operator=(const Properties &) = delete;
52 
58  int lengthInMilliseconds() const override;
59 
63  int bitrate() const override;
64 
68  int sampleRate() const override;
69 
73  int channels() const override;
74 
78  virtual int bitsPerSample() const;
79 
83  bool isEncrypted() const;
84 
88  Codec codec() const;
89 
90  private:
91  void read(File *file, const Atoms *atoms);
92 
93  class PropertiesPrivate;
95  std::unique_ptr<PropertiesPrivate> d;
96  };
97  } // namespace MP4
98 } // namespace TagLib
99 #endif
Codec
Definition: mp4properties.h:41
An implementation of MP4 audio properties.
Definition: mp4properties.h:38
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
An implementation of TagLib::File with MP4 specific methods.
Definition: mp4file.h:49
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
Definition: mp4properties.h:43
A simple, abstract interface to common audio properties.
Definition: audioproperties.h:45
A namespace for all TagLib related classes and functions.
Definition: apefile.h:41