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

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

Issue 1344363002: Revert of Bailing out if pc factory fails to get created. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 3 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
« 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 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after
1095 encoder_factory = new MediaCodecVideoEncoderFactory(); 1095 encoder_factory = new MediaCodecVideoEncoderFactory();
1096 decoder_factory = new MediaCodecVideoDecoderFactory(); 1096 decoder_factory = new MediaCodecVideoDecoderFactory();
1097 } 1097 }
1098 #endif 1098 #endif
1099 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory( 1099 rtc::scoped_refptr<PeerConnectionFactoryInterface> factory(
1100 webrtc::CreatePeerConnectionFactory(worker_thread, 1100 webrtc::CreatePeerConnectionFactory(worker_thread,
1101 signaling_thread, 1101 signaling_thread,
1102 NULL, 1102 NULL,
1103 encoder_factory, 1103 encoder_factory,
1104 decoder_factory)); 1104 decoder_factory));
1105 CHECK(factory) << "Failed to create the peer connection factory; "
1106 << "WebRTC/libjingle init likely failed on this device";
1107 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads( 1105 OwnedFactoryAndThreads* owned_factory = new OwnedFactoryAndThreads(
1108 worker_thread, signaling_thread, 1106 worker_thread, signaling_thread,
1109 encoder_factory, decoder_factory, 1107 encoder_factory, decoder_factory,
1110 factory.release()); 1108 factory.release());
1111 return jlongFromPointer(owned_factory); 1109 return jlongFromPointer(owned_factory);
1112 } 1110 }
1113 1111
1114 JOW(void, PeerConnectionFactory_freeFactory)(JNIEnv*, jclass, jlong j_p) { 1112 JOW(void, PeerConnectionFactory_freeFactory)(JNIEnv*, jclass, jlong j_p) {
1115 delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p); 1113 delete reinterpret_cast<OwnedFactoryAndThreads*>(j_p);
1116 if (field_trials_init_string) { 1114 if (field_trials_init_string) {
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size))); 1819 rtc::scoped_ptr<jbyte> buffer(static_cast<jbyte*>(malloc(log_size)));
1822 stream->ReadAll(buffer.get(), log_size, &read, nullptr); 1820 stream->ReadAll(buffer.get(), log_size, &read, nullptr);
1823 1821
1824 jbyteArray result = jni->NewByteArray(read); 1822 jbyteArray result = jni->NewByteArray(read);
1825 jni->SetByteArrayRegion(result, 0, read, buffer.get()); 1823 jni->SetByteArrayRegion(result, 0, read, buffer.get());
1826 1824
1827 return result; 1825 return result;
1828 } 1826 }
1829 1827
1830 } // namespace webrtc_jni 1828 } // 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