working on streaming and clients

This commit is contained in:
brunoherbelin
2020-10-20 00:28:44 +02:00
parent 15285ec151
commit 27239b7513
15 changed files with 254 additions and 96 deletions

View File

@@ -9,18 +9,21 @@ class NetworkStream : public Stream
public:
NetworkStream();
void open(NetworkToolkit::Protocol protocol, const std::string &address, uint port );
void open(NetworkToolkit::Protocol protocol, const std::string &host, uint port );
bool ping(int *w, int *h);
glm::ivec2 resolution();
inline NetworkToolkit::Protocol protocol() const { return protocol_; }
inline std::string address() const { return address_; }
inline std::string host() const { return host_; }
inline uint port() const { return port_; }
private:
NetworkToolkit::Protocol protocol_;
std::string address_;
std::string host_;
uint port_;
static GstFlowReturn callback_sample (GstAppSink *, gpointer );
};
class NetworkSource : public StreamSource
@@ -36,7 +39,7 @@ public:
// specific interface
NetworkStream *networkstream() const;
void connect(NetworkToolkit::Protocol protocol, const std::string &address, uint port);
void connect(NetworkToolkit::Protocol protocol, const std::string &address);
glm::ivec2 icon() const override { return glm::ivec2(11, 8); }