+Input::Input(const string &stream_id)
+ : stream_id(stream_id),
+ has_metacube_header(false)
+{
+}
+
+void Input::run(const string &url)
+{
+ CURL *curl = curl_easy_init();
+ curl_easy_setopt(curl, CURLOPT_URL, STREAM_URL);
+ curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &Input::curl_callback_thunk);
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
+ curl_easy_perform(curl);
+}
+
+size_t Input::curl_callback_thunk(char *ptr, size_t size, size_t nmemb, void *userdata)