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(); |
}; |