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

Side by Side Diff: media/video/video_decode_engine.h

Issue 7932005: Reland r101418: Fix aspect ratio and clarify video frame dimensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ 5 #ifndef MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_
6 #define MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ 6 #define MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/base/video_decoder_config.h" 11 #include "media/base/video_decoder_config.h"
12 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
13 #include "ui/gfx/size.h"
13 14
14 class MessageLoop; 15 class MessageLoop;
15 16
16 namespace media { 17 namespace media {
17 18
18 class Buffer; 19 class Buffer;
19 class VideoDecodeContext; 20 class VideoDecodeContext;
20 21
21 struct PipelineStatistics; 22 struct PipelineStatistics;
22 23
23 struct VideoCodecInfo { 24 struct VideoCodecInfo {
24 // Other parameter is only meaningful when this is true. 25 // Other parameter is only meaningful when this is true.
25 bool success; 26 bool success;
26 27
27 // Can be different with container's value. 28 // Natural dimensions of video. May be different from coded and visible sizes.
28 uint32 surface_width; 29 gfx::Size natural_size;
29
30 // Can be different with container's value.
31 uint32 surface_height;
32 }; 30 };
33 31
34 class MEDIA_EXPORT VideoDecodeEngine { 32 class MEDIA_EXPORT VideoDecodeEngine {
35 public: 33 public:
36 struct MEDIA_EXPORT EventHandler { 34 struct MEDIA_EXPORT EventHandler {
37 public: 35 public:
38 virtual ~EventHandler() {} 36 virtual ~EventHandler() {}
39 virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0; 37 virtual void OnInitializeComplete(const VideoCodecInfo& info) = 0;
40 virtual void OnUninitializeComplete() = 0; 38 virtual void OnUninitializeComplete() = 0;
41 virtual void OnFlushComplete() = 0; 39 virtual void OnFlushComplete() = 0;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 // is called by the user to return the video frame object. 119 // is called by the user to return the video frame object.
122 // 120 //
123 // In response to this method call, ConsumeVideoFrame() is called with a 121 // In response to this method call, ConsumeVideoFrame() is called with a
124 // video frame object containing decoded video content. 122 // video frame object containing decoded video content.
125 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame) = 0; 123 virtual void ProduceVideoFrame(scoped_refptr<VideoFrame> frame) = 0;
126 }; 124 };
127 125
128 } // namespace media 126 } // namespace media
129 127
130 #endif // MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_ 128 #endif // MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_
OLDNEW
« no previous file with comments | « media/video/ffmpeg_video_decode_engine_unittest.cc ('k') | webkit/glue/media/video_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698