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

Side by Side Diff: media/base/filter_host_impl.cc

Issue 18546: Implementation of Pipeline and FilterHost interfaces. This is a large change... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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
« no previous file with comments | « media/base/filter_host_impl.h ('k') | media/base/filters.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 #include "base/task.h"
6 #include "media/base/filter_host_impl.h" 5 #include "media/base/filter_host_impl.h"
7 6
8 namespace media { 7 namespace media {
9 8
10 FilterHostImpl::FilterHostImpl() { 9 void FilterHostImpl::SetTimeUpdateCallback(
11 // TODO(ralphl): implement FilterHostImpl constructor. 10 Callback1<base::TimeDelta>::Type* callback) {
12 NOTIMPLEMENTED(); 11 time_update_callback_.reset(callback);
12 }
13
14 void FilterHostImpl::RunTimeUpdateCallback(base::TimeDelta time) {
15 if (time_update_callback_.get())
16 time_update_callback_->Run(time);
17 }
18
19 void FilterHostImpl::InitializationComplete() {
20 pipeline_thread_->InitializationComplete(this);
21 }
22
23 void FilterHostImpl::PostTask(Task* task) {
24 DCHECK(!stopped_);
25 if (stopped_) {
26 delete task;
27 } else {
28 pipeline_thread_->PostTask(task);
29 }
30 }
31
32 void FilterHostImpl::Error(PipelineError error) {
33 pipeline_thread_->Error(error);
34 }
35
36 void FilterHostImpl::SetTime(base::TimeDelta time) {
37 pipeline_thread_->SetTime(time);
38 }
39
40 void FilterHostImpl::SetDuration(base::TimeDelta duration) {
41 pipeline()->duration_ = duration;
42 }
43
44 void FilterHostImpl::SetBufferedTime(base::TimeDelta buffered_time) {
45 pipeline()->buffered_time_ = buffered_time;
46 }
47
48 void FilterHostImpl::SetTotalBytes(int64 total_bytes) {
49 pipeline()->total_bytes_ = total_bytes;
50 }
51
52 void FilterHostImpl::SetBufferedBytes(int64 buffered_bytes) {
53 pipeline()->buffered_bytes_ = buffered_bytes;
54 }
55
56 void FilterHostImpl::SetVideoSize(size_t width, size_t height) {
57 pipeline()->SetVideoSize(width, height);
13 } 58 }
14 59
15 const PipelineStatus* FilterHostImpl::GetPipelineStatus() const { 60 const PipelineStatus* FilterHostImpl::GetPipelineStatus() const {
16 // TODO(ralphl): implement GetPipelineStatus. 61 return pipeline();
17 NOTIMPLEMENTED();
18 return NULL;
19 } 62 }
20 63
21 void FilterHostImpl::SetTimeUpdateCallback(Callback1<int64>::Type* callback) { 64 void FilterHostImpl::Stop() {
22 // TODO(ralphl): implement SetTimeUpdateCallback. 65 if (!stopped_) {
23 NOTIMPLEMENTED(); 66 filter_->Stop();
24 } 67 stopped_ = true;
25 68 }
26 void FilterHostImpl::InitializationComplete() {
27 // TODO(ralphl): implement InitializationComplete.
28 NOTIMPLEMENTED();
29 }
30
31 void FilterHostImpl::PostTask(Task* task) {
32 // TODO(ralphl): implement PostTask.
33 NOTIMPLEMENTED();
34 }
35
36 void FilterHostImpl::Error(PipelineError error) {
37 // TODO(ralphl): implement Error.
38 NOTIMPLEMENTED();
39 }
40
41 void FilterHostImpl::SetTime(int64 time) {
42 // TODO(ralphl): implement SetTime.
43 NOTIMPLEMENTED();
44 }
45
46 void FilterHostImpl::SetDuration(int64 duration) {
47 // TODO(ralphl): implement SetDuration.
48 NOTIMPLEMENTED();
49 }
50
51 void FilterHostImpl::SetBufferedTime(int64 buffered_time) {
52 // TODO(ralphl): implement SetBufferedTime.
53 NOTIMPLEMENTED();
54 }
55
56 void FilterHostImpl::SetTotalBytes(int64 total_bytes) {
57 // TODO(ralphl): implement.
58 NOTIMPLEMENTED();
59 }
60
61 void FilterHostImpl::SetBufferedBytes(int64 buffered_bytes) {
62 // TODO(ralphl): implement.
63 NOTIMPLEMENTED();
64 }
65
66 void SetVideoSize(size_t width, size_t height) {
67 // TODO(ralphl): implement.
68 NOTIMPLEMENTED();
69 } 69 }
70 70
71 } // namespace media 71 } // namespace media
OLDNEW
« no previous file with comments | « media/base/filter_host_impl.h ('k') | media/base/filters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698