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

Unified Diff: media/mojo/common/media_type_converters.cc

Issue 2388383002: media: Use IPC_STRUCT_TRAITS to convert SubsampleEntry for mojo (Closed)
Patch Set: fix build issues Created 4 years, 2 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/mojo/common/media_type_converters.h ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/common/media_type_converters.cc
diff --git a/media/mojo/common/media_type_converters.cc b/media/mojo/common/media_type_converters.cc
index 84f914e7036f717480096b0d2adb0cd4a09ef62c..d060a770b27b2eb4263bc469f928088350d6c10a 100644
--- a/media/mojo/common/media_type_converters.cc
+++ b/media/mojo/common/media_type_converters.cc
@@ -21,6 +21,7 @@
#include "media/base/demuxer_stream.h"
#include "media/base/encryption_scheme.h"
#include "media/base/media_keys.h"
+#include "media/base/subsample_entry.h"
#include "media/base/video_decoder_config.h"
#include "media/base/video_frame.h"
#include "media/mojo/common/mojo_shared_buffer_video_frame.h"
@@ -394,24 +395,6 @@ TypeConverter<media::EncryptionScheme, media::mojom::EncryptionSchemePtr>::
}
// static
-media::mojom::SubsampleEntryPtr
-TypeConverter<media::mojom::SubsampleEntryPtr, media::SubsampleEntry>::Convert(
- const media::SubsampleEntry& input) {
- media::mojom::SubsampleEntryPtr mojo_subsample_entry(
- media::mojom::SubsampleEntry::New());
- mojo_subsample_entry->clear_bytes = input.clear_bytes;
- mojo_subsample_entry->cypher_bytes = input.cypher_bytes;
- return mojo_subsample_entry;
-}
-
-// static
-media::SubsampleEntry
-TypeConverter<media::SubsampleEntry, media::mojom::SubsampleEntryPtr>::Convert(
- const media::mojom::SubsampleEntryPtr& input) {
- return media::SubsampleEntry(input->clear_bytes, input->cypher_bytes);
-}
-
-// static
media::mojom::DecryptConfigPtr
TypeConverter<media::mojom::DecryptConfigPtr, media::DecryptConfig>::Convert(
const media::DecryptConfig& input) {
@@ -420,7 +403,8 @@ TypeConverter<media::mojom::DecryptConfigPtr, media::DecryptConfig>::Convert(
mojo_decrypt_config->key_id = input.key_id();
mojo_decrypt_config->iv = input.iv();
mojo_decrypt_config->subsamples =
- Array<media::mojom::SubsampleEntryPtr>::From(input.subsamples());
+ Array<media::SubsampleEntry>::From(input.subsamples());
+
return mojo_decrypt_config;
}
« no previous file with comments | « media/mojo/common/media_type_converters.h ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698