From dad541d95f2df33f23d52dce79151291918a7a67 Mon Sep 17 00:00:00 2001 From: halliwell Date: Fri, 7 Aug 2015 10:24:11 -0700 Subject: Load CMA backend from shared library * CMA backend interfaces moved into chromecast/public/media * CMA backend implementation loaded from libcast_media through CastMediaShlib * Backend API changes to remove dependency on Chromium types: * DecryptContext replaced with CastKeySystem * scoped_refptr replaced with raw pointers * In particular, DecoderBufferBase replaced in the backend API with non-refcounted DecoderBuffer. In order to allow us to keep using refcounting and in particular use DecoderBufferBase in the rest of our pipeline, it gets wrapped in a DecoderBufferImpl (implementation of DecoderBuffer) for passing to the backend. So backends must delete the buffer pointer they're given but this is actually just decrementing the refcount on the underlying buffer. * base::Callback replaced with abstract interfaces * base::TimeDelta replaced with chromecast::TimeDelta in backend interface, essentially a stripped-down copy * NonThreadSafe removed (implementations can use ThreadChecker) * TaskRunner interface provides PostTask/PostDelayedTask service to backend implementations * Backend ownership / factory model changed. Now, backend implementations return a MediaPipelineBackend which manages ownership and hookup of all the components. It returns access to them as raw pointers. The pipeline manages the lifetime of the MediaPipelineBackend instance. * GetIsCodecSupportedOnChromecast refactored to remove calls back into cast_shell from backends (implementation can just return 'default' to indicate default logic should apply, including HDMI capabilities. BUG=508534 Review URL: https://codereview.chromium.org/1257013003 Cr-Commit-Position: refs/heads/master@{#342370} --- chromecast/media/cdm/browser_cdm_cast.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'chromecast/media/cdm/browser_cdm_cast.h') diff --git a/chromecast/media/cdm/browser_cdm_cast.h b/chromecast/media/cdm/browser_cdm_cast.h index 0e24a51..a4c80fb 100644 --- a/chromecast/media/cdm/browser_cdm_cast.h +++ b/chromecast/media/cdm/browser_cdm_cast.h @@ -28,7 +28,7 @@ class PlayerTrackerImpl; namespace chromecast { namespace media { -class DecryptContext; +class DecryptContextImpl; // BrowserCdmCast is an extension of BrowserCdm that provides common // functionality across CDM implementations. @@ -60,7 +60,7 @@ class BrowserCdmCast : public ::media::BrowserCdm { // Returns the decryption context needed to decrypt frames encrypted with // |key_id|. // Returns null if |key_id| is not available. - virtual scoped_refptr GetDecryptContext( + virtual scoped_ptr GetDecryptContext( const std::string& key_id) const = 0; protected: -- cgit v1.1