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

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: 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
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 // Handle NACK list and manage ACK.
Alpha Left Google 2013/08/28 00:27:31 nit: *Handles and *manages.
pwestin 2013/08/28 16:40:44 Done.
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 class CastMessageBuilder {
22 public:
23 CastMessageBuilder(RtpPayloadFeedback* incoming_payload_feedback,
24 FrameIdMap* frame_id_map,
25 uint32 media_ssrc,
Alpha Left Google 2013/08/28 00:27:31 nit: this can go to the previous line i think.
pwestin 2013/08/28 16:40:44 yes, however I think this is much more readable; o
26 bool decoder_faster_than_max_frame_rate,
27 int max_unacked_frames);
28 ~CastMessageBuilder();
29
30 void CompleteFrameReceived(uint8 frame_id, bool is_key_frame);
31 bool TimeToSendNextCastMessage(base::TimeTicks* time_to_send);
32 void UpdateCastMessage();
33 void Reset();
34
35 void set_clock(base::TickClock* clock) {
36 clock_ = clock;
37 }
38
39 private:
40 bool UpdateAckMessage();
41 void BuildPacketList();
42 bool UpdateCastMessageInternal(RtcpCastMessage* message);
43
44 RtpPayloadFeedback* const cast_feedback_;
45
46 // CastMessageBuilder has only const access to the frame id mapper.
47 const FrameIdMap* const frame_id_map_;
48 const uint32 media_ssrc_;
49 const bool decoder_faster_than_max_frame_rate_;
50 const int max_unacked_frames_;
51
52 RtcpCastMessage cast_msg_;
53 base::TimeTicks last_update_time_;
54 bool waiting_for_key_frame_;
55
56 std::map<uint8, base::TimeTicks> time_last_nacked_map_;
Alpha Left Google 2013/08/28 00:27:31 nit: Use a typedef here.
pwestin 2013/08/28 16:40:44 Done.
57
58 bool slowing_down_ack_;
59 bool acked_last_frame_;
60 uint8 last_acked_frame_id_;
61
62 scoped_ptr<base::TickClock> default_tick_clock_;
63 base::TickClock* clock_;
64
65 DISALLOW_COPY_AND_ASSIGN(CastMessageBuilder);
66 };
67
68 } // namespace cast
69 } // namespace media
70
71 #endif // MEDIA_CAST_FRAMER_CAST_MESSAGE_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698