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

Side by Side Diff: Source/platform/mediastream/MediaStreamComponent.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: Created 6 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Ericsson AB. All rights reserved. 2 * Copyright (C) 2011 Ericsson AB. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 24 matching lines...) Expand all
35 35
36 #include "platform/UUID.h" 36 #include "platform/UUID.h"
37 #include "platform/audio/AudioBus.h" 37 #include "platform/audio/AudioBus.h"
38 #include "platform/mediastream/MediaStreamSource.h" 38 #include "platform/mediastream/MediaStreamSource.h"
39 #include "public/platform/WebAudioSourceProvider.h" 39 #include "public/platform/WebAudioSourceProvider.h"
40 40
41 namespace blink { 41 namespace blink {
42 42
43 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt reamSource> source) 43 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(PassRefPtr<MediaSt reamSource> source)
44 { 44 {
45 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), source )); 45 return adoptRef(new MediaStreamComponent(createCanonicalUUIDString(), source , false));
46 } 46 }
47 47
48 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id, PassRefPtr<MediaStreamSource> source) 48 PassRefPtr<MediaStreamComponent> MediaStreamComponent::create(const String& id, PassRefPtr<MediaStreamSource> source, bool remote)
49 { 49 {
50 return adoptRef(new MediaStreamComponent(id, source)); 50 return adoptRef(new MediaStreamComponent(id, source, remote));
51 } 51 }
52 52
53 MediaStreamComponent::MediaStreamComponent(const String& id, PassRefPtr<MediaStr eamSource> source) 53 MediaStreamComponent::MediaStreamComponent(const String& id, PassRefPtr<MediaStr eamSource> source, bool remote)
54 : m_source(source) 54 : m_source(source)
55 , m_id(id) 55 , m_id(id)
56 , m_enabled(true) 56 , m_enabled(true)
57 , m_muted(false) 57 , m_muted(false)
58 , m_remote(remote)
58 { 59 {
59 ASSERT(m_id.length()); 60 ASSERT(m_id.length());
60 } 61 }
61 62
62 #if ENABLE(WEB_AUDIO) 63 #if ENABLE(WEB_AUDIO)
63 void MediaStreamComponent::AudioSourceProviderImpl::wrap(blink::WebAudioSourcePr ovider* provider) 64 void MediaStreamComponent::AudioSourceProviderImpl::wrap(blink::WebAudioSourcePr ovider* provider)
64 { 65 {
65 MutexLocker locker(m_provideInputLock); 66 MutexLocker locker(m_provideInputLock);
66 m_webAudioSourceProvider = provider; 67 m_webAudioSourceProvider = provider;
67 } 68 }
(...skipping 15 matching lines...) Expand all
83 blink::WebVector<float*> webAudioData(n); 84 blink::WebVector<float*> webAudioData(n);
84 for (size_t i = 0; i < n; ++i) 85 for (size_t i = 0; i < n; ++i)
85 webAudioData[i] = bus->channel(i)->mutableData(); 86 webAudioData[i] = bus->channel(i)->mutableData();
86 87
87 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess); 88 m_webAudioSourceProvider->provideInput(webAudioData, framesToProcess);
88 } 89 }
89 #endif // #if ENABLE(WEB_AUDIO) 90 #endif // #if ENABLE(WEB_AUDIO)
90 91
91 } // namespace blink 92 } // namespace blink
92 93
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698