12 #ifndef __CHOP_Realtime_h__
13 #define __CHOP_Realtime_h__
19 #define REALTIME_MODE_TRIM 0
20 #define REALTIME_MODE_ACCUM 1
21 #define REALTIME_MODE_CONTINUOUS 2
22 #define REALTIME_MODE_CURRENT_FRAME 3
23 #define REALTIME_MODE_FRAME_ONE 4
25 #define REALTIME_INPUT_INTEREST_NONE (-1)
26 #define REALTIME_INPUT_INTEREST_ALL (-2)
28 #define DEF_REALTIME_SETTLING_TIME 3
32 class chop_RealtimeData;
76 virtual const char *getTimeSliceExtension() = 0;
86 virtual void realtimeStart(
fpreal t);
87 virtual void realtimeStop();
103 virtual int isSteady()
const;
108 int isFirstRealtimeCook()
const;
109 void setFirstRealtimeCook(
bool first);
134 int clear = 1)
override;
137 int isWraparound()
const;
139 int getNumDataBlocks()
const;
143 void getFrameRange(
int &start,
int &end);
144 unsigned int getAbsoluteFrame();
148 virtual void cacheChannelData(
fpreal t);
149 virtual void resetDataCache();
151 void setPreviousCookTime(
fpreal t);
153 void getCurrentRange(
int &start,
int &end)
const;
154 void setCurrentRange(
int start,
int end);
164 void removeDataBlock(
const char *name);
165 void removeDataBlock(
int index);
167 void updateDataBlocks();
185 const char *pathPrefix,
190 const char *
path)
override;
198 {
return isRealtimeActive(ctx); }
202 chop_RealtimeData *newRealtimeBlock();
207 void getParentTimeSlice(
int &start,
int &end);
212 { myRealtimeData = d; }
213 static void deleteRealtimeData(chop_RealtimeData *
data);
chop_RealtimeData * getRealtimeData()
#define DEF_REALTIME_SETTLING_TIME
OP_ERROR save(std::ostream &os, const OP_SaveFlags &flags, const char *pathPrefix, const UT_String &name_override=UT_String()) override
#define REALTIME_MODE_TRIM
virtual int allowDoubleCooking() const
virtual bool saveStates(UT_OStream &os)
virtual int getModifiedRange(int &first, int &last, int clear=1)
auto getEvaluateDataLambda(const CL_Track *track)
virtual void realtimeInit(fpreal t)
GLsizei const GLchar *const * path
OP_DataBlockPtr getDataBlock(const char *key) const
bool isTimeDependent(const OP_Context &context)
chop_RealtimeData * myRealtimeData
virtual void realtimeCleanup()
int isRealtimeCook() override
virtual bool allowResetAtFirstFrame(OP_Context &ctx)
void evaluate(const CL_Track *track, fpreal start_index, fpreal stop_index, fpreal *data, int size) const
GLuint const GLchar * name
virtual OP_ERROR doCookRealtime(OP_Context &context)
GT_API const UT_StringHolder version
__hostdev__ uint64_t last(uint32_t i) const
virtual int isRealtimeActive(OP_Context &)
virtual int getSaveVersion()
virtual int realtimeMode()
virtual int getInputInterest()
bool load(UT_IStream &is, const char *extension, const char *path=0) override
virtual fpreal getRealtimeSampleRate()
virtual bool loadStates(UT_IStream &is, int version)
int usesRealtime() override
IMATH_INTERNAL_NAMESPACE_HEADER_ENTER IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T clip(const T &p, const Box< T > &box) IMATH_NOEXCEPT
void setRealtimeData(chop_RealtimeData *d)
virtual int getSettlingTime() const
OIIO_UTIL_API std::string extension(string_view filepath, bool include_dot=true) noexcept
virtual fpreal getRealtimeFrameAdjustment(fpreal)