X-Git-Url: https://git.sesse.net/?p=cubemap;a=blobdiff_plain;f=input.cpp;h=25012a6bbad930f63a53914ed53fd0e9d8cc4fcf;hp=102207f955deabdc8861ffbd9798fcefd1542e29;hb=6544fa0ec3f3a501bcb89ea977756911bd7f3ebd;hpb=8a2129f4c808600d6151f724dcbd816188d3d1c6 diff --git a/input.cpp b/input.cpp index 102207f..25012a6 100644 --- a/input.cpp +++ b/input.cpp @@ -63,7 +63,6 @@ bool parse_url(const string &url, string *protocol, string *user, string *host, if (split == rest.size()) { // http://foo split_user_host(rest, user, host); - fprintf(stderr, "ooo user='%s' host='%s'\n", user->c_str(), host->c_str()); *port = *protocol; *path = "/"; return true; @@ -95,16 +94,19 @@ bool parse_url(const string &url, string *protocol, string *user, string *host, return true; } -Input *create_input(const std::string &url) +Input *create_input(const string &url, Input::Encoding encoding) { string protocol, user, host, port, path; if (!parse_url(url, &protocol, &user, &host, &port, &path)) { return NULL; } if (protocol == "http") { - return new HTTPInput(url); + return new HTTPInput(url, encoding); } if (protocol == "udp") { + if (encoding == Input::INPUT_ENCODING_METACUBE) { + return NULL; + } return new UDPInput(url); } return NULL;