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

Unified Diff: media/base/codec.cc

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
« no previous file with comments | « media/base/codec.h ('k') | media/base/mediaconstants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/codec.cc
diff --git a/media/base/codec.cc b/media/base/codec.cc
index b5a68efb6b7c31f93d49b480eca4a6f95107bb8f..45a60d69db5eeb8444a6ee44e9a36449b91a92b9 100644
--- a/media/base/codec.cc
+++ b/media/base/codec.cc
@@ -263,6 +263,19 @@ VideoCodec VideoCodec::CreateRtxCodec(int rtx_payload_type,
return rtx_codec;
}
+// static
+VideoCodec VideoCodec::CreateStereoCodec(int stereo_payload_type,
+ const VideoCodec& codec) {
+ VideoCodec stereo_codec(stereo_payload_type, kStereoCodecName);
+ stereo_codec.SetParam(kCodecParamAssociatedPayloadType, codec.id);
+ return stereo_codec;
+}
+
+// static
+bool VideoCodec::IsStereoCodec(const VideoCodec& codec) {
+ return CodecNamesEq(codec.name.c_str(), kStereoCodecName);
+}
+
VideoCodec::CodecType VideoCodec::GetCodecType() const {
const char* payload_name = name.c_str();
if (_stricmp(payload_name, kRedCodecName) == 0) {
« no previous file with comments | « media/base/codec.h ('k') | media/base/mediaconstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698