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

Side by Side Diff: Source/platform/exported/WebMediaStreamSource.cpp

Issue 569613002: Add the possibility to specify MediaStreamTrack::remote when creating a track. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed construction call from WebAudio. Created 6 years, 1 month 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
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 return m_private.get(); 95 return m_private.get();
96 } 96 }
97 97
98 WebMediaStreamSource::operator MediaStreamSource*() const 98 WebMediaStreamSource::operator MediaStreamSource*() const
99 { 99 {
100 return m_private.get(); 100 return m_private.get();
101 } 101 }
102 102
103 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS tring& name) 103 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS tring& name)
104 { 104 {
105 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ e>(type), name); 105 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ e>(type), name, false, true);
106 }
107
108 void WebMediaStreamSource::initialize(const WebString& id, Type type, const WebS tring& name, bool remote, bool readonly)
109 {
110 m_private = MediaStreamSource::create(id, static_cast<MediaStreamSource::Typ e>(type), name, remote, readonly);
106 } 111 }
107 112
108 WebString WebMediaStreamSource::id() const 113 WebString WebMediaStreamSource::id() const
109 { 114 {
110 ASSERT(!m_private.isNull()); 115 ASSERT(!m_private.isNull());
111 return m_private.get()->id(); 116 return m_private.get()->id();
112 } 117 }
113 118
114 WebMediaStreamSource::Type WebMediaStreamSource::type() const 119 WebMediaStreamSource::Type WebMediaStreamSource::type() const
115 { 120 {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get()); 227 ConsumerWrapper* wrapper = static_cast<ConsumerWrapper*>(it->get());
223 if (wrapper->consumer() == consumer) { 228 if (wrapper->consumer() == consumer) {
224 m_private->removeAudioConsumer(wrapper); 229 m_private->removeAudioConsumer(wrapper);
225 return true; 230 return true;
226 } 231 }
227 } 232 }
228 return false; 233 return false;
229 } 234 }
230 235
231 } // namespace blink 236 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp ('k') | Source/platform/mediastream/MediaStreamSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698