Refer to streams internally mostly by an index, not the stream_id.
[cubemap] / stream.cpp
index 37961fa..9922655 100644 (file)
@@ -15,8 +15,8 @@
 
 using namespace std;
 
-Stream::Stream(const string &stream_id, size_t backlog_size, Encoding encoding)
-       : stream_id(stream_id),
+Stream::Stream(const string &url, size_t backlog_size, Encoding encoding)
+       : url(url),
          encoding(encoding),
          data_fd(make_tempfile("")),
           backlog_size(backlog_size),
@@ -36,7 +36,7 @@ Stream::~Stream()
 }
 
 Stream::Stream(const StreamProto &serialized, int data_fd)
-       : stream_id(serialized.stream_id()),
+       : url(serialized.url()),
          http_header(serialized.http_header()),
          stream_header(serialized.stream_header()),
          encoding(Stream::STREAM_ENCODING_RAW),  // Will be changed later.
@@ -71,7 +71,7 @@ StreamProto Stream::serialize()
        serialized.add_data_fds(data_fd);
        serialized.set_backlog_size(backlog_size);
        serialized.set_bytes_received(bytes_received);
-       serialized.set_stream_id(stream_id);
+       serialized.set_url(url);
        data_fd = -1;
        return serialized;
 }