-
Notifications
You must be signed in to change notification settings - Fork 30
/
EventStackFilter.h
51 lines (46 loc) · 2.35 KB
/
EventStackFilter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include <list>
#include "Event.h"
#include "VideoClip.h"
#include "AudioClip.h"
#include "Logger.h"
namespace MEC
{
struct EventStack
{
virtual Event::Holder GetEvent(int64_t id) = 0;
virtual Event::Holder AddNewEvent(int64_t id, int64_t start, int64_t end, int32_t z) = 0;
virtual Event::Holder RestoreEventFromJson(const imgui_json::value& eventJson) = 0;
virtual void RemoveEvent(int64_t id) = 0;
virtual bool ChangeEventRange(int64_t id, int64_t start, int64_t end) = 0;
virtual bool MoveEvent(int64_t id, int64_t start, int32_t z) = 0;
virtual bool MoveAllEvents(int64_t offset) = 0;
virtual bool MoveEventTrack(int32_t oldZ, int32_t newZ) = 0;
virtual bool SetEditingEvent(int64_t id) = 0;
virtual Event::Holder GetEditingEvent() = 0;
virtual std::list<Event::Holder> GetEventList() const = 0;
virtual std::list<Event::Holder> GetEventListByZ(int32_t z) const = 0;
virtual void SetTimelineHandle(void* handle) = 0;
virtual void* GetTimelineHandle() const = 0;
virtual std::string GetError() const = 0;
virtual void SetLogLevel(Logger::Level l) = 0;
friend std::ostream& operator<<(std::ostream& os, const EventStack& e);
};
struct VideoEventStackFilter : MediaCore::VideoFilter, virtual EventStack
{
static MediaCore::VideoFilter::Holder CreateInstance(const BluePrint::BluePrintCallbackFunctions& bpCallbacks);
static MediaCore::VideoFilter::Holder LoadFromJson(const imgui_json::value& json, const BluePrint::BluePrintCallbackFunctions& bpCallbacks, MediaCore::SharedSettings::Holder hSettings = nullptr);
virtual void SetBluePrintCallbacks(const BluePrint::BluePrintCallbackFunctions& bpCallbacks) = 0;
};
struct AudioEventStackFilter : MediaCore::AudioFilter, virtual EventStack
{
static MediaCore::AudioFilter::Holder CreateInstance(const BluePrint::BluePrintCallbackFunctions& bpCallbacks);
static MediaCore::AudioFilter::Holder LoadFromJson(const imgui_json::value& json, const BluePrint::BluePrintCallbackFunctions& bpCallbacks);
virtual void SetBluePrintCallbacks(const BluePrint::BluePrintCallbackFunctions& bpCallbacks) = 0;
};
struct EventStackFilterContext
{
void* pFilterPtr{nullptr};
void* pEventPtr{nullptr};
};
}