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

Side by Side Diff: chromecast/public/cast_media_shlib.h

Issue 1257013003: Load CMA backend from shared library (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_ 5 #ifndef CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_
6 #define CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_ 6 #define CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chromecast_export.h" 11 #include "chromecast_export.h"
12 12
13 namespace chromecast { 13 namespace chromecast {
14 namespace media { 14 namespace media {
15 15
16 class MediaPipelineBackend;
17 struct MediaPipelineDeviceParams;
16 class VideoPlane; 18 class VideoPlane;
17 19
18 // Provides access to platform-specific media systems and hardware resources. 20 // Provides access to platform-specific media systems and hardware resources.
19 // In cast_shell, all usage is from the browser process. An implementation is 21 // In cast_shell, all usage is from the browser process. An implementation is
20 // assumed to be in an uninitialized state initially. When uninitialized, no 22 // assumed to be in an uninitialized state initially. When uninitialized, no
21 // API calls will be made except for Initialize, which brings the implementation 23 // API calls will be made except for Initialize, which brings the implementation
22 // into an initialized state. A call to Finalize returns the implementation to 24 // into an initialized state. A call to Finalize returns the implementation to
23 // its uninitialized state. The implementation must support multiple 25 // its uninitialized state. The implementation must support multiple
24 // transitions between these states, to support resource grant/revoke events and 26 // transitions between these states, to support resource grant/revoke events and
25 // also to allow multiple unit tests to bring up the media systems in isolation 27 // also to allow multiple unit tests to bring up the media systems in isolation
26 // from other tests. 28 // from other tests.
27 class CHROMECAST_EXPORT CastMediaShlib { 29 class CHROMECAST_EXPORT CastMediaShlib {
28 public: 30 public:
29 // Initializes platform-specific media systems. Only called when in an 31 // Initializes platform-specific media systems. Only called when in an
30 // uninitialized state. 32 // uninitialized state.
31 static void Initialize(const std::vector<std::string>& argv); 33 static void Initialize(const std::vector<std::string>& argv);
32 34
33 // Tears down platform-specific media systems and returns to the uninitialized 35 // Tears down platform-specific media systems and returns to the uninitialized
34 // state. The implementation must release all media-related hardware 36 // state. The implementation must release all media-related hardware
35 // resources. 37 // resources.
36 static void Finalize(); 38 static void Finalize();
37 39
38 // Gets the VideoPlane instance for managing the hardware video plane. 40 // Gets the VideoPlane instance for managing the hardware video plane.
39 // While an implementation is in an initialized state, this function may be 41 // While an implementation is in an initialized state, this function may be
40 // called at any time. The VideoPlane object must be destroyed in Finalize. 42 // called at any time. The VideoPlane object must be destroyed in Finalize.
41 static VideoPlane* GetVideoPlane(); 43 static VideoPlane* GetVideoPlane();
alokp 2015/08/10 20:30:25 Please document ownership for the returned VideoPl
44
45 // Creates a factory object for a media pipeline backend. Called in the
46 // browser process, any number of times (once per media pipeline). Each call
47 // must instantiate a new factory object
48 static MediaPipelineBackend* CreateMediaPipelineBackend(
alokp 2015/08/10 20:30:25 Who owns the returned MediaPipelineBackend? I am a
49 const MediaPipelineDeviceParams& params);
42 }; 50 };
43 51
44 } // namespace media 52 } // namespace media
45 } // namespace chromecast 53 } // namespace chromecast
46 54
47 #endif // CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_ 55 #endif // CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698