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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format.cc

Issue 2558453002: Revert of H.264 packetization mode 0 (try 3) (Closed)
Patch Set: Created 4 years 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
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h" 11 #include "webrtc/modules/rtp_rtcp/source/rtp_format.h"
12 12
13 #include <utility>
14
15 #include "webrtc/modules/rtp_rtcp/source/rtp_format_h264.h" 13 #include "webrtc/modules/rtp_rtcp/source/rtp_format_h264.h"
16 #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h" 14 #include "webrtc/modules/rtp_rtcp/source/rtp_format_video_generic.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h" 15 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp8.h"
18 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h" 16 #include "webrtc/modules/rtp_rtcp/source/rtp_format_vp9.h"
19 17
20 namespace webrtc { 18 namespace webrtc {
21 RtpPacketizer* RtpPacketizer::Create(RtpVideoCodecTypes type, 19 RtpPacketizer* RtpPacketizer::Create(RtpVideoCodecTypes type,
22 size_t max_payload_len, 20 size_t max_payload_len,
23 const RTPVideoTypeHeader* rtp_type_header, 21 const RTPVideoTypeHeader* rtp_type_header,
24 FrameType frame_type) { 22 FrameType frame_type) {
25 switch (type) { 23 switch (type) {
26 case kRtpVideoH264: 24 case kRtpVideoH264:
27 RTC_CHECK(rtp_type_header); 25 return new RtpPacketizerH264(frame_type, max_payload_len);
28 return new RtpPacketizerH264(max_payload_len,
29 rtp_type_header->H264.packetization_mode);
30 case kRtpVideoVp8: 26 case kRtpVideoVp8:
31 RTC_CHECK(rtp_type_header); 27 assert(rtp_type_header != NULL);
32 return new RtpPacketizerVp8(rtp_type_header->VP8, max_payload_len); 28 return new RtpPacketizerVp8(rtp_type_header->VP8, max_payload_len);
33 case kRtpVideoVp9: 29 case kRtpVideoVp9:
34 RTC_CHECK(rtp_type_header); 30 assert(rtp_type_header != NULL);
35 return new RtpPacketizerVp9(rtp_type_header->VP9, max_payload_len); 31 return new RtpPacketizerVp9(rtp_type_header->VP9, max_payload_len);
36 case kRtpVideoGeneric: 32 case kRtpVideoGeneric:
37 return new RtpPacketizerGeneric(frame_type, max_payload_len); 33 return new RtpPacketizerGeneric(frame_type, max_payload_len);
38 case kRtpVideoNone: 34 case kRtpVideoNone:
39 RTC_NOTREACHED(); 35 assert(false);
40 } 36 }
41 return NULL; 37 return NULL;
42 } 38 }
43 39
44 RtpDepacketizer* RtpDepacketizer::Create(RtpVideoCodecTypes type) { 40 RtpDepacketizer* RtpDepacketizer::Create(RtpVideoCodecTypes type) {
45 switch (type) { 41 switch (type) {
46 case kRtpVideoH264: 42 case kRtpVideoH264:
47 return new RtpDepacketizerH264(); 43 return new RtpDepacketizerH264();
48 case kRtpVideoVp8: 44 case kRtpVideoVp8:
49 return new RtpDepacketizerVp8(); 45 return new RtpDepacketizerVp8();
50 case kRtpVideoVp9: 46 case kRtpVideoVp9:
51 return new RtpDepacketizerVp9(); 47 return new RtpDepacketizerVp9();
52 case kRtpVideoGeneric: 48 case kRtpVideoGeneric:
53 return new RtpDepacketizerGeneric(); 49 return new RtpDepacketizerGeneric();
54 case kRtpVideoNone: 50 case kRtpVideoNone:
55 assert(false); 51 assert(false);
56 } 52 }
57 return NULL; 53 return NULL;
58 } 54 }
59 } // namespace webrtc 55 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/include/module_common_types.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_format_h264.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698