Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Plugins/Input/in_flv/StreamProcessor.h

29 lines
658 B
C
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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;
};