Cogs.Core
Extensions
Video
VideoCaptureSystem.h
1
#pragma once
2
#include "VideoCaptureComponent.h"
3
#include "Systems/ComponentSystem.h"
4
5
namespace
Cogs::Core
6
{
7
struct
VideoCaptureData
8
{
9
struct
IVideoEncoder
* encoder =
nullptr
;
10
int64_t nextEncodeTime = 0;
11
int64_t nextRestartTime = 0;
12
};
13
14
class
VideoCaptureSystem
:
public
ComponentSystemWithDataPool
<VideoCaptureComponent, VideoCaptureData>
15
{
16
public
:
17
void
initialize
(
Context
*
context
)
override
;
18
void
cleanup
(
Context
*
context
)
override
;
19
20
VideoCaptureSystem
(
Memory::Allocator
* allocator,
SizeType
capacity) :
ComponentSystemWithDataPool
(allocator, capacity) {}
21
22
void
preUpdate
(
Context
*
context
)
override
;
23
void
update
(
Context
*
context
)
override
;
24
void
postRender(
Context
*
context
);
25
26
void
destroyComponent
(
ComponentHandle
component)
override
;
27
28
class
VideoCaptureRenderer
*renderer =
nullptr
;
29
};
30
}
// namespace ...
Cogs::Core::ComponentSystemBase::context
Context * context
Pointer to the Context instance the system lives in.
Definition:
ComponentSystem.h:136
Cogs::Core::ComponentSystemBase::update
void update()
Updates the system state to that of the current frame.
Definition:
ComponentSystem.h:65
Cogs::Core::ComponentSystemBase::preUpdate
void preUpdate()
Run the pre-update method of the system.
Definition:
ComponentSystem.h:57
Cogs::Core::ComponentSystemWithDataPool
Component system with parallel data per component stored in a pool similar to how the components them...
Definition:
ComponentSystem.h:365
Cogs::Core::Context
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition:
Context.h:83
Cogs::Core::VideoCaptureRenderer
Definition:
VideoCaptureRenderer.h:9
Cogs::Core::VideoCaptureSystem
Definition:
VideoCaptureSystem.h:15
Cogs::Core::VideoCaptureSystem::destroyComponent
void destroyComponent(ComponentHandle component) override
Definition:
VideoCaptureSystem.cpp:184
Cogs::Core::VideoCaptureSystem::initialize
void initialize(Context *context) override
Initialize the system.
Definition:
VideoCaptureSystem.cpp:25
Cogs::Core::VideoCaptureSystem::cleanup
void cleanup(Context *context) override
Provided for custom cleanup logic in derived systems.
Definition:
VideoCaptureSystem.cpp:34
Cogs::Memory::Allocator
Base allocator implementation.
Definition:
Allocator.h:30
Cogs::Core
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
Definition:
ComponentFunctions.h:10
Cogs::SizeType
ComponentIndex SizeType
Type used to track the size of pools.
Definition:
Component.h:19
Cogs::ComponentModel::ComponentHandle
Handle to a Component instance.
Definition:
Component.h:67
Cogs::Core::IVideoEncoder
Definition:
IVideoEncoder.h:72
Cogs::Core::VideoCaptureData
Definition:
VideoCaptureSystem.h:8
Generated by
1.9.6