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

Side by Side Diff: media/cast/framer/frame_buffer.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/framer/cast_message_builder_unittest.cc ('k') | media/cast/framer/frame_buffer.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 #ifndef MEDIA_CAST_FRAMER_FRAME_BUFFER
6 #define MEDIA_CAST_FRAMER_FRAME_BUFFER
7
8 #include <map>
9 #include <vector>
10
11 #include "media/cast/cast_config.h"
12 #include "media/cast/rtp_common/rtp_defines.h"
13
14 namespace media {
15 namespace cast {
16
17 typedef std::map<uint16, std::vector<uint8> > PacketMap;
18
19 class FrameBuffer {
20 public:
21 FrameBuffer();
22 ~FrameBuffer();
23 void InsertPacket(const uint8* payload_data,
24 int payload_size,
25 const RtpCastHeader& rtp_header);
26 bool Complete() const;
27
28 bool GetEncodedAudioFrame(EncodedAudioFrame* audio_frame,
29 uint32* rtp_timestamp) const;
30
31 bool GetEncodedVideoFrame(EncodedVideoFrame* video_frame,
32 uint32* rtp_timestamp) const;
33
34 bool is_key_frame() const { return is_key_frame_; }
35 uint8 frame_id() const { return frame_id_; }
36 uint8 last_referenced_frame_id() const { return last_referenced_frame_id_; }
37
38 private:
39 uint8 frame_id_;
40 uint16 max_packet_id_;
41 uint16 num_packets_received_;
42 bool is_key_frame_;
43 int total_data_size_;
44 uint8 last_referenced_frame_id_;
45 uint32 rtp_timestamp_;
46 PacketMap packets_;
47
48 DISALLOW_COPY_AND_ASSIGN(FrameBuffer);
49 };
50
51 } // namespace cast
52 } // namespace media
53
54 #endif // MEDIA_CAST_FRAMER_FRAME_BUFFER
OLDNEW
« no previous file with comments | « media/cast/framer/cast_message_builder_unittest.cc ('k') | media/cast/framer/frame_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698