Inherits IDataSource.
Inherited by com.red5pro.streaming.source.R5Camera, and com.red5pro.streaming.source.R5Camera2.
|
void | close () |
|
boolean | isMuted () |
|
void | setMuted (boolean isMuted) |
|
void | setOrientation (int rotation) |
|
void | InitSubSource (int localBitrate) |
|
synchronized void | encode (byte[] input, long time, boolean reset) |
|
boolean | drain () |
|
long | getLastEncodeTime () |
|
void | RequestKeyFrame () |
|
void | setFrameType (int frameType) |
|
void | prepareFrame (byte[] input, byte[] output) |
|
int | getFrameSize () |
|
IDataSink | getClient () |
|
void | setClient (IDataSink client) |
|
void | setSDPTrack (SDPTrack track) |
|
SDPTrack | getSDPTrack () |
|
String | getName () |
|
int | getFramerate () |
|
void | setFramerate (int framerate) |
|
int | getKeyFramerate () |
|
void | setKeyFramerate (int keyFramerate) |
|
int | getBitrate () |
|
void | setBitrate (int bitrate) |
|
int | getWidth () |
|
int | getHeight () |
|
float | getDisplayAspect () |
|
int | getOrientation () |
|
void | setWidth (int width) |
|
void | setHeight (int height) |
|
void | setFrameListener (R5FrameListener listener) |
|
abstract void | setPreviewDisplay (SurfaceHolder holder) |
|
abstract void | startEncoding () |
|
abstract void | stopEncoding () |
|
|
static byte[] | YV12toYUV420Planar (byte[] input, byte[] output, int width, int height) |
|
static byte[] | SwapYV12toI420 (byte[] input, byte[] output, int width, int height) |
|
static byte[] | YV12ToSemiPlanar (byte[] input, byte[] output, int width, int height) |
|
static byte[] | YV12toNV21 (final byte[] input, final byte[] output, final int width, final int height) |
|
static byte[] | YV12toYUV420PackedSemiPlanar (final byte[] input, final byte[] output, final int width, final int height) |
|
|
boolean | customFrameHandled = false |
|
◆ close()
void com.red5pro.streaming.source.R5VideoSource.close |
( |
| ) |
|
|
inline |
◆ drain()
boolean com.red5pro.streaming.source.R5VideoSource.drain |
( |
| ) |
|
|
inline |
We call drain before calling encode to free up delayed frames from the hardware.
- Returns
◆ encode()
synchronized void com.red5pro.streaming.source.R5VideoSource.encode |
( |
byte[] |
input, |
|
|
long |
time, |
|
|
boolean |
reset |
|
) |
| |
|
inline |
After preparing a frame, encode it and send it to the network.
- Parameters
-
input | |
time | timestamp, in microseconds |
reset | true if Video size has changed since last call to encode. Reset is not needed in the very first call. It is used to change sizes mid-stream. |
◆ prepareFrame()
void com.red5pro.streaming.source.R5VideoSource.prepareFrame |
( |
byte[] |
input, |
|
|
byte[] |
output |
|
) |
| |
|
inline |
Prepare the input image for the media codec. Before calling this, the frame type of the input color space must be set,yv12,yuv420p, etc.. Initial support for YV12 only.
setFrameType(ImageFormat.YV12);
prepareFrame(input, output);
encode(output, time, doReset);
- Parameters
-
◆ RequestKeyFrame()
void com.red5pro.streaming.source.R5VideoSource.RequestKeyFrame |
( |
| ) |
|
|
inline |
Request a keyframe from the device. API level 19+
◆ setClient()
void com.red5pro.streaming.source.R5VideoSource.setClient |
( |
IDataSink |
client | ) |
|
|
inline |
A publishing data sink to send packets through
- Parameters
-
client | Object to drain into |
◆ setFrameType()
void com.red5pro.streaming.source.R5VideoSource.setFrameType |
( |
int |
frameType | ) |
|
|
inline |
- Parameters
-
ImageFormat | frameType
setFrameType(ImageFormat.YV12);
Initial support for YV12 only. |
◆ setOrientation()
void com.red5pro.streaming.source.R5VideoSource.setOrientation |
( |
int |
rotation | ) |
|
|
inline |
Set the display angle of rotation into the stream meta data for players to respond.
- Parameters
-
The documentation for this class was generated from the following file:
- /Users/ankitashankhdhar/Documents/Red5/Git/infrared5/red5pro-core-streaming-library/android/src/main/java/com/red5pro/streaming/source/R5VideoSource.java