AVPKit
Global.h
1 /*******************************************************************************
2  * Copyright (c) 2024, 2026, Olivier Ayache. All rights reserved.
3  *
4  * This file is part of AVPKit.
5  *
6  * AVPKit is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * AVPKit is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with AVPKit. If not, see <http://www.gnu.org/licenses/>.
18  *******************************************************************************/
19 
20 #ifndef GLOBAL_H_
21 #define GLOBAL_H_
22 
23 #include <com/avpkit/ferry/Mutex.h>
24 #include <com/avpkit/ferry/RefCounted.h>
25 #include <com/avpkit/core/AVPKit.h>
26 #include <com/avpkit/core/IContainer.h>
27 #include <com/avpkit/core/IContainerFormat.h>
28 #include <com/avpkit/core/ICodec.h>
29 #include <com/avpkit/core/IRational.h>
30 #include <com/avpkit/core/IAudioSamples.h>
31 #include <com/avpkit/core/IVideoPicture.h>
32 #include <com/avpkit/core/IAudioResampler.h>
33 #include <com/avpkit/core/IVideoResampler.h>
34 #include <com/avpkit/core/IMediaDataWrapper.h>
35 
36 namespace com { namespace avpkit { namespace core
37 {
42  class VS_API_AVPKIT Global : public com::avpkit::ferry::RefCounted
43  {
44  public:
50  static const int64_t NO_PTS=0x8000000000000000LL;
57  static const int64_t DEFAULT_PTS_PER_SECOND=1000000;
58 
66  static int64_t getVersion();
67 
72  static int32_t getVersionMajor();
77  static int32_t getVersionMinor();
82  static int32_t getVersionRevision();
87  static const char* getVersionStr();
88 
93  static int getAVFormatVersion();
98  static const char* getAVFormatVersionStr();
103  static int getAVCodecVersion();
108  static const char* getAVCodecVersionStr();
109 
110 #ifndef SWIG
123  static void lock();
124 
129  static void unlock();
130 
131 
136  static int avioInterruptCB(void*);
137 
141  static void deinit();
142 #endif // ! SWIG
143 
144 
157  static void init();
158 
166  static void setFFmpegLoggingLevel(int32_t level);
167 
168  private:
169  Global();
170  ~Global();
171 
172  static void destroyStaticGlobal(JavaVM*, void*closure);
173  static Global* sGlobal;
175  };
176 }}}
177 
178 #endif /*GLOBAL_H_*/
A collection of static functions that refer to the entire package (like version getters).
Definition: Global.h:43
Internal Only.
Definition: Mutex.h:41
Parent of all Ferry objects – it mains reference counts in native code.
Definition: RefCounted.h:85
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...