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.
4
5#include "media/base/android/media_jni_registrar.h"
6
7#include "base/basictypes.h"
8#include "base/android/jni_android.h"
9#include "base/android/jni_registrar.h"
10
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/midi/usb_midi_device_android.h"
19#include "media/midi/usb_midi_device_factory_android.h"
20#include "media/video/capture/android/video_capture_device_android.h"
21#include "media/video/capture/android/video_capture_device_factory_android.h"
22
23namespace media {
24
25static base::android::RegistrationMethod kMediaRegisteredMethods[] = {
26  { "AudioManagerAndroid",
27    AudioManagerAndroid::RegisterAudioManager },
28  { "AudioRecordInput",
29    AudioRecordInputStream::RegisterAudioRecordInput },
30  { "MediaCodecBridge",
31    MediaCodecBridge::RegisterMediaCodecBridge },
32  { "MediaDrmBridge",
33    MediaDrmBridge::RegisterMediaDrmBridge },
34  { "MediaPlayerBridge",
35    MediaPlayerBridge::RegisterMediaPlayerBridge },
36  { "MediaPlayerListener",
37    MediaPlayerListener::RegisterMediaPlayerListener },
38  { "UsbMidiDevice",
39    UsbMidiDeviceAndroid::RegisterUsbMidiDevice },
40  { "UsbMidiDeviceFactory",
41    UsbMidiDeviceFactoryAndroid::RegisterUsbMidiDeviceFactory },
42  { "VideoCaptureDevice",
43    VideoCaptureDeviceAndroid::RegisterVideoCaptureDevice },
44  { "VideoCaptureDeviceFactory",
45    VideoCaptureDeviceFactoryAndroid::RegisterVideoCaptureDeviceFactory },
46  { "WebAudioMediaCodecBridge",
47    WebAudioMediaCodecBridge::RegisterWebAudioMediaCodecBridge },
48};
49
50bool RegisterJni(JNIEnv* env) {
51  return base::android::RegisterNativeMethods(
52      env, kMediaRegisteredMethods, arraysize(kMediaRegisteredMethods));
53}
54
55}  // namespace media
56