| Index: content/renderer/media/rtc_video_decoder.cc
|
| diff --git a/content/renderer/media/rtc_video_decoder.cc b/content/renderer/media/rtc_video_decoder.cc
|
| index 42de408a946c90d195b23b3ec5c32f992fe133d1..ea15a02bb5434eff695e2a4a847c1ddfef91f435 100644
|
| --- a/content/renderer/media/rtc_video_decoder.cc
|
| +++ b/content/renderer/media/rtc_video_decoder.cc
|
| @@ -36,37 +36,29 @@ RTCVideoDecoder::RTCVideoDecoder(MessageLoop* message_loop,
|
| got_first_frame_(false) {
|
| }
|
|
|
| -RTCVideoDecoder::~RTCVideoDecoder() {}
|
| -
|
| -void RTCVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
|
| - const PipelineStatusCB& status_cb,
|
| - const StatisticsCB& statistics_cb) {
|
| +void RTCVideoDecoder::Play(const base::Closure& callback) {
|
| if (MessageLoop::current() != message_loop_) {
|
| - message_loop_->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&RTCVideoDecoder::Initialize, this,
|
| - make_scoped_refptr(demuxer_stream),
|
| - status_cb, statistics_cb));
|
| + message_loop_->PostTask(FROM_HERE,
|
| + base::Bind(&RTCVideoDecoder::Play, this, callback));
|
| return;
|
| }
|
|
|
| DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| - state_ = kNormal;
|
| - status_cb.Run(PIPELINE_OK);
|
|
|
| - // TODO(acolwell): Implement stats.
|
| + callback.Run();
|
| }
|
|
|
| -void RTCVideoDecoder::Play(const base::Closure& callback) {
|
| +void RTCVideoDecoder::Seek(base::TimeDelta time, const PipelineStatusCB& cb) {
|
| if (MessageLoop::current() != message_loop_) {
|
| - message_loop_->PostTask(FROM_HERE,
|
| - base::Bind(&RTCVideoDecoder::Play, this, callback));
|
| - return;
|
| + message_loop_->PostTask(FROM_HERE,
|
| + base::Bind(&RTCVideoDecoder::Seek, this,
|
| + time, cb));
|
| + return;
|
| }
|
|
|
| DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| -
|
| - callback.Run();
|
| + state_ = kNormal;
|
| + cb.Run(PIPELINE_OK);
|
| }
|
|
|
| void RTCVideoDecoder::Pause(const base::Closure& callback) {
|
| @@ -127,17 +119,23 @@ void RTCVideoDecoder::Stop(const base::Closure& callback) {
|
| VideoDecoder::Stop(callback);
|
| }
|
|
|
| -void RTCVideoDecoder::Seek(base::TimeDelta time, const PipelineStatusCB& cb) {
|
| +void RTCVideoDecoder::Initialize(DemuxerStream* demuxer_stream,
|
| + const PipelineStatusCB& status_cb,
|
| + const StatisticsCB& statistics_cb) {
|
| if (MessageLoop::current() != message_loop_) {
|
| - message_loop_->PostTask(FROM_HERE,
|
| - base::Bind(&RTCVideoDecoder::Seek, this,
|
| - time, cb));
|
| - return;
|
| + message_loop_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&RTCVideoDecoder::Initialize, this,
|
| + make_scoped_refptr(demuxer_stream),
|
| + status_cb, statistics_cb));
|
| + return;
|
| }
|
|
|
| DCHECK_EQ(MessageLoop::current(), message_loop_);
|
| state_ = kNormal;
|
| - cb.Run(PIPELINE_OK);
|
| + status_cb.Run(PIPELINE_OK);
|
| +
|
| + // TODO(acolwell): Implement stats.
|
| }
|
|
|
| void RTCVideoDecoder::Read(const ReadCB& callback) {
|
| @@ -219,3 +217,5 @@ bool RTCVideoDecoder::RenderFrame(const cricket::VideoFrame* frame) {
|
| read_cb.Run(kOk, video_frame);
|
| return true;
|
| }
|
| +
|
| +RTCVideoDecoder::~RTCVideoDecoder() {}
|
|
|