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

Unified Diff: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix usage of uninitialized data Created 3 years, 8 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: webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
index ea6f9dbc9c140c24504ca3aaf98f40071e601216..ab082d5ca225b0c626f6637780cb97d7b7d03c62 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
+++ b/webrtc/modules/rtp_rtcp/source/rtp_header_extensions.h
@@ -12,6 +12,7 @@
#include <stdint.h>
+#include "webrtc/api/video/video_content_type.h"
#include "webrtc/api/video/video_rotation.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@@ -96,5 +97,17 @@ class PlayoutDelayLimits {
static bool Write(uint8_t* data, const PlayoutDelay& playout_delay);
};
+class VideoContentTypeExtension {
+ public:
+ static constexpr RTPExtensionType kId = kRtpExtensionVideoContentType;
+ static constexpr uint8_t kValueSizeBytes = 1;
+ // TODO(ilnik): Think of a better URI.
+ static constexpr const char* kUri =
+ "http://www.webrtc.org/experiments/rtp-hdrext/video-content-type";
+
+ static bool Parse(const uint8_t* data, VideoContentType* content_type);
+ static bool Write(uint8_t* data, VideoContentType content_type);
+};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_RTP_HEADER_EXTENSIONS_H_

Powered by Google App Engine
This is Rietveld 408576698