1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "media/base/android/media_jni_registrar.h"
7 #include "base/basictypes.h"
8 #include "base/android/jni_android.h"
9 #include "base/android/jni_registrar.h"
11 #include "media/audio/android/audio_manager_android.h"
12 #include "media/audio/android/audio_record_input.h"
13 #include "media/base/android/media_codec_bridge.h"
14 #include "media/base/android/media_drm_bridge.h"
15 #include "media/base/android/media_player_bridge.h"
16 #include "media/base/android/media_player_listener.h"
17 #include "media/base/android/webaudio_media_codec_bridge.h"
18 #include "media/capture/video/android/video_capture_device_android.h"
19 #include "media/capture/video/android/video_capture_device_factory_android.h"
23 static base::android::RegistrationMethod kMediaRegisteredMethods
[] = {
24 { "AudioManagerAndroid",
25 AudioManagerAndroid::RegisterAudioManager
},
27 AudioRecordInputStream::RegisterAudioRecordInput
},
29 MediaCodecBridge::RegisterMediaCodecBridge
},
31 MediaDrmBridge::RegisterMediaDrmBridge
},
32 { "MediaPlayerBridge",
33 MediaPlayerBridge::RegisterMediaPlayerBridge
},
34 { "MediaPlayerListener",
35 MediaPlayerListener::RegisterMediaPlayerListener
},
36 { "VideoCaptureDevice",
37 VideoCaptureDeviceAndroid::RegisterVideoCaptureDevice
},
38 { "VideoCaptureDeviceFactory",
39 VideoCaptureDeviceFactoryAndroid::RegisterVideoCaptureDeviceFactory
},
40 { "WebAudioMediaCodecBridge",
41 WebAudioMediaCodecBridge::RegisterWebAudioMediaCodecBridge
},
44 bool RegisterJni(JNIEnv
* env
) {
45 return base::android::RegisterNativeMethods(
46 env
, kMediaRegisteredMethods
, arraysize(kMediaRegisteredMethods
));