diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-10 18:41:52 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-10 18:41:52 +0000 |
commit | b4fc9c198c85039e15907ccbf99f4d7259d2f085 (patch) | |
tree | 6db743d01149a07b1443f91f7a8ee39a859341ff /media/base | |
parent | 11e53f69d052482f9a34b4d67ea6e531a7c0edaf (diff) | |
download | chromium_src-b4fc9c198c85039e15907ccbf99f4d7259d2f085.zip chromium_src-b4fc9c198c85039e15907ccbf99f4d7259d2f085.tar.gz chromium_src-b4fc9c198c85039e15907ccbf99f4d7259d2f085.tar.bz2 |
Revert "Checking in media::FFmpegDemuxer and tests."
Review URL: http://codereview.chromium.org/43032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/mock_media_filters.h | 35 | ||||
-rw-r--r-- | media/base/pipeline.h | 7 |
2 files changed, 7 insertions, 35 deletions
diff --git a/media/base/mock_media_filters.h b/media/base/mock_media_filters.h index 0620eff..079c681 100644 --- a/media/base/mock_media_filters.h +++ b/media/base/mock_media_filters.h @@ -37,7 +37,6 @@ enum MockDataSourceBehavior { struct MockFilterConfig { MockFilterConfig() : data_source_behavior(MOCK_DATA_SOURCE_NORMAL_INIT), - data_source_value('!'), has_video(true), video_width(1280u), video_height(720u), @@ -53,7 +52,6 @@ struct MockFilterConfig { } MockDataSourceBehavior data_source_behavior; - char data_source_value; bool has_video; size_t video_width; size_t video_height; @@ -78,16 +76,7 @@ class MockDataSource : public DataSource { explicit MockDataSource(const MockFilterConfig* config) : config_(config), - position_(0), - deleted_(NULL) { - } - - MockDataSource(const MockFilterConfig* config, bool* deleted) - : config_(config), - position_(0), - deleted_(deleted) { - EXPECT_TRUE(deleted); - EXPECT_FALSE(*deleted); + position_(0) { } // Implementation of MediaFilter. @@ -132,7 +121,7 @@ class MockDataSource : public DataSource { if (size < read) { read = size; } - memset(data, config_->data_source_value, read); + memset(data, 0, read); return read; } @@ -142,6 +131,8 @@ class MockDataSource : public DataSource { } virtual bool SetPosition(int64 position) { + EXPECT_GE(position, 0u); + EXPECT_LE(position, config_->media_total_bytes); if (position < 0u || position > config_->media_total_bytes) { return false; } @@ -150,22 +141,12 @@ class MockDataSource : public DataSource { } virtual bool GetSize(int64* size_out) { - if (config_->media_total_bytes >= 0) { - *size_out = config_->media_total_bytes; - return true; - } + *size_out = config_->media_total_bytes; return false; } - // Simple position getter for unit testing. - int64 position() const { return position_; } - private: - virtual ~MockDataSource() { - if (deleted_) { - *deleted_ = true; - } - } + virtual ~MockDataSource() {} void TaskBehavior() { switch (config_->data_source_behavior) { @@ -185,10 +166,6 @@ class MockDataSource : public DataSource { int64 position_; MediaFormat media_format_; - // Set to true inside the destructor. Used in FFmpegGlue unit tests for - // testing proper reference counting. - bool* deleted_; - DISALLOW_COPY_AND_ASSIGN(MockDataSource); }; diff --git a/media/base/pipeline.h b/media/base/pipeline.h index 58883cc..da3dfc4 100644 --- a/media/base/pipeline.h +++ b/media/base/pipeline.h @@ -31,12 +31,7 @@ enum PipelineError { PIPELINE_ERROR_REQUIRED_FILTER_MISSING, PIPELINE_ERROR_OUT_OF_MEMORY, PIPELINE_ERROR_COULD_NOT_RENDER, - PIPELINE_ERROR_READ, - - // Demuxer related errors. - DEMUXER_ERROR_COULD_NOT_OPEN, - DEMUXER_ERROR_COULD_NOT_PARSE, - DEMUXER_ERROR_NO_SUPPORTED_STREAMS, + PIPELINE_ERROR_READ }; // Base class for Pipeline class which allows for read-only access to members. |