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

Unified Diff: webrtc/modules/include/module_common_types.h

Issue 2990463002: [EXPERIMENTAL] Generic stereo codec with index header sending merged frames
Patch Set: Created 3 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine.cc ('k') | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine.cc ('k') | webrtc/modules/rtp_rtcp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698