OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "init_webrtc.h" | 5 #include "init_webrtc.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 return initialize_module(*CommandLine::ForCurrentProcess(), | 77 return initialize_module(*CommandLine::ForCurrentProcess(), |
78 #if !defined(OS_MACOSX) | 78 #if !defined(OS_MACOSX) |
79 &Allocate, &Dellocate, | 79 &Allocate, &Dellocate, |
80 #endif | 80 #endif |
81 &g_create_webrtc_media_engine, &g_destroy_webrtc_media_engine); | 81 &g_create_webrtc_media_engine, &g_destroy_webrtc_media_engine); |
82 } | 82 } |
83 | 83 |
84 cricket::MediaEngineInterface* CreateWebRtcMediaEngine( | 84 cricket::MediaEngineInterface* CreateWebRtcMediaEngine( |
85 webrtc::AudioDeviceModule* adm, | 85 webrtc::AudioDeviceModule* adm, |
86 webrtc::AudioDeviceModule* adm_sc, | 86 webrtc::AudioDeviceModule* adm_sc, |
| 87 cricket::WebRtcVideoEncoderFactory* encoder_factory, |
87 cricket::WebRtcVideoDecoderFactory* decoder_factory) { | 88 cricket::WebRtcVideoDecoderFactory* decoder_factory) { |
88 // For convenience of tests etc, we call InitializeWebRtcModule here. | 89 // For convenience of tests etc, we call InitializeWebRtcModule here. |
89 // For Chrome however, InitializeWebRtcModule must be called | 90 // For Chrome however, InitializeWebRtcModule must be called |
90 // explicitly before the sandbox is initialized. In that case, this call is | 91 // explicitly before the sandbox is initialized. In that case, this call is |
91 // effectively a noop. | 92 // effectively a noop. |
92 InitializeWebRtcModule(); | 93 InitializeWebRtcModule(); |
93 return g_create_webrtc_media_engine(adm, adm_sc, decoder_factory); | 94 return g_create_webrtc_media_engine(adm, adm_sc, encoder_factory, |
| 95 decoder_factory); |
94 } | 96 } |
95 | 97 |
96 void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { | 98 void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine) { |
97 g_destroy_webrtc_media_engine(media_engine); | 99 g_destroy_webrtc_media_engine(media_engine); |
98 } | 100 } |
99 | 101 |
100 #endif // LIBPEERCONNECTION_LIB | 102 #endif // LIBPEERCONNECTION_LIB |
OLD | NEW |