-class Input {
-public:
- Input(const std::string &stream_id, const std::string &url);
-
- // Connect to the given URL and start streaming.
- void run();
-
- // Stop streaming. NOTE: Does not currently work!
- void stop();
-
-private:
- // Recovers the this pointer and calls do_work().
- static void *do_work_thunk(void *arg);
-
- // Actually does the download.
- void do_work();
-
- // Recovers the this pointer and calls curl_callback().
- static size_t curl_callback_thunk(char *ptr, size_t size, size_t nmemb, void *userdata);