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

Side by Side Diff: media/cast/transport/rtp_sender/rtp_packetizer/rtp_packetizer.h

Issue 100823015: Cast: move net->transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating transport callback Created 6 years, 12 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 #ifndef MEDIA_CAST_NET_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ 5 #ifndef MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_
6 #define MEDIA_CAST_NET_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ 6 #define MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
11 11
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/cast/net/rtp_sender/packet_storage/packet_storage.h" 13 #include "media/cast/transport/rtp_sender/packet_storage/packet_storage.h"
14 #include "media/cast/net/rtp_sender/rtp_packetizer/rtp_packetizer_config.h"
15 14
16 namespace media { 15 namespace media {
17 namespace cast { 16 namespace cast {
17 namespace transport {
18 18
19 class PacedPacketSender; 19 class PacedPacketSender;
20 20
21 struct RtpPacketizerConfig {
22 RtpPacketizerConfig();
23 ~RtpPacketizerConfig();
24
25 // General.
26 bool audio;
27 int payload_type;
28 uint16 max_payload_length;
29 uint16 sequence_number;
30 uint32 rtp_timestamp;
31 int frequency;
32
33 // SSRC.
34 unsigned int ssrc;
35
36 // Video.
37 VideoCodec video_codec;
38
39 // Audio.
40 uint8 channels;
41 AudioCodec audio_codec;
42 };
43
21 // This object is only called from the main cast thread. 44 // This object is only called from the main cast thread.
22 // This class break encoded audio and video frames into packets and add an RTP 45 // This class break encoded audio and video frames into packets and add an RTP
23 // header to each packet. 46 // header to each packet.
24 class RtpPacketizer { 47 class RtpPacketizer {
25 public: 48 public:
26 RtpPacketizer(PacedPacketSender* transport, 49 RtpPacketizer(PacedPacketSender* transport,
27 PacketStorage* packet_storage, 50 PacketStorage* packet_storage,
28 RtpPacketizerConfig rtp_packetizer_config); 51 RtpPacketizerConfig rtp_packetizer_config);
29 ~RtpPacketizer(); 52 ~RtpPacketizer();
30 53
(...skipping 29 matching lines...) Expand all
60 83
61 base::TimeTicks time_last_sent_rtp_timestamp_; 84 base::TimeTicks time_last_sent_rtp_timestamp_;
62 uint16 sequence_number_; 85 uint16 sequence_number_;
63 uint32 rtp_timestamp_; 86 uint32 rtp_timestamp_;
64 uint16 packet_id_; 87 uint16 packet_id_;
65 88
66 int send_packets_count_; 89 int send_packets_count_;
67 size_t send_octet_count_; 90 size_t send_octet_count_;
68 }; 91 };
69 92
93 } // namespace transport
70 } // namespace cast 94 } // namespace cast
71 } // namespace media 95 } // namespace media
72 96
73 #endif // MEDIA_CAST_NET_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_ 97 #endif // MEDIA_CAST_TRANSPORT_RTP_SENDER_RTP_PACKETIZER_RTP_PACKETIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698