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

Side by Side Diff: modules/include/module_common_types.h

Issue 2951033003: [EXPERIMENTAL] Generic stereo codec with index header sending single frames
Patch Set: Rebase and add external codec support. Created 3 years, 2 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/engine/webrtcvideoengine.cc ('k') | modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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
(...skipping 20 matching lines...) Expand all
31 31
32 namespace webrtc { 32 namespace webrtc {
33 33
34 struct RTPAudioHeader { 34 struct RTPAudioHeader {
35 uint8_t numEnergy; // number of valid entries in arrOfEnergy 35 uint8_t numEnergy; // number of valid entries in arrOfEnergy
36 uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel 36 uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel
37 bool isCNG; // is this CNG 37 bool isCNG; // is this CNG
38 size_t channel; // number of channels 2 = stereo 38 size_t channel; // number of channels 2 = stereo
39 }; 39 };
40 40
41 enum RtpVideoCodecTypes {
42 kRtpVideoNone,
43 kRtpVideoGeneric,
44 kRtpVideoStereo,
45 kRtpVideoVp8,
46 kRtpVideoVp9,
47 kRtpVideoH264
48 };
49
50 struct RTPVideoStereoInfo {
51 RtpVideoCodecTypes stereoCodecType;
52 uint8_t frameIndex;
53 uint8_t frameCount;
54 uint64_t pictureIndex;
55 };
56
41 union RTPVideoTypeHeader { 57 union RTPVideoTypeHeader {
42 RTPVideoHeaderVP8 VP8; 58 RTPVideoHeaderVP8 VP8;
43 RTPVideoHeaderVP9 VP9; 59 RTPVideoHeaderVP9 VP9;
44 RTPVideoHeaderH264 H264; 60 RTPVideoHeaderH264 H264;
45 }; 61 };
46
47 enum RtpVideoCodecTypes {
48 kRtpVideoNone,
49 kRtpVideoGeneric,
50 kRtpVideoVp8,
51 kRtpVideoVp9,
52 kRtpVideoH264
53 };
54 // Since RTPVideoHeader is used as a member of a union, it can't have a 62 // Since RTPVideoHeader is used as a member of a union, it can't have a
55 // non-trivial default constructor. 63 // non-trivial default constructor.
56 struct RTPVideoHeader { 64 struct RTPVideoHeader {
57 uint16_t width; // size 65 uint16_t width; // size
58 uint16_t height; 66 uint16_t height;
59 VideoRotation rotation; 67 VideoRotation rotation;
60 68
61 PlayoutDelay playout_delay; 69 PlayoutDelay playout_delay;
62 70
63 VideoContentType content_type; 71 VideoContentType content_type;
64 72
65 VideoSendTiming video_timing; 73 VideoSendTiming video_timing;
66 74
67 bool is_first_packet_in_frame; 75 bool is_first_packet_in_frame;
68 uint8_t simulcastIdx; // Index if the simulcast encoder creating 76 uint8_t simulcastIdx; // Index if the simulcast encoder creating
69 // this frame, 0 if not using simulcast. 77 // this frame, 0 if not using simulcast.
70 RtpVideoCodecTypes codec; 78 RtpVideoCodecTypes codec;
71 RTPVideoTypeHeader codecHeader; 79 RTPVideoTypeHeader codecHeader;
80 RTPVideoStereoInfo stereoInfo;
72 }; 81 };
82
73 union RTPTypeHeader { 83 union RTPTypeHeader {
74 RTPAudioHeader Audio; 84 RTPAudioHeader Audio;
75 RTPVideoHeader Video; 85 RTPVideoHeader Video;
76 }; 86 };
77 87
78 struct WebRtcRTPHeader { 88 struct WebRtcRTPHeader {
79 RTPHeader header; 89 RTPHeader header;
80 FrameType frameType; 90 FrameType frameType;
81 RTPTypeHeader type; 91 RTPTypeHeader type;
82 // NTP time of the capture time in local timebase in milliseconds. 92 // NTP time of the capture time in local timebase in milliseconds.
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 static constexpr int kNotAProbe = -1; 679 static constexpr int kNotAProbe = -1;
670 int send_bitrate_bps = -1; 680 int send_bitrate_bps = -1;
671 int probe_cluster_id = kNotAProbe; 681 int probe_cluster_id = kNotAProbe;
672 int probe_cluster_min_probes = -1; 682 int probe_cluster_min_probes = -1;
673 int probe_cluster_min_bytes = -1; 683 int probe_cluster_min_bytes = -1;
674 }; 684 };
675 685
676 } // namespace webrtc 686 } // namespace webrtc
677 687
678 #endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_ 688 #endif // MODULES_INCLUDE_MODULE_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « media/engine/webrtcvideoengine.cc ('k') | modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698