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

Side by Side Diff: webrtc/sdk/android/src/jni/peerconnection_jni.cc

Issue 2628523003: Stop using deprecated constraints-based version of CreateAudioSource. (Closed)
Patch Set: Missing bang. Created 3 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
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 reinterpret_cast<VideoTrackSourceInterface*>(native_source))); 1428 reinterpret_cast<VideoTrackSourceInterface*>(native_source)));
1429 return (jlong)track.release(); 1429 return (jlong)track.release();
1430 } 1430 }
1431 1431
1432 JOW(jlong, PeerConnectionFactory_nativeCreateAudioSource)( 1432 JOW(jlong, PeerConnectionFactory_nativeCreateAudioSource)(
1433 JNIEnv* jni, jclass, jlong native_factory, jobject j_constraints) { 1433 JNIEnv* jni, jclass, jlong native_factory, jobject j_constraints) {
1434 std::unique_ptr<ConstraintsWrapper> constraints( 1434 std::unique_ptr<ConstraintsWrapper> constraints(
1435 new ConstraintsWrapper(jni, j_constraints)); 1435 new ConstraintsWrapper(jni, j_constraints));
1436 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( 1436 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1437 factoryFromJava(native_factory)); 1437 factoryFromJava(native_factory));
1438 cricket::AudioOptions options;
1439 CopyConstraintsIntoAudioOptions(constraints.get(), &options);
1438 rtc::scoped_refptr<AudioSourceInterface> source( 1440 rtc::scoped_refptr<AudioSourceInterface> source(
1439 factory->CreateAudioSource(constraints.get())); 1441 factory->CreateAudioSource(options));
1440 return (jlong)source.release(); 1442 return (jlong)source.release();
1441 } 1443 }
1442 1444
1443 JOW(jlong, PeerConnectionFactory_nativeCreateAudioTrack)( 1445 JOW(jlong, PeerConnectionFactory_nativeCreateAudioTrack)(
1444 JNIEnv* jni, jclass, jlong native_factory, jstring id, 1446 JNIEnv* jni, jclass, jlong native_factory, jstring id,
1445 jlong native_source) { 1447 jlong native_source) {
1446 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( 1448 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1447 factoryFromJava(native_factory)); 1449 factoryFromJava(native_factory));
1448 rtc::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack( 1450 rtc::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack(
1449 JavaToStdString(jni, id), 1451 JavaToStdString(jni, id),
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer) 2589 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)
2588 ->SetObserver(nullptr); 2590 ->SetObserver(nullptr);
2589 RtpReceiverObserver* observer = 2591 RtpReceiverObserver* observer =
2590 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer); 2592 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer);
2591 if (observer) { 2593 if (observer) {
2592 delete observer; 2594 delete observer;
2593 } 2595 }
2594 } 2596 }
2595 2597
2596 } // namespace webrtc_jni 2598 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/api/peerconnectioninterface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698