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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 encoder_factory = new MediaCodecVideoEncoderFactory(); | 1096 encoder_factory = new MediaCodecVideoEncoderFactory(); |
1097 decoder_factory = new MediaCodecVideoDecoderFactory(); | 1097 decoder_factory = new MediaCodecVideoDecoderFactory(); |
1098 } | 1098 } |
1099 #endif | 1099 #endif |
1100 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( | 1100 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( |
1101 webrtc::CreatePeerConnectionFactory(worker_thread, | 1101 webrtc::CreatePeerConnectionFactory(worker_thread, |
1102 signaling_thread, | 1102 signaling_thread, |
1103 NULL, | 1103 NULL, |
1104 encoder_factory, | 1104 encoder_factory, |
1105 decoder_factory)); | 1105 decoder_factory)); |
| 1106 CHECK(factory) << "Failed to create the peer connection factory; " |
| 1107 << "WebRTC/libjingle init likely failed on this device"; |
1106 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads( | 1108 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads( |
1107 worker_thread, signaling_thread, | 1109 worker_thread, signaling_thread, |
1108 encoder_factory, decoder_factory, | 1110 encoder_factory, decoder_factory, |
1109 factory.release()); | 1111 factory.release()); |
1110 return jlongFromPointer(owned_factory); | 1112 return jlongFromPointer(owned_factory); |
1111 } | 1113 } |
1112 | 1114 |
1113 JOW(void, PeerConnectionFactory_freeFactory)(JNIEnv*, jclass, jlong j_p) { | 1115 JOW(void, PeerConnectionFactory_freeFactory)(JNIEnv*, jclass, jlong j_p) { |
1114 delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p); | 1116 delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p); |
1115 if (field_trials_init_string) { | 1117 if (field_trials_init_string) { |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size))); | 1822 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size))); |
1821 stream->ReadAll(buffer.get(), log_size, &read, nullptr); | 1823 stream->ReadAll(buffer.get(), log_size, &read, nullptr); |
1822 | 1824 |
1823 jbyteArray result = jni->NewByteArray(read); | 1825 jbyteArray result = jni->NewByteArray(read); |
1824 jni->SetByteArrayRegion(result, 0, read, buffer.get()); | 1826 jni->SetByteArrayRegion(result, 0, read, buffer.get()); |
1825 | 1827 |
1826 return result; | 1828 return result; |
1827 } | 1829 } |
1828 | 1830 |
1829 } // namespace webrtc_jni | 1831 } // namespace webrtc_jni |
OLD | NEW |