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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/video_frame_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
6 #define MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
7
8 #include "media/base/filters.h"
9 #include "media/base/pipeline_status.h"
10
11 namespace base {
12 class MessageLoopProxy;
13 }
14
15 namespace media {
16
17 class DemuxerStream;
18 class VideoFrame;
19
20 // A filter generates raw frames and passes them to media engine as a video
21 // decoder filter.
22 class MEDIA_EXPORT VideoFrameGenerator
23 : public VideoDecoder {
24 public:
25 VideoFrameGenerator(
26 base::MessageLoopProxy* message_loop_proxy,
27 const gfx::Size& size,
28 const base::TimeDelta& frame_duration);
29 virtual ~VideoFrameGenerator();
30
31 // Filter implementation.
32 virtual void Stop(const base::Closure& callback) OVERRIDE;
33
34 // Decoder implementation.
35 virtual void Initialize(
36 DemuxerStream* demuxer_stream,
37 const PipelineStatusCB& filter_callback,
38 const StatisticsCallback& stat_callback) OVERRIDE;
39 virtual void Read(const ReadCB& callback) OVERRIDE;
40 virtual const gfx::Size& natural_size() OVERRIDE;
41
42 private:
43 void StopOnDecoderThread(const base::Closure& callback);
44
45 void InitializeOnDecoderThread(
46 DemuxerStream* demuxer_stream,
47 const PipelineStatusCB& filter_callback,
48 const StatisticsCallback& stat_callback);
49 void ReadOnDecoderThread(const ReadCB& callback);
50
51 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
52 gfx::Size natural_size_;
53 bool stopped_;
54
55 base::TimeDelta current_time_;
56 base::TimeDelta frame_duration_;
57
58 DISALLOW_COPY_AND_ASSIGN(VideoFrameGenerator);
59 };
60
61 } // namespace media
62
63 #endif // MEDIA_FILTERS_VIDEO_FRAME_GENERATOR_H_
OLDNEW
« 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