AVPKit
IndexEntry.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 /*
21  * IndexEntry.h
22  *
23  * Created on: Mar 20, 2009
24  * Author: aclarke
25  */
26 
27 #ifndef IndexEntry_H_
28 #define IndexEntry_H_
29 
30 #include <com/avpkit/core/FfmpegIncludes.h>
31 #include <com/avpkit/core/IIndexEntry.h>
32 
33 namespace com { namespace avpkit { namespace core
34 {
35 
36 class IndexEntry : public IIndexEntry
37 {
38  VS_JNIUTILS_REFCOUNTED_OBJECT_PRIVATE_MAKE(IndexEntry);
39 public:
40  static IndexEntry* make(int64_t position, int64_t timeStamp,
41  int32_t flags, int32_t size, int32_t minDistance);
42  virtual int64_t getPosition();
43  virtual int64_t getTimeStamp();
44  virtual int32_t getFlags();
45  virtual int32_t getSize();
46  virtual int32_t getMinDistance();
47  virtual bool isKeyFrame();
48 
49 protected:
50  IndexEntry();
51  virtual ~IndexEntry();
52 
53 private:
54  AVIndexEntry mEntry;
55 };
56 
57 }}}
58 
59 #endif /* IndexEntry_H_ */
An index entry for a IStream.
Definition: IIndexEntry.h:65
virtual int32_t getMinDistance()
Minimum number of index entries between this index entry and the last keyframe in the index,...
Definition: IndexEntry.cpp:72
virtual int64_t getTimeStamp()
The actual time stamp, in units of IStream#getTimeBase(), of the frame this entry points to.
Definition: IndexEntry.cpp:54
virtual int64_t getPosition()
The position in bytes of the frame corresponding to this index entry in the IContainer.
Definition: IndexEntry.cpp:48
virtual int32_t getSize()
The size of bytes of the frame this index entry points to.
Definition: IndexEntry.cpp:66
virtual bool isKeyFrame()
Is this index entry pointing to a key frame.
Definition: IndexEntry.cpp:78
virtual int32_t getFlags()
Flags set for this entry.
Definition: IndexEntry.cpp:60
WARNING: Do not use logging in this class, and do not set any static file variables to values other t...