summaryrefslogtreecommitdiffstats
path: root/media/video/video_decode_engine.h
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 16:27:08 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-09 16:27:08 +0000
commit25b04750be362f20f235d58da43aac774d4f4524 (patch)
treea7ebb119b721ea5bdf2eca0b319082600bcc0482 /media/video/video_decode_engine.h
parent9f33ba5fbe668ea4c1ce1c35ac8b92a989f475f3 (diff)
downloadchromium_src-25b04750be362f20f235d58da43aac774d4f4524.zip
chromium_src-25b04750be362f20f235d58da43aac774d4f4524.tar.gz
chromium_src-25b04750be362f20f235d58da43aac774d4f4524.tar.bz2
Remove FFmpegVideoDecodeEngine's dependency on AVStream.
First step of many towards removing DemuxerStream::QueryInterface, AVStreamProvider, and MediaFormat. BUG=28206 TEST=media_unittests Review URL: http://codereview.chromium.org/6624062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/video/video_decode_engine.h')
-rw-r--r--media/video/video_decode_engine.h48
1 files changed, 31 insertions, 17 deletions
diff --git a/media/video/video_decode_engine.h b/media/video/video_decode_engine.h
index 57b76a2..5893b3a 100644
--- a/media/video/video_decode_engine.h
+++ b/media/video/video_decode_engine.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -6,6 +6,7 @@
#define MEDIA_VIDEO_VIDEO_DECODE_ENGINE_H_
#include "base/callback.h"
+#include "base/scoped_ptr.h"
#include "media/base/video_frame.h"
class MessageLoop;
@@ -18,6 +19,7 @@ class VideoDecodeContext;
struct PipelineStatistics;
enum VideoCodec {
+ kUnknown,
kCodecH264,
kCodecVC1,
kCodecMPEG2,
@@ -26,26 +28,38 @@ enum VideoCodec {
kCodecVP8,
};
-static const uint32 kProfileDoNotCare = static_cast<uint32>(-1);
-static const uint32 kLevelDoNotCare = static_cast<uint32>(-1);
-
-struct VideoCodecConfig {
- VideoCodecConfig();
+class VideoCodecConfig {
+ public:
+ VideoCodecConfig(VideoCodec codec, int width, int height,
+ int frame_rate_numerator, int frame_rate_denominator,
+ uint8* extra_data, size_t extra_data_size);
+ ~VideoCodecConfig();
+
+ VideoCodec codec() const;
+ int width() const;
+ int height() const;
+ int frame_rate_numerator() const;
+ int frame_rate_denominator() const;
+ uint8* extra_data() const;
+ size_t extra_data_size() const;
+
+ private:
+ VideoCodec codec_;
- VideoCodec codec;
+ // Container's concept of width and height of this video.
+ int width_;
+ int height_;
- // TODO(jiesun): video profile and level are specific to individual codec.
- // Define enum to.
- uint32 profile;
- uint32 level;
+ // Frame rate in seconds expressed as a fraction.
+ // TODO(scherkus): fairly certain decoders don't require frame rates.
+ int frame_rate_numerator_;
+ int frame_rate_denominator_;
- // Container's concept of width and height of this video.
- int32 width;
- int32 height; // TODO(jiesun): Do we allow height to be negative to
- // indicate output is upside-down?
+ // Optional byte data requied to initialize video decoders.
+ scoped_array<uint8> extra_data_;
+ size_t extra_data_size_;
- // FFMPEG's will use this to pass AVStream. Otherwise, we should remove this.
- void* opaque_context;
+ DISALLOW_COPY_AND_ASSIGN(VideoCodecConfig);
};
struct VideoStreamInfo {