X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=input.h;h=8b536c47f32d644e4c7e195b12420c5bbc26a201;hb=e20ad47985bdda71b7b58c26932dad9a3a50c066;hp=8a26ce6d1baad5887fe2b7831618c0fb0304ef9c;hpb=fbfb955ee7233030357ec32c0d613f9279700d70;p=cubemap diff --git a/input.h b/input.h index 8a26ce6..8b536c4 100644 --- a/input.h +++ b/input.h @@ -4,16 +4,24 @@ #include #include +class InputProto; + class Input { public: Input(const std::string &stream_id, const std::string &url); + // Serialization/deserialization. + Input(const InputProto &serialized); + InputProto serialize() const; + // Connect to the given URL and start streaming. void run(); // Stops the streaming, but lets the file descriptor stay open. void stop(); + std::string get_url() const { return url; } + private: // Recovers the this pointer and calls do_work(). static void *do_work_thunk(void *arg);