OLD | NEW |
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 Loading... |
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 OnFirstMediaPacketReceived() override { |
| 378 ScopedLocalRefFrame local_ref_frame(jni()); |
| 379 jmethodID m = GetMethodID(jni(), *j_observer_class_, |
| 380 "onFirstMediaPacketReceived", "()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 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2148 return JavaStringFromStdString( | 2156 return JavaStringFromStdString( |
2149 jni, | 2157 jni, |
2150 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); | 2158 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->id()); |
2151 } | 2159 } |
2152 | 2160 |
2153 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { | 2161 JOW(void, RtpReceiver_free)(JNIEnv* jni, jclass, jlong j_rtp_receiver_pointer) { |
2154 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); | 2162 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)->Release(); |
2155 } | 2163 } |
2156 | 2164 |
2157 } // namespace webrtc_jni | 2165 } // namespace webrtc_jni |
OLD | NEW |