Cogs.Core
MPEG_TS_encode.h
1#pragma once
2
3#include "Base.h"
4#include "IVideoDecoder.h"
5
6#include <functional>
7
8namespace Cogs::Core{
9
10typedef std::function<void(uint8_t *data, size_t size)> TSEncodeCallback;
11
13 void COGSCORE_DLL_API SendNullPacket();
14 void COGSCORE_DLL_API SendProgramAssociationTable();
15 void COGSCORE_DLL_API SendProgramMapTable(Codec codec);
16 void COGSCORE_DLL_API SendPES(const uint8_t* dat, size_t size, size_t &written, uint64_t timestamp, bool use_timestamp, bool is_idr);
17
18 void COGSCORE_DLL_API Write(const void* buffer, size_t size, uint64_t timestamp, bool is_idr);
19
20 void WriteBuffer(uint8_t *data, uint32_t size);
21 void FlushBuffer();
22
23 uint8_t buffer[2048] = {};
24 uint32_t buffer_size = 1500; // UDP packet size
25 uint32_t used = 0;
26
27 TSEncodeCallback callback;
28
29 uint32_t continuity_counter = 0;
30};
31
32}// namespace ...
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....