Agora Java API Reference for Android
|
Public Member Functions | |
boolean | onInitialize (IVideoFrameConsumer consumer) |
boolean | onStart () |
void | onStop () |
void | onDispose () |
int | getBufferType () |
default video source object of MediaEngine. For forward compatible only.
boolean io.agora.rtc.mediaio.AgoraDefaultSource.onInitialize | ( | IVideoFrameConsumer | consumer | ) |
Initializes the video source.
This callback initializes the video source. You can enable the camera or initialize the video source and then pass one of the following return values to inform the media engine whether the video source is ready.
consumer | The IVideoFrameConsumer object which the media engine passes back. You need to reserve this object and pass the video frame to the media engine through this object once the video source is initialized. See the following contents for the definition of IVideoFrameConsumer. |
Implements io.agora.rtc.mediaio.IVideoSource.
boolean io.agora.rtc.mediaio.AgoraDefaultSource.onStart | ( | ) |
Enables the video source.
The SDK triggers this callback when the underlying media engine is ready to start video streaming. You should start the video source to capture the video frame. Once the frame is ready, use IVideoFrameConsumer to consume the video frame.
Implements io.agora.rtc.mediaio.IVideoSource.
void io.agora.rtc.mediaio.AgoraDefaultSource.onStop | ( | ) |
Stops the video source.
The SDK triggers this callback when the media engine stops streaming. You should then stop capturing and consuming the video frame. After calling this method, the video frames are discarded by the media engine.
Implements io.agora.rtc.mediaio.IVideoSource.
void io.agora.rtc.mediaio.AgoraDefaultSource.onDispose | ( | ) |
Releases the video source.
The SDK triggers this callback when IVideoFrameConsumer is released by the media engine. You can now release the video source as well as IVideoFrameConsumer.
Implements io.agora.rtc.mediaio.IVideoSource.
int io.agora.rtc.mediaio.AgoraDefaultSource.getBufferType | ( | ) |
Gets the buffer type.
The SDK triggers this callback to get the buffer type of the video frame when it is being initialized. You need to specify one buffer type and then pass it to the media engine.
Implements io.agora.rtc.mediaio.IVideoSource.