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

Unified Diff: modules/rtp_rtcp/source/rtp_format_video_stereo.h

Issue 2951033003: [EXPERIMENTAL] Generic stereo codec with index header sending single frames
Patch Set: Rebase and add external codec support. Created 3 years, 3 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
Index: modules/rtp_rtcp/source/rtp_format_video_stereo.h
diff --git a/modules/rtp_rtcp/source/rtp_format_video_stereo.h b/modules/rtp_rtcp/source/rtp_format_video_stereo.h
new file mode 100644
index 0000000000000000000000000000000000000000..d966065bfce9161562914e5cb5eb370c55e5e1aa
--- /dev/null
+++ b/modules/rtp_rtcp/source/rtp_format_video_stereo.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+#ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_STEREO_H_
+#define WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_STEREO_H_
+
+#include <string>
+
+#include "common_types.h"
+#include "modules/rtp_rtcp/source/rtp_format.h"
+#include "modules/rtp_rtcp/source/rtp_format_vp9.h"
+#include "rtc_base/constructormagic.h"
+#include "typedefs.h"
+
+namespace webrtc {
+namespace RtpFormatVideoStereo {
+static const uint8_t kFirstPacketBit = 0x02;
+} // namespace RtpFormatVideoStereo
+
+class RtpPacketizerStereo : public RtpPacketizer {
+ public:
+ RtpPacketizerStereo(size_t max_payload_len,
+ size_t last_packet_reduction_len,
+ const RTPVideoTypeHeader* rtp_type_header,
+ const RTPVideoStereoInfo* stereoInfo);
+
+ virtual ~RtpPacketizerStereo();
+
+ // Returns total number of packets to be generated.
+ size_t SetPayloadData(const uint8_t* payload_data,
+ size_t payload_size,
+ const RTPFragmentationHeader* fragmentation) override;
+
+ // Get the next payload with generic payload header.
+ // Write payload and set marker bit of the |packet|.
+ // Returns true on success, false otherwise.
+ bool NextPacket(RtpPacketToSend* packet) override;
+
+ ProtectionType GetProtectionType();
+
+ StorageType GetStorageType(uint32_t retransmission_settings);
+
+ std::string ToString() override;
+
+ private:
+ const size_t max_payload_len_;
+ const size_t last_packet_reduction_len_;
+ uint8_t header_marker_;
+ std::unique_ptr<RtpPacketizer> packetizer_;
+ const RTPVideoStereoInfo* stereoInfo_;
+
+ RTC_DISALLOW_COPY_AND_ASSIGN(RtpPacketizerStereo);
+};
+
+class RtpDepacketizerStereo : public RtpDepacketizer {
+ public:
+ virtual ~RtpDepacketizerStereo() {}
+
+ bool Parse(ParsedPayload* parsed_payload,
+ const uint8_t* payload_data,
+ size_t payload_data_length) override;
+
+ private:
+ RtpDepacketizerVp9 depacketizer_;
+};
+} // namespace webrtc
+#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_FORMAT_VIDEO_STEREO_H_
« no previous file with comments | « modules/rtp_rtcp/source/rtp_format_h264_unittest.cc ('k') | modules/rtp_rtcp/source/rtp_format_video_stereo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698