mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-06 07:56:07 +00:00
Add start and stop callbacks for audio and video renderers
This commit is contained in:
@@ -2,6 +2,10 @@ package com.limelight.nvstream.av.audio;
|
||||
|
||||
public interface AudioRenderer {
|
||||
int setup(int audioConfiguration);
|
||||
|
||||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
void playDecodedAudio(byte[] audioData);
|
||||
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.limelight.nvstream.av.video;
|
||||
public abstract class VideoDecoderRenderer {
|
||||
public abstract int setup(int format, int width, int height, int redrawRate);
|
||||
|
||||
public abstract void start();
|
||||
|
||||
public abstract void stop();
|
||||
|
||||
public abstract int submitDecodeUnit(byte[] frameData, int frameLength);
|
||||
|
||||
public abstract void cleanup();
|
||||
|
||||
@@ -42,6 +42,18 @@ public class MoonBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeDrStart() {
|
||||
if (videoRenderer != null) {
|
||||
videoRenderer.start();
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeDrStop() {
|
||||
if (videoRenderer != null) {
|
||||
videoRenderer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeDrCleanup() {
|
||||
if (videoRenderer != null) {
|
||||
videoRenderer.cleanup();
|
||||
@@ -66,6 +78,18 @@ public class MoonBridge {
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeArStart() {
|
||||
if (audioRenderer != null) {
|
||||
audioRenderer.start();
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeArStop() {
|
||||
if (audioRenderer != null) {
|
||||
audioRenderer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
public static void bridgeArCleanup() {
|
||||
if (audioRenderer != null) {
|
||||
audioRenderer.cleanup();
|
||||
|
||||
Reference in New Issue
Block a user