bool should_quit = false; // Under <buffer_mutex>.
std::condition_variable has_buffered_data;
std::deque<std::string> buffered_data; // Protected by <buffer_mutex>.
- size_t used_of_buffered_data = 0; // How many bytes of the first element of <buffered_data> that is already used. Protected by <mutex>.
+ size_t used_of_buffered_data = 0; // How many bytes of the first element of <buffered_data> that is already used. Protected by <buffer_mutex>.
+ size_t buffered_data_bytes = 0; // The sum of all size() in buffered_data. Protected by <buffer_mutex>.
size_t seen_keyframe = false;
StreamType stream_type;
};