7 #ifndef MEDIA_FILE_UDP_FILE_H_ 8 #define MEDIA_FILE_UDP_FILE_H_ 14 #include "packager/base/compiler_specific.h" 15 #include "packager/file/file.h" 21 #endif // defined(OS_WIN) 30 explicit UdpFile(
const char* address_and_port);
34 bool Close()
override;
35 int64_t
Read(
void* buffer, uint64_t length)
override;
36 int64_t
Write(
const void* buffer, uint64_t length)
override;
37 int64_t
Size()
override;
38 bool Flush()
override;
39 bool Seek(uint64_t position)
override;
40 bool Tell(uint64_t* position)
override;
51 DISALLOW_COPY_AND_ASSIGN(
UdpFile);
56 #endif // MEDIA_FILE_UDP_FILE_H_ int64_t Read(void *buffer, uint64_t length) override
bool Tell(uint64_t *position) override
bool Seek(uint64_t position) override
UdpFile(const char *address_and_port)
Define an abstract file interface.
int64_t Write(const void *buffer, uint64_t length) override
All the methods that are virtual are virtual for mocking.
Implements UdpFile, which receives UDP unicast and multicast streams.
bool Open() override
Internal open. Should not be used directly.