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

Side by Side Diff: media/cast/framer/cast_message_builder.h

Issue 23467003: Added framer to cast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rtcp
Patch Set: Merge Created 7 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_receiver.gyp ('k') | media/cast/framer/cast_message_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Handles NACK list and manages ACK.
6
7 #ifndef MEDIA_CAST_FRAMER_CAST_MESSAGE_BUILDER_H_
8 #define MEDIA_CAST_FRAMER_CAST_MESSAGE_BUILDER_H_
9
10 #include <map>
11
12 #include "media/cast/framer/frame_id_map.h"
13 #include "media/cast/rtcp/rtcp.h"
14 #include "media/cast/rtp_common/rtp_defines.h"
15
16 namespace media {
17 namespace cast {
18
19 class RtpPayloadFeedback;
20
21 typedef std::map<uint8, base::TimeTicks> TimeLastNackMap;
22
23 class CastMessageBuilder {
24 public:
25 CastMessageBuilder(RtpPayloadFeedback* incoming_payload_feedback,
26 FrameIdMap* frame_id_map,
27 uint32 media_ssrc,
28 bool decoder_faster_than_max_frame_rate,
29 int max_unacked_frames);
30 ~CastMessageBuilder();
31
32 void CompleteFrameReceived(uint8 frame_id, bool is_key_frame);
33 bool TimeToSendNextCastMessage(base::TimeTicks* time_to_send);
34 void UpdateCastMessage();
35 void Reset();
36
37 void set_clock(base::TickClock* clock) {
38 clock_ = clock;
39 }
40
41 private:
42 bool UpdateAckMessage();
43 void BuildPacketList();
44 bool UpdateCastMessageInternal(RtcpCastMessage* message);
45
46 RtpPayloadFeedback* const cast_feedback_;
47
48 // CastMessageBuilder has only const access to the frame id mapper.
49 const FrameIdMap* const frame_id_map_;
50 const uint32 media_ssrc_;
51 const bool decoder_faster_than_max_frame_rate_;
52 const int max_unacked_frames_;
53
54 RtcpCastMessage cast_msg_;
55 base::TimeTicks last_update_time_;
56 bool waiting_for_key_frame_;
57
58 TimeLastNackMap time_last_nacked_map_;
59
60 bool slowing_down_ack_;
61 bool acked_last_frame_;
62 uint8 last_acked_frame_id_;
63
64 scoped_ptr<base::TickClock> default_tick_clock_;
65 base::TickClock* clock_;
66
67 DISALLOW_COPY_AND_ASSIGN(CastMessageBuilder);
68 };
69
70 } // namespace cast
71 } // namespace media
72
73 #endif // MEDIA_CAST_FRAMER_CAST_MESSAGE_BUILDER_H_
OLDNEW
« no previous file with comments | « media/cast/cast_receiver.gyp ('k') | media/cast/framer/cast_message_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698