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

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

Issue 1581693006: Adding "first packet received" notification to PeerConnectionObserver. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 } 367 }
368 368
369 void OnRenegotiationNeeded() override { 369 void OnRenegotiationNeeded() override {
370 ScopedLocalRefFrame local_ref_frame(jni()); 370 ScopedLocalRefFrame local_ref_frame(jni());
371 jmethodID m = 371 jmethodID m =
372 GetMethodID(jni(), *j_observer_class_, "onRenegotiationNeeded", "()V"); 372 GetMethodID(jni(), *j_observer_class_, "onRenegotiationNeeded", "()V");
373 jni()->CallVoidMethod(*j_observer_global_, m); 373 jni()->CallVoidMethod(*j_observer_global_, m);
374 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod"; 374 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
375 } 375 }
376 376
377 void OnFirstPacketReceived() override {
378 ScopedLocalRefFrame local_ref_frame(jni());
379 jmethodID m =
380 GetMethodID(jni(), *j_observer_class_, "onFirstPacketReceived", "()V");
381 jni()->CallVoidMethod(*j_observer_global_, m);
382 CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
383 }
384
377 void SetConstraints(ConstraintsWrapper* constraints) { 385 void SetConstraints(ConstraintsWrapper* constraints) {
378 RTC_CHECK(!constraints_.get()) << "constraints already set!"; 386 RTC_CHECK(!constraints_.get()) << "constraints already set!";
379 constraints_.reset(constraints); 387 constraints_.reset(constraints);
380 } 388 }
381 389
382 const ConstraintsWrapper* constraints() { return constraints_.get(); } 390 const ConstraintsWrapper* constraints() { return constraints_.get(); }
383 391
384 private: 392 private:
385 typedef std::map<MediaStreamInterface*, jobject> NativeToJavaStreamsMap; 393 typedef std::map<MediaStreamInterface*, jobject> NativeToJavaStreamsMap;
386 394
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 return JavaStringFromStdString( 2155 return JavaStringFromStdString(
2148 jni, 2156 jni,
2149 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); 2157 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id());
2150 } 2158 }
2151 2159
2152 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { 2160 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) {
2153 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); 2161 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release();
2154 } 2162 }
2155 2163
2156 } // namespace webrtc_jni 2164 } // namespace webrtc_jni
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698