Android: Generate JNI code for VideoSink and VideoEncoder
This is the first CL to start generating JNI code. It has updated two of the most recent classes to use JNI code generation. Bug: webrtc:8278 Change-Id: I1b19ee78c273346ceeaa0401dbdf8696803f16c7 Reviewed-on: https://webrtc-review.googlesource.com/3820 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#19994}
This commit is contained in:
committed by
Commit Bot
parent
bc7a1a97e9
commit
ba78b5a905
@ -123,26 +123,32 @@ public interface VideoEncoder {
|
||||
/**
|
||||
* Initializes the encoding process. Call before any calls to encode.
|
||||
*/
|
||||
VideoCodecStatus initEncode(Settings settings, Callback encodeCallback);
|
||||
@CalledByNative VideoCodecStatus initEncode(Settings settings, Callback encodeCallback);
|
||||
|
||||
/**
|
||||
* Releases the encoder. No more calls to encode will be made after this call.
|
||||
*/
|
||||
VideoCodecStatus release();
|
||||
@CalledByNative VideoCodecStatus release();
|
||||
|
||||
/**
|
||||
* Requests the encoder to encode a frame.
|
||||
*/
|
||||
VideoCodecStatus encode(VideoFrame frame, EncodeInfo info);
|
||||
@CalledByNative VideoCodecStatus encode(VideoFrame frame, EncodeInfo info);
|
||||
|
||||
/**
|
||||
* Informs the encoder of the packet loss and the round-trip time of the network.
|
||||
*
|
||||
* @param packetLoss How many packets are lost on average per 255 packets.
|
||||
* @param roundTripTimeMs Round-trip time of the network in milliseconds.
|
||||
*/
|
||||
VideoCodecStatus setChannelParameters(short packetLoss, long roundTripTimeMs);
|
||||
@CalledByNative VideoCodecStatus setChannelParameters(short packetLoss, long roundTripTimeMs);
|
||||
|
||||
/** Sets the bitrate allocation and the target framerate for the encoder. */
|
||||
VideoCodecStatus setRateAllocation(BitrateAllocation allocation, int framerate);
|
||||
@CalledByNative VideoCodecStatus setRateAllocation(BitrateAllocation allocation, int framerate);
|
||||
|
||||
/** Any encoder that wants to use WebRTC provided quality scaler must implement this method. */
|
||||
ScalingSettings getScalingSettings();
|
||||
@CalledByNative ScalingSettings getScalingSettings();
|
||||
|
||||
/** Should return a descriptive name for the implementation. Gets called once and cached. */
|
||||
String getImplementationName();
|
||||
@CalledByNative String getImplementationName();
|
||||
}
|
||||
|
||||
@ -19,5 +19,5 @@ public interface VideoSink {
|
||||
* this function returns. Each call to retain() should be followed by a call to frame.release()
|
||||
* when the reference is no longer needed.
|
||||
*/
|
||||
void onFrame(VideoFrame frame);
|
||||
@CalledByNative void onFrame(VideoFrame frame);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user