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

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

Issue 1105803002: Exposes a shlib interface for media/audio path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment out streaming test until the default implementation is improved. 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 CastAudioOutputDevice;
16 class VideoPlane; 17 class VideoPlane;
17 18
18 // Provides access to platform-specific media systems and hardware resources. 19 // Provides access to platform-specific media systems and hardware resources.
19 // In cast_shell, all usage is from the browser process. An implementation is 20 // 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 21 // assumed to be in an uninitialized state initially. When uninitialized, no
21 // API calls will be made except for Initialize, which brings the implementation 22 // 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 23 // into an initialized state. A call to Finalize returns the implementation to
23 // its uninitialized state. The implementation must support multiple 24 // its uninitialized state. The implementation must support multiple
24 // transitions between these states, to support resource grant/revoke events and 25 // 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 26 // also to allow multiple unit tests to bring up the media systems in isolation
26 // from other tests. 27 // from other tests.
27 class CHROMECAST_EXPORT CastMediaShlib { 28 class CHROMECAST_EXPORT CastMediaShlib {
28 public: 29 public:
29 // Initializes platform-specific media systems. Only called when in an 30 // Initializes platform-specific media systems. Only called when in an
30 // uninitialized state. 31 // uninitialized state.
31 static void Initialize(const std::vector<std::string>& argv); 32 static void Initialize(const std::vector<std::string>& argv);
32 33
33 // Tears down platform-specific media systems and returns to the uninitialized 34 // Tears down platform-specific media systems and returns to the uninitialized
34 // state. The implementation must release all media-related hardware 35 // state. The implementation must release all media-related hardware
35 // resources. 36 // resources.
36 static void Finalize(); 37 static void Finalize();
37 38
38 // Gets the VideoPlane instance for managing the hardware video plane. 39 // Gets the VideoPlane instance for managing the hardware video plane.
39 // While an implementation is in an initialized state, this function may be 40 // 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. 41 // called at any time. The VideoPlane object must be destroyed in Finalize.
41 static VideoPlane* GetVideoPlane(); 42 static VideoPlane* GetVideoPlane();
43
44 // Gets the CastAudioOutputDevice instance, which will be used to provide
45 // CastAudioOutputStreams. The returned instance is owned by this class, and
46 // may be destroyed in Finalize().
47 static CastAudioOutputDevice* GetAudioOutputDevice();
42 }; 48 };
43 49
44 } // namespace media 50 } // namespace media
45 } // namespace chromecast 51 } // namespace chromecast
46 52
47 #endif // CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_ 53 #endif // CHROMECAST_PUBLIC_CAST_MEDIA_SHLIB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698