Adding "first packet received" notification to PeerConnectionObserver.

R=glaznev@webrtc.org, pthatcher@webrtc.org, tkchin@webrtc.org

Review URL: https://codereview.webrtc.org/1581693006 .

Cr-Commit-Position: refs/heads/master@{#11401}
This commit is contained in:
Taylor Brandstetter
2016-01-27 12:10:36 -08:00
parent 80f1db971d
commit 42265a8cc3
15 changed files with 79 additions and 0 deletions

View File

@ -374,6 +374,14 @@ class PCOJava : public PeerConnectionObserver {
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
}
void OnFirstMediaPacketReceived() override {
ScopedLocalRefFrame local_ref_frame(jni());
jmethodID m = GetMethodID(jni(), *j_observer_class_,
"onFirstMediaPacketReceived", "()V");
jni()->CallVoidMethod(*j_observer_global_, m);
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
}
void SetConstraints(ConstraintsWrapper* constraints) {
RTC_CHECK(!constraints_.get()) << "constraints already set!";
constraints_.reset(constraints);