Index: webrtc/modules/include/module_common_types.h |
diff --git a/webrtc/modules/include/module_common_types.h b/webrtc/modules/include/module_common_types.h |
index 23ed8f40bffc9f380a1f6f91683e4d248ae487a2..2e5f63df9be6d27720ebb918ce48a8b5d6e68812 100644 |
--- a/webrtc/modules/include/module_common_types.h |
+++ b/webrtc/modules/include/module_common_types.h |
@@ -18,6 +18,7 @@ |
#include <limits> |
#include "webrtc/api/video/video_rotation.h" |
+#include "webrtc/common_video/include/video_frame.h" |
#include "webrtc/common_types.h" |
#include "webrtc/modules/video_coding/codecs/h264/include/h264_globals.h" |
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_globals.h" |
@@ -30,6 +31,8 @@ |
namespace webrtc { |
+const size_t kMaxNumberOfStereoFrames = 8; |
+ |
struct RTPAudioHeader { |
uint8_t numEnergy; // number of valid entries in arrOfEnergy |
uint8_t arrOfEnergy[kRtpCsrcSize]; // one energy byte (0-9) per channel |
@@ -37,19 +40,34 @@ struct RTPAudioHeader { |
size_t channel; // number of channels 2 = stereo |
}; |
-union RTPVideoTypeHeader { |
- RTPVideoHeaderVP8 VP8; |
- RTPVideoHeaderVP9 VP9; |
- RTPVideoHeaderH264 H264; |
-}; |
- |
enum RtpVideoCodecTypes { |
kRtpVideoNone, |
kRtpVideoGeneric, |
+ kRtpVideoStereo, |
kRtpVideoVp8, |
kRtpVideoVp9, |
kRtpVideoH264 |
}; |
+ |
+struct RTPVideoHeader; |
+class RTPFragmentationHeader; // forward declaration |
+ |
+struct RTPVideoStereoInfo { |
+ // RTPVideoStereoInfo() : num_frames(0) {} |
+ // dtor to clean encoded_images |
+ RtpVideoCodecTypes stereoCodecType; |
+ uint8_t num_frames; |
+ uint8_t frame_index; |
+ const EncodedImage* encoded_images[kMaxNumberOfStereoFrames]; |
+ const RTPVideoHeader* rtp_video_headers[kMaxNumberOfStereoFrames]; |
+ const RTPFragmentationHeader* fragmentations[kMaxNumberOfStereoFrames]; |
+}; |
+ |
+union RTPVideoTypeHeader { |
+ RTPVideoHeaderVP8 VP8; |
+ RTPVideoHeaderVP9 VP9; |
+ RTPVideoHeaderH264 H264; |
+}; |
// Since RTPVideoHeader is used as a member of a union, it can't have a |
// non-trivial default constructor. |
struct RTPVideoHeader { |
@@ -68,7 +86,9 @@ struct RTPVideoHeader { |
// this frame, 0 if not using simulcast. |
RtpVideoCodecTypes codec; |
RTPVideoTypeHeader codecHeader; |
+ RTPVideoStereoInfo stereoInfo; |
}; |
+ |
union RTPTypeHeader { |
RTPAudioHeader Audio; |
RTPVideoHeader Video; |