java.lang.Object | |
↳ | com.amazonaws.ivs.broadcast.DeviceDiscovery |
Use this class to discover local devices, such as microphones or cameras, to attach to the SDK.
When you are no longer using any of the devices returned, you must call release()
to make sure resources are cleaned up properly. Once release()
is called,
the devices that have been returned may stop working, and are no longer valid for attaching to a Broadcast
or Stage.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
interface | DeviceDiscovery.OnDevicesChangedListener | A listener which notifies when the list of devices changes |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DeviceDiscovery(Context context) |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addOnDevicesChangedListener(DeviceDiscovery.OnDevicesChangedListener listener)
Add a listener to be notified about device changes
| ||||||||||
CustomAudioSource |
createAudioInputSource(int channels, BroadcastConfiguration.AudioSampleRate sampleRate, AudioDevice.Format format)
Create an audio input for a custom source.
| ||||||||||
CustomImageSource |
createImageInputSource(BroadcastConfiguration.Vec2 size)
Create an image input for a custom source.
| ||||||||||
List<Device> |
listLocalDevices()
List available devices for use without attaching to either Stage or Broadcast session.
| ||||||||||
synchronized void |
release()
Release the resources associated with this device discovery session.
| ||||||||||
void |
removeOnDevicesChangedListener(DeviceDiscovery.OnDevicesChangedListener listener)
Removes a previously added device change listener
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void | finalize() |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.amazonaws.ivs.broadcast.Releasable
|
Add a listener to be notified about device changes
listener | The listener to add |
---|
Create an audio input for a custom source. This should only be used if you intend to generate and feed pcm audio data to the SDK manually.
channels | The number of audio channels. |
---|---|
sampleRate | The sampling rate for the PCM audio. |
format | The sample format. |
AudioDevice
that represents as Surface and can receive your samples.BroadcastException | if the parameters are invalid |
---|
Create an image input for a custom source. This should only be used if you intend to generate and feed image data to the SDK manually.
SurfaceSource
that represents as Surface and can receive your samples.BroadcastException | if creating the image input source failed |
---|
List available devices for use without attaching to either Stage or Broadcast session.
Device
s representing attached devices such as cameras, microphones, and screen recording
sessions. Note that if the CAMERA
permission is not granted, no cameras will be returned.
Similarly if the RECORD_AUDIO
permission is not granted, no microphones will be returned.
Release the resources associated with this device discovery session.
Removes a previously added device change listener
listener | The listener to remove |
---|
Throwable |
---|