7 #ifndef MEDIA_FILE_UDP_FILE_H_
8 #define MEDIA_FILE_UDP_FILE_H_
20 #include <packager/file.h>
21 #include <packager/macros/classes.h>
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 void CloseForWriting()
override;
38 int64_t Size()
override;
39 bool Flush()
override;
40 bool Seek(uint64_t position)
override;
41 bool Tell(uint64_t* position)
override;
53 bool wsa_started_ =
false;
56 DISALLOW_COPY_AND_ASSIGN(
UdpFile);
Implements UdpFile, which receives UDP unicast and multicast streams.
UdpFile(const char *address_and_port)
All the methods that are virtual are virtual for mocking.