Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak audio filters, show offline peercount in tooltip #262

Merged
merged 4 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions resources/common/bd.rnnn

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions resources/common/cb.rnnn

Large diffs are not rendered by default.

Binary file modified resources/common/ffmpeg_av_jni.dll
Binary file not shown.
Binary file modified resources/common/libffmpeg_av_jni.jnilib
Binary file not shown.
Binary file modified resources/common/libffmpeg_av_jni.so
Binary file not shown.
Binary file modified resources/common/libffmpeg_av_jni_arm64.jnilib
Binary file not shown.
Binary file modified resources/common/libffmpeg_av_jni_raspi.so
Binary file not shown.
22 changes: 22 additions & 0 deletions resources/common/lq.rnnn

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions resources/common/sh.rnnn

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions src/main/java/com/zoffcc/applications/ffmpegav/AVActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
public class AVActivity {

private static final String TAG = "ffmpegav.AVActivity";
static final String Version = "0.99.25";
static final String Version = "0.99.26";
public static final String JAVA_AUDIO_IN_DEVICE_NAME = "Java Audio in (-fallback-)";

private static boolean java_audio_in_device_used = false;
Expand Down Expand Up @@ -278,7 +278,7 @@ private static void ffmpegav_start_java_audio_in_capture()
try {
if (t_audio_rec != null)
{
t_audio_rec.join(1000);
t_audio_rec.join(1000);
}
} catch (Exception ignored) {
} finally {
Expand Down Expand Up @@ -765,16 +765,16 @@ public static void main(String[] args) {
@Override
public void onSuccess(long width, long height, long source_width, long source_height, long pts, int fps, int source_format) {
Log.i(TAG, "ffmpeg open video capture onSuccess:" + width + " " + height + " " +
source_width + " " + source_height + " " + pts + " fps: " + fps +
" source_format: " + ffmpegav_video_source_format_name.value_str(source_format));
source_width + " " + source_height + " " + pts + " fps: " + fps +
" source_format: " + ffmpegav_video_source_format_name.value_str(source_format));
}
@Override
public void onError() {
}
@Override
public void onBufferTooSmall(int y_buffer_size, int u_buffer_size, int v_buffer_size) {
Log.i(TAG, "Video buffer too small, needed sizes: " + y_buffer_size
+ " " + u_buffer_size + " "+ v_buffer_size);
+ " " + u_buffer_size + " "+ v_buffer_size);
ffmpegav_video_buffer_2_y = java.nio.ByteBuffer.allocateDirect(y_buffer_size);
ffmpegav_video_buffer_2_u = java.nio.ByteBuffer.allocateDirect(u_buffer_size);
ffmpegav_video_buffer_2_v = java.nio.ByteBuffer.allocateDirect(v_buffer_size);
Expand Down Expand Up @@ -854,11 +854,11 @@ public void onBufferTooSmall(int audio_buffer_size) {
// -----------------------
// -----------------------
final int res_vd2 = ffmpegav_open_video_in_device(vdevice,
vsource, 640, 480, 15, 0);
vsource, 640, 480, 15, 0);
Log.i(TAG, "ffmpeg open video capture device: " + res_vd2);

final int res_ad2 = ffmpegav_open_audio_in_device_wrapper(adevice,
asource);
asource);
Log.i(TAG, "ffmpeg open audio capture device: " + res_ad2);
ffmpegav_start_video_in_capture();
ffmpegav_start_audio_in_capture_wrapper();
Expand Down Expand Up @@ -925,7 +925,7 @@ public void run() {
{
Log.i(TAG, "T1: ffmpeg open video capture device:start");
final int res_vd2 = ffmpegav_open_video_in_device(vdevice_,
vsource_, 640, 480, 15, 0);
vsource_, 640, 480, 15, 0);
Log.i(TAG, "T1: ffmpeg open video capture device:done");
int low = 10;
int high = 80;
Expand Down Expand Up @@ -970,7 +970,7 @@ public void run() {
{
Log.i(TAG, "T3: ffmpeg open video capture device:start");
final int res_vd2 = ffmpegav_open_video_in_device(vdevice_,
vsource_, 640, 480, 15, 0);
vsource_, 640, 480, 15, 0);
Log.i(TAG, "T3: ffmpeg open video capture device:done");
int low = 10;
int high = 80;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.style.TextOverflow.Companion.Ellipsis
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.zoffcc.applications.trifa.HelperGroup.tox_group_by_groupid__wrapper
import com.zoffcc.applications.trifa.Log
import com.zoffcc.applications.trifa.MainActivity.Companion.tox_group_offline_peer_count
import com.zoffcc.applications.trifa.TAG
import com.zoffcc.applications.trifa.ToxVars
import com.zoffcc.applications.trifa.ToxVars.TOX_GROUP_PRIVACY_STATE
Expand Down Expand Up @@ -141,9 +143,12 @@ private fun GroupItemViewInfo(groupItem: GroupItem) = Column(
if (groupItem.privacyState == ToxVars.TOX_GROUP_PRIVACY_STATE.TOX_GROUP_PRIVACY_STATE_PUBLIC.value) {
p_state = "public"
}
val group_num_ = tox_group_by_groupid__wrapper(groupItem.groupId)
val offline_num_peers = tox_group_offline_peer_count(group_num_)
Tooltip(text = "Group Name: " + groupItem.name + "\n"
+ "Group ID: " + groupItem.groupId + "\n"
+ "Group Privacy State: " + p_state + "\n"
+ "Offline Peers: " + offline_num_peers + "\n"
) {
Text(
text = groupItem.name,
Expand Down
Loading