Expose session scoped Android stream operations
This commit is contained in:
1 parent
6f544b4ca2
commit
2f707366f3
1 file changed
+19
@@ -197,6 +197,25 @@ object NativeLib {
|
||||
replyTo: String = "", requestId: Long = 0): Boolean =
|
||||
nativeVideoSend(channelId, filePath, durationMs, width, height, messageIdBytes(replyTo), requestId)
|
||||
|
||||
/* Live media используют отдельную ограниченную очередь, минуя чатовый event bus. */
|
||||
fun streamOpen(id: Long, group: Long, source: Long = 0, width: Int = 0, height: Int = 0,
|
||||
rotation: Int = 0, audio: Boolean = true): Boolean = nativeStreamOpen(id, group, source, width, height, rotation, audio)
|
||||
fun streamFeed(id: Long, video: Boolean, pts: Long, key: Boolean, data: ByteArray): Int = nativeStreamFeed(id, video, pts, key, data)
|
||||
fun streamStop(id: Long) { nativeStreamStop(id) }
|
||||
fun streamPull(id: Long): ByteArray? = nativeStreamPull(id)
|
||||
fun streamOpusCreate(encode: Boolean): Long = nativeStreamOpusCreate(encode)
|
||||
fun streamOpusEncode(handle: Long, pcm: ShortArray): ByteArray? = nativeStreamOpusEncode(handle, pcm)
|
||||
fun streamOpusDecode(handle: Long, packet: ByteArray): ShortArray? = nativeStreamOpusDecode(handle, packet)
|
||||
fun streamOpusClose(handle: Long) { nativeStreamOpusClose(handle) }
|
||||
private external fun nativeStreamOpen(id: Long, group: Long, source: Long, width: Int, height: Int, rotation: Int, audio: Boolean): Boolean
|
||||
private external fun nativeStreamFeed(id: Long, video: Boolean, pts: Long, key: Boolean, data: ByteArray): Int
|
||||
private external fun nativeStreamStop(id: Long)
|
||||
private external fun nativeStreamPull(id: Long): ByteArray?
|
||||
private external fun nativeStreamOpusCreate(encode: Boolean): Long
|
||||
private external fun nativeStreamOpusEncode(handle: Long, pcm: ShortArray): ByteArray?
|
||||
private external fun nativeStreamOpusDecode(handle: Long, packet: ByteArray): ShortArray?
|
||||
private external fun nativeStreamOpusClose(handle: Long)
|
||||
|
||||
/* ── Photo message ── */
|
||||
fun photoSend(channelId: String, filePath: String, width: Int, height: Int, replyTo: String = "", requestId: Long = 0): Boolean =
|
||||
nativePhotoSend(channelId, filePath, width, height, messageIdBytes(replyTo), requestId)
|
||||
|
||||
Reference in new issue
Block a user