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

Side by Side Diff: media/cast/net/rtp/framer.cc

Issue 555563003: Cast: Flow hw encoder initialization error to extensions API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed compile Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « media/cast/cast_sender_impl.cc ('k') | media/cast/sender/external_video_encoder.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/cast/net/rtp/framer.h" 5 #include "media/cast/net/rtp/framer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace media { 9 namespace media {
10 namespace cast { 10 namespace cast {
(...skipping 26 matching lines...) Expand all
37 const RtpCastHeader& rtp_header, 37 const RtpCastHeader& rtp_header,
38 bool* duplicate) { 38 bool* duplicate) {
39 *duplicate = false; 39 *duplicate = false;
40 uint32 frame_id = rtp_header.frame_id; 40 uint32 frame_id = rtp_header.frame_id;
41 41
42 if (rtp_header.is_key_frame && waiting_for_key_) { 42 if (rtp_header.is_key_frame && waiting_for_key_) {
43 last_released_frame_ = static_cast<uint32>(frame_id - 1); 43 last_released_frame_ = static_cast<uint32>(frame_id - 1);
44 waiting_for_key_ = false; 44 waiting_for_key_ = false;
45 } 45 }
46 46
47 VLOG(0) << "InsertPacket frame:" << frame_id 47 VLOG(1) << "InsertPacket frame:" << frame_id
48 << " packet:" << static_cast<int>(rtp_header.packet_id) 48 << " packet:" << static_cast<int>(rtp_header.packet_id)
49 << " max packet:" << static_cast<int>(rtp_header.max_packet_id); 49 << " max packet:" << static_cast<int>(rtp_header.max_packet_id);
50 50
51 if (IsOlderFrameId(frame_id, last_released_frame_) && !waiting_for_key_) { 51 if (IsOlderFrameId(frame_id, last_released_frame_) && !waiting_for_key_) {
52 // Packet is too old. 52 // Packet is too old.
53 return false; 53 return false;
54 } 54 }
55 55
56 // Update the last received frame id. 56 // Update the last received frame id.
57 if (IsNewerFrameId(frame_id, newest_frame_id_)) { 57 if (IsNewerFrameId(frame_id, newest_frame_id_)) {
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 // Do we have the reference frame? 279 // Do we have the reference frame?
280 if (IsOlderFrameId(frame->last_referenced_frame_id(), last_released_frame_)) { 280 if (IsOlderFrameId(frame->last_referenced_frame_id(), last_released_frame_)) {
281 return true; 281 return true;
282 } 282 }
283 return frame->last_referenced_frame_id() == last_released_frame_; 283 return frame->last_referenced_frame_id() == last_released_frame_;
284 } 284 }
285 285
286 286
287 } // namespace cast 287 } // namespace cast
288 } // namespace media 288 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/cast_sender_impl.cc ('k') | media/cast/sender/external_video_encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698