From 0298076eea4f92685f9a01974261da41c2a01e5b Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 27 Aug 2019 11:02:23 +0200 Subject: EDI input: add new buffer management --- src/input/File.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/input/File.h') diff --git a/src/input/File.h b/src/input/File.h index 429a1ce..3e96ad4 100644 --- a/src/input/File.h +++ b/src/input/File.h @@ -37,7 +37,8 @@ namespace Inputs { class FileBase : public InputBase { public: virtual void open(const std::string& name); - virtual int readFrame(uint8_t* buffer, size_t size) = 0; + virtual size_t readFrame(uint8_t *buffer, size_t size) = 0; + virtual size_t readFrame(uint8_t *buffer, size_t size, uint32_t seconds, uint32_t tsta); virtual int setBitrate(int bitrate); virtual void close(); @@ -63,7 +64,7 @@ class FileBase : public InputBase { class MPEGFile : public FileBase { public: - virtual int readFrame(uint8_t* buffer, size_t size); + virtual size_t readFrame(uint8_t *buffer, size_t size); virtual int setBitrate(int bitrate); private: @@ -72,13 +73,13 @@ class MPEGFile : public FileBase { class RawFile : public FileBase { public: - virtual int readFrame(uint8_t* buffer, size_t size); + virtual size_t readFrame(uint8_t *buffer, size_t size); }; class PacketFile : public FileBase { public: PacketFile(bool enhancedPacketMode); - virtual int readFrame(uint8_t* buffer, size_t size); + virtual size_t readFrame(uint8_t *buffer, size_t size); protected: std::array m_packetData; -- cgit v1.2.3