Refactor frame generation code so it can be used by multiple modules.

R=pbos@webrtc.org, stefan@webrtc.org, pbos, stefan
BUG=

Review URL: https://webrtc-codereview.appspot.com/2240004

git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@4791 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/video_engine/test/common/frame_generator_capturer.h b/video_engine/test/common/frame_generator_capturer.h
index df84e16..ad7fdeb 100644
--- a/video_engine/test/common/frame_generator_capturer.h
+++ b/video_engine/test/common/frame_generator_capturer.h
@@ -26,24 +26,33 @@
 
 class FrameGeneratorCapturer : public VideoCapturer {
  public:
-  // The FrameGeneratorCapturer takes ownership of the FrameGenerator, which
-  // will be freed when the FrameGeneratorCapturer is deleted.
   static FrameGeneratorCapturer* Create(VideoSendStreamInput* input,
-                                        FrameGenerator* frame_generator,
-                                        int target_fps);
+                                        size_t width,
+                                        size_t height,
+                                        int target_fps,
+                                        Clock* clock);
+
+  static FrameGeneratorCapturer* CreateFromYuvFile(VideoSendStreamInput* input,
+                                                   const char* file_name,
+                                                   size_t width,
+                                                   size_t height,
+                                                   int target_fps,
+                                                   Clock* clock);
   virtual ~FrameGeneratorCapturer();
 
   virtual void Start() OVERRIDE;
   virtual void Stop() OVERRIDE;
 
  private:
-  FrameGeneratorCapturer(VideoSendStreamInput* input,
+  FrameGeneratorCapturer(Clock* clock,
+                         VideoSendStreamInput* input,
                          FrameGenerator* frame_generator,
                          int target_fps);
   bool Init();
   void InsertFrame();
   static bool Run(void* obj);
 
+  Clock* clock_;
   bool sending_;
 
   scoped_ptr<EventWrapper> tick_;