// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef MEDIA_FILTERS_DECRYPTING_MEDIA_RESOURCE_H_ #define MEDIA_FILTERS_DECRYPTING_MEDIA_RESOURCE_H_ #include <vector> #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/task/sequenced_task_runner.h" #include "media/base/media_resource.h" #include "media/base/pipeline.h" namespace media { class CdmContext; class DemuxerStream; class DecryptingDemuxerStream; // DecryptingMediaResource is a wrapper for a MediaResource implementation that // provides decryption. It should only be created when: // - The |media_resource| has type MediaResource::Type::kStream, and // - The |cdm_context| has a Decryptor that always supports decrypt-only. // Internally DecryptingDemuxerStreams will be created for all streams in // |media_resource| and decrypt them into clear streams. These clear streams are // then passed downstream to the rest of the media pipeline, which should no // longer need to worry about decryption. class MEDIA_EXPORT DecryptingMediaResource : public MediaResource { … }; } // namespace media #endif // MEDIA_FILTERS_DECRYPTING_MEDIA_RESOURCE_H_