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

Unified Diff: media/filters/video_frame_generator.h

Issue 8887004: add components for integration test which will detect breakage of media pipeline with video captu... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: code review and final Created 8 years, 11 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 | « no previous file | media/filters/video_frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/video_frame_generator.h
===================================================================
--- media/filters/video_frame_generator.h (revision 0)
+++ media/filters/video_frame_generator.h (revision 0)
@@ -0,0 +1,63 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
+#define MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
+
+#include "media/base/filters.h"
+#include "media/base/pipeline_status.h"
+
+namespace base {
+class MessageLoopProxy;
+}
+
+namespace media {
+
+class DemuxerStream;
+class VideoFrame;
+
+// A filter generates raw frames and passes them to media engine as a video
+// decoder filter.
+class MEDIA_EXPORT VideoFrameGenerator
+ : public VideoDecoder {
+ public:
+ VideoFrameGenerator(
+ base::MessageLoopProxy* message_loop_proxy,
+ const gfx::Size& size,
+ const base::TimeDelta& frame_duration);
+ virtual ~VideoFrameGenerator();
+
+ // Filter implementation.
+ virtual void Stop(const base::Closure& callback) OVERRIDE;
+
+ // Decoder implementation.
+ virtual void Initialize(
+ DemuxerStream* demuxer_stream,
+ const PipelineStatusCB& filter_callback,
+ const StatisticsCallback& stat_callback) OVERRIDE;
+ virtual void Read(const ReadCB& callback) OVERRIDE;
+ virtual const gfx::Size& natural_size() OVERRIDE;
+
+ private:
+ void StopOnDecoderThread(const base::Closure& callback);
+
+ void InitializeOnDecoderThread(
+ DemuxerStream* demuxer_stream,
+ const PipelineStatusCB& filter_callback,
+ const StatisticsCallback& stat_callback);
+ void ReadOnDecoderThread(const ReadCB& callback);
+
+ scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
+ gfx::Size natural_size_;
+ bool stopped_;
+
+ base::TimeDelta current_time_;
+ base::TimeDelta frame_duration_;
+
+ DISALLOW_COPY_AND_ASSIGN(VideoFrameGenerator);
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
Property changes on: media/filters/video_frame_generator.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « no previous file | media/filters/video_frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698