TagLib API Documentation
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 "tstring.h"
31#include "audioproperties.h"
32
33namespace TagLib {
34 namespace MP4 {
35 class Atoms;
36 class File;
37
40 {
41 public:
42 enum Codec {
43 Unknown = 0,
50 Opus
51 };
52
53 Properties(File *file, const Atoms *atoms, ReadStyle style = Average);
54 ~Properties() override;
55
56 Properties(const Properties &) = delete;
57 Properties &operator=(const Properties &) = delete;
58
64 int lengthInMilliseconds() const override;
65
69 int bitrate() const override;
70
74 int sampleRate() const override;
75
79 int channels() const override;
80
84 virtual int bitsPerSample() const;
85
89 bool isEncrypted() const;
90
94 Codec codec() const;
95
102
103 private:
104 void read(File *file, const Atoms *atoms);
105
106 class PropertiesPrivate;
108 std::unique_ptr<PropertiesPrivate> d;
109 };
110 } // namespace MP4
111} // namespace TagLib
112#endif
A simple, abstract interface to common audio properties.
Definition audioproperties.h:46
ReadStyle
Definition audioproperties.h:56
A generic, implicitly shared list.
Definition tlist.h:54
An implementation of TagLib::File with MP4 specific methods.
Definition mp4file.h:51
An implementation of MP4 audio properties.
Definition mp4properties.h:40
int bitrate() const override
int channels() const override
int lengthInMilliseconds() const override
virtual int bitsPerSample() const
bool isEncrypted() const
int sampleRate() const override
Properties(File *file, const Atoms *atoms, ReadStyle style=Average)
Codec
Definition mp4properties.h:42
@ EAC3
Definition mp4properties.h:47
@ AAC
Definition mp4properties.h:44
@ AC3
Definition mp4properties.h:46
@ ALAC
Definition mp4properties.h:45
@ DTS
Definition mp4properties.h:49
@ FLAC
Definition mp4properties.h:48
Properties & operator=(const Properties &)=delete
Properties(const Properties &)=delete
String codecId() const
A wide string class suitable for unicode.
Definition tstring.h:83
A namespace for all TagLib related classes and functions.
Definition apefile.h:41
#define TAGLIB_EXPORT
Definition taglib_export.h:40
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition taglib_export.h:55