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

Unified Diff: media/filters/fake_demuxer_stream.cc

Issue 16274005: Separate DemuxerStream and VideoDecoder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win64 Created 7 years, 5 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 | « media/filters/fake_demuxer_stream.h ('k') | media/filters/fake_video_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/fake_demuxer_stream.cc
diff --git a/media/filters/fake_demuxer_stream.cc b/media/filters/fake_demuxer_stream.cc
index 1d5915c39013f912b3e9a7b1335a1bc0f36e1b0a..8cab3a306db1fbfd8f62cae49d686ca71e3a4959 100644
--- a/media/filters/fake_demuxer_stream.cc
+++ b/media/filters/fake_demuxer_stream.cc
@@ -9,9 +9,9 @@
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop.h"
-#include "base/pickle.h"
#include "media/base/bind_to_loop.h"
#include "media/base/decoder_buffer.h"
+#include "media/base/test_helpers.h"
#include "media/base/video_frame.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -24,7 +24,6 @@ static const int kStartWidth = 320;
static const int kStartHeight = 240;
static const int kWidthDelta = 4;
static const int kHeightDelta = 3;
-static const char kFakeBufferHeader[] = "Fake Buffer";
FakeDemuxerStream::FakeDemuxerStream(int num_configs,
int num_buffers_in_one_config,
@@ -139,19 +138,10 @@ void FakeDemuxerStream::DoRead() {
return;
}
- // Prepare the next buffer.
- Pickle pickle;
- pickle.WriteString(kFakeBufferHeader);
- pickle.WriteInt(video_decoder_config_.coded_size().width());
- pickle.WriteInt(video_decoder_config_.coded_size().height());
- pickle.WriteInt64(current_timestamp_.InMilliseconds());
-
- scoped_refptr<DecoderBuffer> buffer = DecoderBuffer::CopyFrom(
- static_cast<const uint8*>(pickle.data()), pickle.size());
+ scoped_refptr<DecoderBuffer> buffer = CreateFakeVideoBufferForTest(
+ video_decoder_config_, current_timestamp_, duration_);
// TODO(xhwang): Output out-of-order buffers if needed.
- buffer->SetTimestamp(current_timestamp_);
- buffer->SetDuration(duration_);
current_timestamp_ += duration_;
num_buffers_left_in_current_config_--;
« no previous file with comments | « media/filters/fake_demuxer_stream.h ('k') | media/filters/fake_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698