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

Unified Diff: chromecast/public/cast_media_shlib.h

Issue 1137183003: Initialize Cast Media for cast_media_unittests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment update on CastMediaShlib Created 5 years, 7 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 | « chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/public/cast_media_shlib.h
diff --git a/chromecast/public/cast_media_shlib.h b/chromecast/public/cast_media_shlib.h
index 8429ca186f7cd0a5174080faf12a946bc2663d67..6f2d60d6cd129669d8949378ae127364704f56bc 100644
--- a/chromecast/public/cast_media_shlib.h
+++ b/chromecast/public/cast_media_shlib.h
@@ -13,15 +13,24 @@
namespace chromecast {
namespace media {
+// Provides access to platform-specific media systems and hardware resources.
+// In cast_shell, all usage is from the browser process. An implementation is
+// assumed to be in an uninitialized state initially. When uninitialized, no
+// API calls will be made except for Initialize, which brings the implementation
+// into an initialized state. A call to Finalize returns the implementation to
+// its uninitialized state. The implementation must support multiple
+// transitions between these states, to support resource grant/revoke events and
+// also to allow multiple unit tests to bring up the media systems in isolation
+// from other tests.
class CHROMECAST_EXPORT CastMediaShlib {
public:
- // Performs platform-specific one-time initialization for media systems and
- // hardware resources. Called at startup in browser process before main
- // message loop begins.
+ // Initializes platform-specific media systems. Only called when in an
+ // uninitialized state.
static void Initialize(const std::vector<std::string>& argv);
- // Performs platform-specific one-time teardown of media systems and hardware
- // resources. Called at browser process exit.
+ // Tears down platform-specific media systems and returns to the uninitialized
+ // state. The implementation must release all media-related hardware
+ // resources.
static void Finalize();
};
« no previous file with comments | « chromecast/media/cma/backend/audio_video_pipeline_device_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698