Add start and stop callbacks for audio and video renderers

This commit is contained in:
Cameron Gutman
2017-05-21 13:04:50 -07:00
parent 5d90950591
commit 636c20d67b
5 changed files with 85 additions and 1 deletions

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();