Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / remoting / host / host_extension_session.h
index a4a0bd7..1c51644 100644 (file)
@@ -27,13 +27,18 @@ class HostExtensionSession {
  public:
   virtual ~HostExtensionSession() {}
 
-  // Optional hook functions for HostExtensions which need to wrap or replace
-  // parts of the video, audio, input, etc pipelines.
-  // These are called in response to ResetVideoPipeline().
-  virtual scoped_ptr<webrtc::DesktopCapturer> OnCreateVideoCapturer(
-      scoped_ptr<webrtc::DesktopCapturer> capturer);
-  virtual scoped_ptr<VideoEncoder> OnCreateVideoEncoder(
-      scoped_ptr<VideoEncoder> encoder);
+  // Hook functions called when the video pipeline is being (re)constructed.
+  // Implementations will receive these calls only if they express the need to
+  // modify the pipeline (see below). They may replace or wrap |capturer| and/or
+  // |encoder|, e.g. to filter video frames in some way.
+  // If either |capturer| or |encoder| are reset then the video pipeline is not
+  // constructed.
+  virtual void OnCreateVideoCapturer(
+      scoped_ptr<webrtc::DesktopCapturer>* capturer);
+  virtual void OnCreateVideoEncoder(scoped_ptr<VideoEncoder>* encoder);
+
+  // Must return true if the HostExtensionSession needs the opportunity to
+  // modify the video pipeline.
   virtual bool ModifiesVideoPipeline() const;
 
   // Called when the host receives an |ExtensionMessage| for the |ClientSession|