33 int64_t bytes = number_of_frames * (height * width * 4 + (sample_rate * channels * 4));
43 const std::lock_guard<std::recursive_mutex> lock(*
cacheMutex);
49 Json::Value ranges = Json::Value(Json::arrayValue);
54 std::vector<int64_t>::iterator itr_ordered;
56 int64_t starting_frame = 0;
57 int64_t ending_frame = 0;
64 int64_t frame_number = *itr_ordered;
65 if (frame_number - ending_frame > 1) {
71 range[
"start"] = std::to_string(starting_frame);
72 range[
"end"] = std::to_string(ending_frame);
76 starting_frame = frame_number;
80 ending_frame = frame_number;
89 range[
"start"] = std::to_string(starting_frame);
90 range[
"end"] = std::to_string(ending_frame);
106 std::stringstream max_bytes_stream;
108 root[
"max_bytes"] = max_bytes_stream.str();
118 if (!root[
"max_bytes"].isNull())
119 max_bytes = std::stoll(root[
"max_bytes"].asString());