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

Unified Diff: media/remoting/rpc/proto_enum_utils.h

Issue 2643253003: Media Remoting Clean-up: Less-redundant naming, style consistency, etc. (Closed)
Patch Set: REBASE Created 3 years, 11 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/remoting/rpc.proto ('k') | media/remoting/rpc/proto_enum_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/remoting/rpc/proto_enum_utils.h
diff --git a/media/remoting/rpc/proto_enum_utils.h b/media/remoting/rpc/proto_enum_utils.h
deleted file mode 100644
index 19dee912f1a1fd207b32fb6313a98e2d75ca996d..0000000000000000000000000000000000000000
--- a/media/remoting/rpc/proto_enum_utils.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef MEDIA_REMOTING_RPC_PROTO_ENUM_UTILS_H_
-#define MEDIA_REMOTING_RPC_PROTO_ENUM_UTILS_H_
-
-#include "base/optional.h"
-#include "media/base/audio_codecs.h"
-#include "media/base/buffering_state.h"
-#include "media/base/cdm_key_information.h"
-#include "media/base/cdm_promise.h"
-#include "media/base/channel_layout.h"
-#include "media/base/content_decryption_module.h"
-#include "media/base/demuxer_stream.h"
-#include "media/base/encryption_scheme.h"
-#include "media/base/sample_format.h"
-#include "media/base/video_codecs.h"
-#include "media/base/video_types.h"
-#include "media/remoting/remoting_rpc_message.pb.h"
-
-namespace media {
-namespace remoting {
-
-// The following functions map between the enum values in media/base modules and
-// the equivalents in the media/remoting protobuf classes. The purpose of these
-// converters is to decouple the media/base modules from the media/remoting
-// modules while maintaining compile-time checks to ensure that there are always
-// valid, backwards-compatible mappings between the two.
-//
-// Each returns a base::Optional value. If it is not set, that indicates the
-// conversion failed.
-
-base::Optional<::media::EncryptionScheme::CipherMode>
-ToMediaEncryptionSchemeCipherMode(pb::EncryptionScheme::CipherMode value);
-base::Optional<pb::EncryptionScheme::CipherMode>
-ToProtoEncryptionSchemeCipherMode(::media::EncryptionScheme::CipherMode value);
-
-base::Optional<::media::AudioCodec> ToMediaAudioCodec(
- pb::AudioDecoderConfig::Codec value);
-base::Optional<pb::AudioDecoderConfig::Codec> ToProtoAudioDecoderConfigCodec(
- ::media::AudioCodec value);
-
-base::Optional<::media::SampleFormat> ToMediaSampleFormat(
- pb::AudioDecoderConfig::SampleFormat value);
-base::Optional<pb::AudioDecoderConfig::SampleFormat>
-ToProtoAudioDecoderConfigSampleFormat(::media::SampleFormat value);
-
-base::Optional<::media::ChannelLayout> ToMediaChannelLayout(
- pb::AudioDecoderConfig::ChannelLayout value);
-base::Optional<pb::AudioDecoderConfig::ChannelLayout>
-ToProtoAudioDecoderConfigChannelLayout(::media::ChannelLayout value);
-
-base::Optional<::media::VideoCodec> ToMediaVideoCodec(
- pb::VideoDecoderConfig::Codec value);
-base::Optional<pb::VideoDecoderConfig::Codec> ToProtoVideoDecoderConfigCodec(
- ::media::VideoCodec value);
-
-base::Optional<::media::VideoCodecProfile> ToMediaVideoCodecProfile(
- pb::VideoDecoderConfig::Profile value);
-base::Optional<pb::VideoDecoderConfig::Profile>
-ToProtoVideoDecoderConfigProfile(::media::VideoCodecProfile value);
-
-base::Optional<::media::VideoPixelFormat> ToMediaVideoPixelFormat(
- pb::VideoDecoderConfig::Format value);
-base::Optional<pb::VideoDecoderConfig::Format> ToProtoVideoDecoderConfigFormat(
- ::media::VideoPixelFormat value);
-
-base::Optional<::media::ColorSpace> ToMediaColorSpace(
- pb::VideoDecoderConfig::ColorSpace value);
-base::Optional<pb::VideoDecoderConfig::ColorSpace>
-ToProtoVideoDecoderConfigColorSpace(::media::ColorSpace value);
-
-base::Optional<::media::BufferingState> ToMediaBufferingState(
- pb::RendererClientOnBufferingStateChange::State value);
-base::Optional<pb::RendererClientOnBufferingStateChange::State>
-ToProtoMediaBufferingState(::media::BufferingState value);
-
-base::Optional<::media::CdmKeyInformation::KeyStatus>
-ToMediaCdmKeyInformationKeyStatus(pb::CdmKeyInformation::KeyStatus value);
-base::Optional<pb::CdmKeyInformation::KeyStatus> ToProtoCdmKeyInformation(
- ::media::CdmKeyInformation::KeyStatus value);
-
-base::Optional<::media::CdmPromise::Exception> ToCdmPromiseException(
- pb::CdmException value);
-base::Optional<pb::CdmException> ToProtoCdmException(
- ::media::CdmPromise::Exception value);
-
-base::Optional<::media::ContentDecryptionModule::MessageType>
-ToMediaCdmMessageType(pb::CdmMessageType value);
-base::Optional<pb::CdmMessageType> ToProtoCdmMessageType(
- ::media::ContentDecryptionModule::MessageType value);
-
-base::Optional<::media::CdmSessionType> ToCdmSessionType(
- pb::CdmSessionType value);
-base::Optional<pb::CdmSessionType> ToProtoCdmSessionType(
- ::media::CdmSessionType value);
-
-base::Optional<::media::EmeInitDataType> ToMediaEmeInitDataType(
- pb::CdmCreateSessionAndGenerateRequest::EmeInitDataType value);
-base::Optional<pb::CdmCreateSessionAndGenerateRequest::EmeInitDataType>
-ToProtoMediaEmeInitDataType(::media::EmeInitDataType value);
-
-base::Optional<::media::DemuxerStream::Status> ToDemuxerStreamStatus(
- pb::DemuxerStreamReadUntilCallback::Status value);
-base::Optional<pb::DemuxerStreamReadUntilCallback::Status>
-ToProtoDemuxerStreamStatus(::media::DemuxerStream::Status value);
-
-} // namespace remoting
-} // namespace media
-
-#endif // MEDIA_REMOTING_RPC_PROTO_ENUM_UTILS_H_
« no previous file with comments | « media/remoting/rpc.proto ('k') | media/remoting/rpc/proto_enum_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698