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

Side by Side Diff: chrome/renderer/media/cast_session.cc

Issue 2133903002: RELAND: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disabled two unittests. Created 4 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 unified diff | Download patch
« no previous file with comments | « chrome/renderer/media/cast_session.h ('k') | chrome/renderer/media/cast_session_delegate.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/renderer/media/cast_session.h" 5 #include "chrome/renderer/media/cast_session.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 CastSession::CastSession() 47 CastSession::CastSession()
48 : delegate_(new CastSessionDelegate()), 48 : delegate_(new CastSessionDelegate()),
49 io_task_runner_( 49 io_task_runner_(
50 content::RenderThread::Get()->GetIOMessageLoopProxy()) {} 50 content::RenderThread::Get()->GetIOMessageLoopProxy()) {}
51 51
52 CastSession::~CastSession() { 52 CastSession::~CastSession() {
53 // We should always be able to delete the object on the IO thread. 53 // We should always be able to delete the object on the IO thread.
54 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release())); 54 CHECK(io_task_runner_->DeleteSoon(FROM_HERE, delegate_.release()));
55 } 55 }
56 56
57 void CastSession::StartAudio(const media::cast::AudioSenderConfig& config, 57 void CastSession::StartAudio(const media::cast::FrameSenderConfig& config,
58 const AudioFrameInputAvailableCallback& callback, 58 const AudioFrameInputAvailableCallback& callback,
59 const ErrorCallback& error_callback) { 59 const ErrorCallback& error_callback) {
60 DCHECK(content::RenderThread::Get()); 60 DCHECK(content::RenderThread::Get());
61 61
62 io_task_runner_->PostTask( 62 io_task_runner_->PostTask(
63 FROM_HERE, 63 FROM_HERE,
64 base::Bind(&CastSessionDelegate::StartAudio, 64 base::Bind(&CastSessionDelegate::StartAudio,
65 base::Unretained(delegate_.get()), 65 base::Unretained(delegate_.get()),
66 config, 66 config,
67 media::BindToCurrentLoop(callback), 67 media::BindToCurrentLoop(callback),
68 media::BindToCurrentLoop(error_callback))); 68 media::BindToCurrentLoop(error_callback)));
69 } 69 }
70 70
71 void CastSession::StartVideo(const media::cast::VideoSenderConfig& config, 71 void CastSession::StartVideo(const media::cast::FrameSenderConfig& config,
72 const VideoFrameInputAvailableCallback& callback, 72 const VideoFrameInputAvailableCallback& callback,
73 const ErrorCallback& error_callback) { 73 const ErrorCallback& error_callback) {
74 DCHECK(content::RenderThread::Get()); 74 DCHECK(content::RenderThread::Get());
75 75
76 io_task_runner_->PostTask( 76 io_task_runner_->PostTask(
77 FROM_HERE, 77 FROM_HERE,
78 base::Bind(&CastSessionDelegate::StartVideo, 78 base::Bind(&CastSessionDelegate::StartVideo,
79 base::Unretained(delegate_.get()), 79 base::Unretained(delegate_.get()),
80 config, 80 config,
81 media::BindToCurrentLoop(callback), 81 media::BindToCurrentLoop(callback),
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 123
124 void CastSession::GetStatsAndReset(bool is_audio, 124 void CastSession::GetStatsAndReset(bool is_audio,
125 const StatsCallback& callback) { 125 const StatsCallback& callback) {
126 io_task_runner_->PostTask( 126 io_task_runner_->PostTask(
127 FROM_HERE, 127 FROM_HERE,
128 base::Bind(&CastSessionDelegate::GetStatsAndReset, 128 base::Bind(&CastSessionDelegate::GetStatsAndReset,
129 base::Unretained(delegate_.get()), 129 base::Unretained(delegate_.get()),
130 is_audio, 130 is_audio,
131 media::BindToCurrentLoop(callback))); 131 media::BindToCurrentLoop(callback)));
132 } 132 }
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_session.h ('k') | chrome/renderer/media/cast_session_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698