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

Side by Side Diff: talk/app/webrtc/java/jni/peerconnection_jni.cc

Issue 1409323009: Add JNI interface for functions to start and stop recording AEC dumps and RTC event logs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Initial version. Created 5 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
« no previous file with comments | « no previous file | 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 * libjingle 2 * libjingle
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
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 met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 JNIEnv* jni, jclass, jlong native_factory, jstring id, 1244 JNIEnv* jni, jclass, jlong native_factory, jstring id,
1245 jlong native_source) { 1245 jlong native_source) {
1246 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( 1246 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1247 factoryFromJava(native_factory)); 1247 factoryFromJava(native_factory));
1248 rtc::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack( 1248 rtc::scoped_refptr<AudioTrackInterface> track(factory->CreateAudioTrack(
1249 JavaToStdString(jni, id), 1249 JavaToStdString(jni, id),
1250 reinterpret_cast<AudioSourceInterface*>(native_source))); 1250 reinterpret_cast<AudioSourceInterface*>(native_source)));
1251 return (jlong)track.release(); 1251 return (jlong)track.release();
1252 } 1252 }
1253 1253
1254 JOW(jboolean, PeerConnectionFactory_nativeStartAecDump)(
1255 JNIEnv* jni, jclass, jlong native_factory, jint file) {
terelius 2015/11/10 16:40:00 Can the file handle safely be cast to a jint and b
jiayl1 2015/11/10 17:00:04 Seems OK with http://developer.android.com/referen
terelius 2015/11/10 17:15:11 Ok. The RtcEventLog calls FILE* file_stream = rt
ivoc 2015/11/10 17:44:16 @terelius: Good question, I think I need to add an
ivoc 2015/11/10 17:44:16 @terelius: Good question, I think I need to add an
1256 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1257 factoryFromJava(native_factory));
1258 return factory->StartAecDump(file);
1259 }
1260
1261 JOW(void, PeerConnectionFactory_nativeStopAecDump)(
1262 JNIEnv* jni, jclass, jlong native_factory) {
1263 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1264 factoryFromJava(native_factory));
1265 factory->StopAecDump();
1266 }
1267
1268 JOW(jboolean, PeerConnectionFactory_nativeStartRtcEventLog)(
1269 JNIEnv* jni, jclass, jlong native_factory, jint file) {
1270 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1271 factoryFromJava(native_factory));
1272 return factory->StartRtcEventLog(file);
1273 }
1274
1275 JOW(void, PeerConnectionFactory_nativeStopRtcEventLog)(
1276 JNIEnv* jni, jclass, jlong native_factory) {
1277 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1278 factoryFromJava(native_factory));
1279 factory->StopRtcEventLog();
1280 }
1281
1254 JOW(void, PeerConnectionFactory_nativeSetOptions)( 1282 JOW(void, PeerConnectionFactory_nativeSetOptions)(
1255 JNIEnv* jni, jclass, jlong native_factory, jobject options) { 1283 JNIEnv* jni, jclass, jlong native_factory, jobject options) {
1256 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( 1284 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1257 factoryFromJava(native_factory)); 1285 factoryFromJava(native_factory));
1258 jclass options_class = jni->GetObjectClass(options); 1286 jclass options_class = jni->GetObjectClass(options);
1259 jfieldID network_ignore_mask_field = 1287 jfieldID network_ignore_mask_field =
1260 jni->GetFieldID(options_class, "networkIgnoreMask", "I"); 1288 jni->GetFieldID(options_class, "networkIgnoreMask", "I");
1261 int network_ignore_mask = 1289 int network_ignore_mask =
1262 jni->GetIntField(options, network_ignore_mask_field); 1290 jni->GetIntField(options, network_ignore_mask_field);
1263 1291
(...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2046 return JavaStringFromStdString( 2074 return JavaStringFromStdString(
2047 jni, 2075 jni,
2048 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); 2076 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id());
2049 } 2077 }
2050 2078
2051 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { 2079 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) {
2052 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); 2080 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release();
2053 } 2081 }
2054 2082
2055 } // namespace webrtc_jni 2083 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698