TagLib  2.2.1
matroskaproperties.h
Go to the documentation of this file.
1 /***************************************************************************
2  copyright : (C) 2025 by Urs Fleisch
3  email : ufleisch@users.sourceforge.net
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_MATROSKAPROPERTIES_H
27 #define TAGLIB_MATROSKAPROPERTIES_H
28 
29 #include "taglib_export.h"
30 #include "audioproperties.h"
31 
32 namespace TagLib::EBML {
33  class MkTracks;
34  class MkInfo;
35 }
36 
37 namespace TagLib::Matroska {
38  class File;
39 
42  {
43  public:
47  explicit Properties(File *file, ReadStyle style = Average);
48 
52  ~Properties() override;
53 
54  Properties(const Properties &) = delete;
55  Properties &operator=(const Properties &) = delete;
56 
62  int lengthInMilliseconds() const override;
63 
67  int bitrate() const override;
68 
72  int sampleRate() const override;
73 
77  int channels() const override;
78 
82  int bitsPerSample() const;
83 
87  String docType() const;
88 
92  int docTypeVersion() const;
93 
98  String codecName() const;
99 
105  String title() const;
106 
107  private:
108  class PropertiesPrivate;
109  friend class EBML::MkInfo;
110  friend class EBML::MkTracks;
111  friend class File;
112 
113  void setLengthInMilliseconds(int length);
114  void setSampleRate(int sampleRate);
115  void setChannels(int channels);
116  void setBitsPerSample(int bitsPerSample);
117  void setDocType(const String &docType);
118  void setDocTypeVersion(int docTypeVersion);
119  void setCodecName(const String &codecName);
120  void setTitle(const String &title);
121 
123  std::unique_ptr<PropertiesPrivate> d;
124  };
125 }
126 
127 #endif
An implementation of Matroska audio properties.
Definition: matroskaproperties.h:41
A wide string class suitable for unicode.
Definition: tstring.h:82
#define TAGLIB_MSVC_SUPPRESS_WARNING_NEEDS_TO_HAVE_DLL_INTERFACE
Definition: taglib_export.h:55
ReadStyle
Definition: audioproperties.h:56
#define TAGLIB_EXPORT
Definition: taglib_export.h:40
A simple, abstract interface to common audio properties.
Definition: audioproperties.h:45
Definition: matroskaattachments.h:32
An implementation of Matroska metadata.
Definition: matroskaattachedfile.h:32
An implementation of TagLib::File with Matroska specific methods.
Definition: matroskafile.h:39