From 829f1d84969e0f181529a00301c94c0c2ea67805 Mon Sep 17 00:00:00 2001 From: zoff99 Date: Sun, 8 Dec 2024 11:07:55 +0100 Subject: [PATCH] show incoming H265 codec video in top status --- .../main/java/com/zoffcc/applications/trifa/Callstate.java | 5 +++++ .../java/com/zoffcc/applications/trifa/MainActivity.java | 7 +++++++ .../java/com/zoffcc/applications/trifa/TRIFAGlobals.java | 1 + .../main/java/com/zoffcc/applications/trifa/ToxVars.java | 3 ++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/Callstate.java b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/Callstate.java index 10d7c8adf..f61f3a356 100644 --- a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/Callstate.java +++ b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/Callstate.java @@ -26,6 +26,7 @@ import static com.zoffcc.applications.trifa.CallingActivity.set_debug_text; import static com.zoffcc.applications.trifa.TRIFAGlobals.GLOBAL_AUDIO_BITRATE; import static com.zoffcc.applications.trifa.TRIFAGlobals.GLOBAL_VIDEO_BITRATE; +import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_CODEC_H265; import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_CODEC_VP8; public class Callstate @@ -112,6 +113,10 @@ public static String codec_to_str(long v) { return "VP8"; } + else if (v == VIDEO_CODEC_H265) + { + return "HEVC"; + } else { return "H264"; diff --git a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/MainActivity.java b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/MainActivity.java index b9292dfe7..989c74fac 100644 --- a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/MainActivity.java +++ b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/MainActivity.java @@ -253,6 +253,7 @@ import static com.zoffcc.applications.trifa.TRIFAGlobals.VFS_PREFIX; import static com.zoffcc.applications.trifa.TRIFAGlobals.VFS_TMP_FILE_DIR; import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_CODEC_H264; +import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_CODEC_H265; import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_CODEC_VP8; import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_FRAME_RATE_INCOMING; import static com.zoffcc.applications.trifa.TRIFAGlobals.VIDEO_FRAME_RATE_OUTGOING; @@ -272,6 +273,7 @@ import static com.zoffcc.applications.trifa.TRIFAGlobals.orbot_is_really_running; import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_DECODER_CURRENT_BITRATE; import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_DECODER_IN_USE_H264; +import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_DECODER_IN_USE_H265; import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_DECODER_IN_USE_VP8; import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_ENCODER_CURRENT_BITRATE; import static com.zoffcc.applications.trifa.ToxVars.TOXAV_CALL_COMM_INFO.TOXAV_CALL_COMM_ENCODER_IN_USE_H264; @@ -4082,6 +4084,11 @@ else if (a_TOXAV_CALL_COMM_INFO == TOXAV_CALL_COMM_DECODER_IN_USE_H264.value) // Log.i(TAG, "android_toxav_callback_call_comm_cb_method:4:" + a_TOXAV_CALL_COMM_INFO + ":" + comm_number); Callstate.video_in_codec = VIDEO_CODEC_H264; } + else if (a_TOXAV_CALL_COMM_INFO == TOXAV_CALL_COMM_DECODER_IN_USE_H265.value) + { + // Log.i(TAG, "android_toxav_callback_call_comm_cb_method:4:" + a_TOXAV_CALL_COMM_INFO + ":" + comm_number); + Callstate.video_in_codec = VIDEO_CODEC_H265; + } else if (a_TOXAV_CALL_COMM_INFO == TOXAV_CALL_COMM_ENCODER_IN_USE_VP8.value) { Callstate.video_out_codec = VIDEO_CODEC_VP8; diff --git a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/TRIFAGlobals.java b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/TRIFAGlobals.java index a8c40e82f..d84525ea2 100644 --- a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/TRIFAGlobals.java +++ b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/TRIFAGlobals.java @@ -239,6 +239,7 @@ public class TRIFAGlobals static final int VIDEO_CODEC_VP8 = 0; static final int VIDEO_CODEC_H264 = 1; + static final int VIDEO_CODEC_H265 = 2; static final int MAX_LEN_TOXENCRYPTSAVE_PASSPHRASE = 256; static final int LEN_TRIFA_AUTOGEN_PASSWORD = 32; diff --git a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/ToxVars.java b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/ToxVars.java index cd12e56f3..39e76eda8 100644 --- a/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/ToxVars.java +++ b/android-refimpl-app/app/src/main/java/com/zoffcc/applications/trifa/ToxVars.java @@ -1589,7 +1589,8 @@ public static enum TOXAV_CALL_COMM_INFO 3), TOXAV_CALL_COMM_ENCODER_IN_USE_H264_OMX_PI(6), TOXAV_CALL_COMM_DECODER_CURRENT_BITRATE( 4), TOXAV_CALL_COMM_ENCODER_CURRENT_BITRATE(5), TOXAV_CALL_COMM_NETWORK_ROUND_TRIP_MS( 7), TOXAV_CALL_COMM_PLAY_DELAY(8), TOXAV_CALL_COMM_PLAY_BUFFER_ENTRIES(9), TOXAV_CALL_COMM_INCOMING_FPS( - 10), TOXAV_CALL_COMM_REMOTE_RECORD_DELAY(11); + 10), TOXAV_CALL_COMM_REMOTE_RECORD_DELAY(11), TOXAV_CALL_COMM_ENCODER_IN_USE_H265(15), + TOXAV_CALL_COMM_DECODER_IN_USE_H265(16); public int value;