From 87e5e83885c6e37165e11880e54c504e742f3eec Mon Sep 17 00:00:00 2001 From: burak Date: Tue, 20 Jun 2023 16:52:50 +0300 Subject: [PATCH 1/3] add height bitrate parameter to CustomBroadcast --- src/main/java/io/antmedia/AntMediaApplicationAdapter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/antmedia/AntMediaApplicationAdapter.java b/src/main/java/io/antmedia/AntMediaApplicationAdapter.java index ed5a731b1..49f5b4aa5 100644 --- a/src/main/java/io/antmedia/AntMediaApplicationAdapter.java +++ b/src/main/java/io/antmedia/AntMediaApplicationAdapter.java @@ -1764,7 +1764,7 @@ public void addFrameListener(String streamId, IFrameListener listener) { //for enterprise } - public IFrameListener createCustomBroadcast(String streamId) { + public IFrameListener createCustomBroadcast(String streamId, int height, int bitrate) { throw new IllegalStateException("This method is not implemented in Community Edition"); } From 518f762f1715f401f4e47d9c0b67444e8d956633 Mon Sep 17 00:00:00 2001 From: burak-58 Date: Mon, 18 Dec 2023 07:55:44 +0300 Subject: [PATCH 2/3] fix the merge problem --- src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java b/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java index 7897da848..7f34ee08b 100644 --- a/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java +++ b/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java @@ -167,9 +167,11 @@ public interface IAntMediaStreamHandler { * in the plugins. The returning frame listener should be feed with raw audio and video frames * * @param streamId + * @param height + * @param bitrate * @return */ - public IFrameListener createCustomBroadcast(String streamId); + public IFrameListener createCustomBroadcast(String streamId, int height, int bitrate); /** * Stop the custom broadcast that is being created. Stop encoders and make database operations. From d9db647eae8ec7869fab61c96087ea917acc098b Mon Sep 17 00:00:00 2001 From: burak Date: Tue, 17 Dec 2024 10:13:49 +0300 Subject: [PATCH 3/3] keep backward compatibility --- .../java/io/antmedia/AntMediaApplicationAdapter.java | 4 ++++ .../java/io/antmedia/muxer/IAntMediaStreamHandler.java | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/main/java/io/antmedia/AntMediaApplicationAdapter.java b/src/main/java/io/antmedia/AntMediaApplicationAdapter.java index 1ef006283..2b0510ac1 100644 --- a/src/main/java/io/antmedia/AntMediaApplicationAdapter.java +++ b/src/main/java/io/antmedia/AntMediaApplicationAdapter.java @@ -2249,6 +2249,10 @@ public boolean removePacketListener(String streamId, IPacketListener listener) { public void addFrameListener(String streamId, IFrameListener listener) { //for enterprise } + + public IFrameListener createCustomBroadcast(String streamId) { + throw new IllegalStateException("This method is not implemented in Community Edition"); + } public IFrameListener createCustomBroadcast(String streamId, int height, int bitrate) { throw new IllegalStateException("This method is not implemented in Community Edition"); diff --git a/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java b/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java index cf50f3493..bc0f34254 100644 --- a/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java +++ b/src/main/java/io/antmedia/muxer/IAntMediaStreamHandler.java @@ -176,6 +176,16 @@ public interface IAntMediaStreamHandler { */ public boolean removePacketListener(String streamId, IPacketListener listener); + /** + * Create another broadcast. It's useful to create another manipulated version of the original broadcast + * in the plugins. The returning frame listener should be feed with raw audio and video frames + * + * @param streamId + * @return + */ + public IFrameListener createCustomBroadcast(String streamId); + + /** * Create another broadcast. It's useful to create another manipulated version of the original broadcast * in the plugins. The returning frame listener should be feed with raw audio and video frames