AVPKit
IIndexEntry.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  * IIndexEntry.h
22  *
23  * Created on: Jan 14, 2010
24  * Author: aclarke
25  */
26 
27 #ifndef IINDEXENTRY_H_
28 #define IINDEXENTRY_H_
29 
30 #include <com/avpkit/ferry/RefCounted.h>
31 #include <com/avpkit/core/AVPKit.h>
32 
33 namespace com { namespace avpkit { namespace core
34 {
35 
64 class VS_API_AVPKIT IIndexEntry: public com::avpkit::ferry::RefCounted
65 {
66 public:
70  static const int32_t IINDEX_FLAG_KEYFRAME = 0x0001;
71 
82  static IIndexEntry* make(int64_t position, int64_t timeStamp,
83  int32_t flags, int32_t size, int32_t minDistance);
84 
91  virtual int64_t getPosition()=0;
96  virtual int64_t getTimeStamp()=0;
102  virtual int32_t getFlags()=0;
103 
108  virtual int32_t getSize()=0;
114  virtual int32_t getMinDistance()=0;
120  virtual bool isKeyFrame()=0;
121 
122 protected:
123  IIndexEntry();
124  virtual ~IIndexEntry();
125 };
126 
127 }}}
128 #endif /* IINDEXENTRY_H_ */
An index entry for a IStream.
Definition: IIndexEntry.h:65
virtual bool isKeyFrame()=0
Is this index entry pointing to a key frame.
virtual int32_t getMinDistance()=0
Minimum number of index entries between this index entry and the last keyframe in the index,...
virtual int32_t getSize()=0
The size of bytes of the frame this index entry points to.
virtual int64_t getPosition()=0
The position in bytes of the frame corresponding to this index entry in the IContainer.
virtual int64_t getTimeStamp()=0
The actual time stamp, in units of IStream#getTimeBase(), of the frame this entry points to.
virtual int32_t getFlags()=0
Flags set for this entry.
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...