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

Side by Side Diff: chromecast/media/cma/backend/alsa/video_decoder_alsa.cc

Issue 2577743002: [chromecast] Deletes libcast_media_1.0_default_core. (Closed)
Patch Set: rebase + simplify libcast_media target Created 4 years 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chromecast/media/cma/backend/alsa/video_decoder_alsa.h"
6
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/logging.h"
10 #include "base/threading/thread_task_runner_handle.h"
11 #include "chromecast/public/media/cast_decoder_buffer.h"
12
13 namespace chromecast {
14 namespace media {
15
16 VideoDecoderAlsa::VideoDecoderAlsa()
17 : delegate_(nullptr), weak_factory_(this) {}
18
19 VideoDecoderAlsa::~VideoDecoderAlsa() {}
20
21 void VideoDecoderAlsa::SetDelegate(Delegate* delegate) {
22 DCHECK(delegate);
23 delegate_ = delegate;
24 }
25
26 MediaPipelineBackend::BufferStatus VideoDecoderAlsa::PushBuffer(
27 CastDecoderBuffer* buffer) {
28 DCHECK(delegate_);
29 DCHECK(buffer);
30 if (buffer->end_of_stream()) {
31 base::ThreadTaskRunnerHandle::Get()->PostTask(
32 FROM_HERE, base::Bind(&VideoDecoderAlsa::OnEndOfStream,
33 weak_factory_.GetWeakPtr()));
34 }
35 return MediaPipelineBackend::kBufferSuccess;
36 }
37
38 void VideoDecoderAlsa::GetStatistics(Statistics* statistics) {}
39
40 bool VideoDecoderAlsa::SetConfig(const VideoConfig& config) {
41 return true;
42 }
43
44 void VideoDecoderAlsa::OnEndOfStream() {
45 delegate_->OnEndOfStream();
46 }
47
48 } // namespace media
49 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/cma/backend/alsa/video_decoder_alsa.h ('k') | chromecast/media/cma/backend/cast_media_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698