blob: cd66ccdd3a2bb0056f734b7664d3240ef531a7ff (
plain) (
blame)
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
|
#pragma once
#include "FLVProcessor.h"
#include "../nu/RingBuffer.h"
class StreamProcessor : public FLVProcessor
{
public:
StreamProcessor();
private:
int Write(void *data, size_t datalen, size_t *written);
int Process();
uint64_t Seek(uint64_t position);
size_t Read(void *data, size_t bytes);
uint64_t GetProcessedPosition();
bool GetFrame(size_t frameIndex, FrameData &frameData);
uint32_t GetMaxTimestamp();
bool GetPosition(int time_in_ms, size_t *frameIndex, bool needVideoKeyFrame);
bool IsStreaming() { return true; }
FLVHeader *GetHeader();
private:
RingBuffer buffer;
uint64_t bytesWritten;
bool readHeader;
FLVHeader header;
};
|