Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1368)

Unified Diff: media/cast/framer/frame_id_map.cc

Issue 289483003: Cast: Only ACK decodable frames (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/cast/framer/frame_id_map.cc
diff --git a/media/cast/framer/frame_id_map.cc b/media/cast/framer/frame_id_map.cc
index f93fb85125cfe35ba1a36f57940920932d5bbebb..2687a4aca250c269a94341a771dcbeb70e16850b 100644
--- a/media/cast/framer/frame_id_map.cc
+++ b/media/cast/framer/frame_id_map.cc
@@ -137,6 +137,22 @@ bool FrameIdMap::NextContinuousFrame(uint32* frame_id) const {
return false;
}
+bool FrameIdMap::HaveMultipleDecodableFrames() const {
+ // Find the oldest decodable frame.
+ FrameMap::const_iterator it;
+ bool found_one = false;
+ for (it = frame_map_.begin(); it != frame_map_.end(); ++it) {
+ if (it->second->Complete() && DecodableVideoFrame(it->second.get())) {
+ if (found_one) {
+ return true;
+ } else {
+ found_one = true;
+ }
+ }
+ }
+ return false;
+}
+
uint32 FrameIdMap::LastContinuousFrame() const {
uint32 last_continuous_frame_id = last_released_frame_;
uint32 next_expected_frame = last_released_frame_;

Powered by Google App Engine
This is Rietveld 408576698