Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package droidcam for openSUSE:Factory 
checked in at 2023-04-14 13:14:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/droidcam (Old)
 and      /work/SRC/openSUSE:Factory/.droidcam.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "droidcam"

Fri Apr 14 13:14:15 2023 rev:5 rq:1079400 version:1.9.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/droidcam/droidcam.changes        2022-05-23 
15:51:59.634660419 +0200
+++ /work/SRC/openSUSE:Factory/.droidcam.new.19717/droidcam.changes     
2023-04-14 13:14:18.931988447 +0200
@@ -1,0 +2,11 @@
+Fri Apr  7 09:38:41 UTC 2023 - Andrea Manzini <andrea.manz...@suse.com>
+
+- Update to version 1.9.0
+  * Increase the socket timeout, extra logging
+  * Fixup a/v/batt syncing
+  * Fix the White-Balance menu
+  * Fix battery value parsing
+  * Support ayatana-appindicator
+  * Continue trying when setting audio hwparams fails
+
+-------------------------------------------------------------------

Old:
----
  droidcam-1.8.2.tar.gz

New:
----
  droidcam-1.9.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ droidcam.spec ++++++
--- /var/tmp/diff_new_pack.6EJskq/_old  2023-04-14 13:14:19.475991558 +0200
+++ /var/tmp/diff_new_pack.6EJskq/_new  2023-04-14 13:14:19.479991581 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package droidcam
 #
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           droidcam
-Version:        1.8.2
+Version:        1.9.0
 Release:        0
 Summary:        Program to turn a mobile device into a webcam
 License:        GPL-2.0-or-later
@@ -41,7 +41,7 @@
 # BuildRequires:  pkgconfig(libusbmuxd-2.0)
 BuildRequires:  libusbmuxd-devel
 BuildRequires:  pkgconfig(speex)
-Requires:       hicolor-icon-theme
+Requires:       hicolor-icon-theme >= 0.17
 Requires:       kmod(v4l2loopback.ko)
 # USB connection uses adb for Android, other
 # options are usbmuxd (iOS) or Wifi
@@ -65,8 +65,7 @@
 live streaming programs like OBS.
 
 %prep
-%setup -q
-%autopatch -p1
+%autosetup -p1
 
 %build
 export USBMUXDLIBS="`pkg-config --silence-errors --libs libusbmuxd-2.0 || 
pkg-config --silence-errors --libs libusbmuxd`"

++++++ 0001-Use-icon-installed-to-theme-directory.patch ++++++
--- /var/tmp/diff_new_pack.6EJskq/_old  2023-04-14 13:14:19.499991695 +0200
+++ /var/tmp/diff_new_pack.6EJskq/_new  2023-04-14 13:14:19.499991695 +0200
@@ -1,8 +1,8 @@
-diff --git a/src/droidcam.c b/src/droidcam.c
-index cad1ee4..7a6ff4c 100644
---- a/src/droidcam.c
-+++ b/src/droidcam.c
-@@ -43,7 +43,7 @@ struct settings g_settings = {0};
+Index: droidcam-1.9.0/src/droidcam.c
+===================================================================
+--- droidcam-1.9.0.orig/src/droidcam.c
++++ droidcam-1.9.0/src/droidcam.c
+@@ -50,7 +50,7 @@ struct settings g_settings = {0};
  extern const char *thread_cmd_val_str;
  extern char snd_device[32];
  extern char v4l2_device[32];
@@ -11,7 +11,7 @@
  
  void * AudioThreadProc(void * args);
  void * VideoThreadProc(void * args);
-@@ -416,7 +416,7 @@ ERROR:
+@@ -425,7 +425,7 @@ ERROR:
  // Example discussion: https://github.com/dino/dino/issues/98
  #if 1
  static void add_indicator(GtkWidget *window) {
@@ -20,7 +20,7 @@
        GtkWidget *menu = gtk_menu_new();
        GtkWidget *name_menu_item = gtk_menu_item_new_with_label("Droidcam");
        GtkWidget *show_menu_item = gtk_menu_item_new_with_label("Show");
-@@ -464,7 +464,7 @@ int main(int argc, char *argv[])
+@@ -473,7 +473,7 @@ int main(int argc, char *argv[])
        gtk_window_set_resizable(GTK_WINDOW(window), FALSE);
        gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_NONE);
        gtk_container_set_border_width(GTK_CONTAINER(window), 4);

++++++ 0003-Hack-backwards-compatibility-for-TurboJPEG-2.0.0.patch ++++++
--- /var/tmp/diff_new_pack.6EJskq/_old  2023-04-14 13:14:19.507991741 +0200
+++ /var/tmp/diff_new_pack.6EJskq/_new  2023-04-14 13:14:19.511991764 +0200
@@ -1,7 +1,7 @@
-diff --git a/src/decoder.c b/src/decoder.c
-index 5c72ceb..a408d72 100644
---- a/src/decoder.c
-+++ b/src/decoder.c
+Index: droidcam-1.9.0/src/decoder.c
+===================================================================
+--- droidcam-1.9.0.orig/src/decoder.c
++++ droidcam-1.9.0/src/decoder.c
 @@ -31,6 +31,15 @@ extern "C"
  }
  #endif

++++++ droidcam-1.8.2.tar.gz -> droidcam-1.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/Makefile new/droidcam-1.9.0/Makefile
--- old/droidcam-1.8.2/Makefile 2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/Makefile 2023-03-21 21:10:48.000000000 +0100
@@ -6,24 +6,35 @@
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 # Use at your own risk. See README file for more details.
 
-JPEG_DIR ?= /opt/libjpeg-turbo
+#
+# Variables with ?= can be changed during invocation
+# Example:
+#  APPINDICATOR=ayatana-appindicator3-0.1 make droidcam
+
+APPINDICATOR ?= appindicator3-0.1
+JPEG_DIR     ?= /opt/libjpeg-turbo
 JPEG_INCLUDE ?= $(JPEG_DIR)/include
-JPEG_LIB ?= $(JPEG_DIR)/lib`getconf LONG_BIT`
+JPEG_LIB     ?= $(JPEG_DIR)/lib`getconf LONG_BIT`
+
 
 CC   = gcc
 CFLAGS = -Wall -O2
 GTK   = `pkg-config --libs --cflags gtk+-3.0` `pkg-config --libs x11`
-GTK  += `pkg-config --cflags --libs appindicator3-0.1`
+GTK  += `pkg-config --libs --cflags $(APPINDICATOR)`
 LIBAV = `pkg-config --libs --cflags libswscale libavutil`
 LIBS  =  -lspeex -lasound -lpthread -lm
 JPEG  = -I$(JPEG_INCLUDE) $(JPEG_LIB)/libturbojpeg.a
 SRC   = src/connection.c src/settings.c src/decoder*.c src/av.c src/usb.c 
src/queue.c
 USBMUXD = -lusbmuxd
 
+ifneq ($(findstring ayatana,$(APPINDICATOR)),)
+       CFLAGS += -DUSE_AYATANA_APPINDICATOR
+endif
+
+
 all: droidcam-cli droidcam
 
 ifneq "$(RELEASE)" ""
-LIBAV = /usr/lib/x86_64-linux-gnu/libswscale.a 
/usr/lib/x86_64-linux-gnu/libavutil.a
 SRC  += src/libusbmuxd.a src/libxml2.a src/libplist-2.0.a
 package: clean all
        zip "droidcam_$(RELEASE).zip" \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/README.md new/droidcam-1.9.0/README.md
--- old/droidcam-1.8.2/README.md        2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/README.md        2023-03-21 21:10:48.000000000 +0100
@@ -17,60 +17,62 @@
 The libjpeg-turbo package should go into `/opt/libjpeg-turbo`.
 The official binaries (.deb, .rpm) will automatically install into the correct 
directory.
 
-Install the following dependencies
-(the package names are for Debian based systems, adjust as needed for other 
distros)
-```
-libavutil-dev
-libswscale-dev
-libasound2-dev
-libspeex-dev
-libusbmuxd-dev
-libplist-dev
-
-gtk+-3.0               # Only needed for GUI client
-libappindicator3-dev   # Only needed for GUI client**
+Install the dependencies
 
 ```
+Debian/ubuntu:
+libavutil-dev libswscale-dev libasound2-dev libspeex-dev libusbmuxd-dev 
libplist-dev
+
+# Only needed for GUI client
+libgtk-3-dev libappindicator3-dev
 
-Run `make`, or `make droidcam-cli` if you skipped installing GTK+, to build 
the droidcam binaries.
 
-To install, run `sudo ./install-client`.
+Fedora:
+libavutil-free-devel libswscale-free-devel alsa-lib-devel speex-devel 
libusbmuxd-devel libplist-devel
 
-#### **libappindicator
+# Only needed for GUI client
+gtk3-devel libappindicator-gtk3-devel
+```
 
-Some distros are removing libappindicator support, which is used for system 
tray icon.
+Run `make`, or `make droidcam-cli` if you skipped installing GTK+, to build 
the droidcam binaries.
 
-On Ubuntu 21, use sudo apt install libappindicator3-1.
+To install, run `sudo ./install-client`
 
-On Fedora 33, use sudo dnf install libappindicator-gtk3
 
-For Debian Bullseye, get:
+Note: Some distros are removing libappindicator in their latest versions 
(Ubuntu 21+, Fedora 33+, Debian Bullseye+), used for system tray icon.
+The new dependency (Ubuntu) is `libayatana-appindicator3-dev`
 
-https://files.dev47apps.net/linux/libindicator3-7_0.5.0-4_amd64.deb
-https://files.dev47apps.net/linux/libappindicator3-1_0.4.92-7_amd64.deb
+You can specify the indicator libary to make like so:
+`APPINDICATOR=ayatana-appindicator3-0.1 make droidcam`
 
 
 ## V4L2 Loopback (Webcam driver)
 
-DroidCam has its own version of v4l2loopback, v4l2loopback-dc, which makes the 
app a little more user-friendly.
-It also works with the standard v4l2loopback module, so installing 
v4l2loopback-dc is optional.
+DroidCam has its own version of v4l2loopback, `v4l2loopback-dc`, which makes 
the app a little more user-friendly.
+DroidCam works with the standard v4l2loopback module, so installing 
`v4l2loopback-dc` is optional.
 
 The standard v4l2loopback module is already available on most distros as 
v4l2loopback-dkms. See [v4l2loopback usage 
examples](https://github.com/dev47apps/droidcam/releases/tag/v1.7).
 
-With v4l2loopback-dc you’ll see "DroidCam" in the list of webcams, it works 
with Skype+Chrome without needing exclusive_caps=1, and the install scripts 
will make sure v4l2loopback-dc stays loaded after reboot.
+The main differences with `v4l2loopback-dc` are that:
+* You’ll see "DroidCam" in the list of webcams.
+* It works with Skype+Chrome without the need for `exclusive_caps=1`.
+* The install scripts will configure v4l2loopback-dc to auto-load after reboot.
 
-To install v4l2loopback-dc, make sure you have these dependencies installed
+To use v4l2loopback-dc, make sure you have these dependencies installed
 ```
 linux-headers-`uname -r` gcc make
 ```
-then run `sudo ./install-video`.
+then run `sudo ./install-video` to build the module and install it.
 
 Debian/Ubuntu and RHEL (Fedora/SUSE) based distros:
-
 [If your system supports DKMS](./README-DKMS.md), you can instead use `sudo 
./install-dkms`.
 
 ## Sound
 
+DroidCam can use the Linux ALSA Loopback sound card for audio.
+There are many differences and quirks with audio on different Linux systems.
+It’s recommended you use a regular microphone and keep droidcam for video 
only.
+
 Run `sudo ./install-sound` to load the Linux ALSA Loopback sound card which 
the Droidcam client will use for audio input.
 
 To get the mic to show up in PulseAudio you can either run `pacmd load-module 
module-alsa-source device=hw:Loopback,1,0` (you may need to adjust the last 
number),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/av.c new/droidcam-1.9.0/src/av.c
--- old/droidcam-1.8.2/src/av.c 2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/src/av.c 2023-03-21 21:10:48.000000000 +0100
@@ -12,6 +12,8 @@
 #include "decoder.h"
 #include <stdint.h>
 
+extern int a_active;
+extern int v_active;
 extern int a_running;
 extern int v_running;
 extern int thread_cmd;
@@ -36,46 +38,50 @@
 // Battry Check thread
 void *BatteryThreadProc(__attribute__((__unused__)) void *args) {
     SOCKET socket = INVALID_SOCKET;
-    char buf[128];
-    char battery_value[32];
+    char buf[128] = {0};
+    char battery_value[32] = {0};
     int i, j;
 
-    memset(battery_value, 0, sizeof(battery_value));
     dbgprint("Battery Thread Start\n");
 
-    usleep(500000);
     while (v_running || a_running) {
+       if (v_active == 0 && a_active == 0) {
+            usleep(50000);
+            continue;
+        }
+
         socket = GetConnection();
         if (socket == INVALID_SOCKET) {
             goto LOOP;
         }
 
         if (Send(BATTERY_REQ, CSTR_LEN(BATTERY_REQ), socket) <= 0) {
-            errprint("error sending battery status request\n");
+            errprint("error sending battery status request: (%d) '%s'\n",
+                                        errno, strerror(errno));
             goto LOOP;
         }
 
         memset(buf, 0, sizeof(buf));
-        if (Recv(buf, sizeof(buf), socket) <= 0) {
+        if (RecvAll(buf, sizeof(buf), socket) <= 0) {
             goto LOOP;
         }
 
         for (i = 0; i < (sizeof(buf)-4); i++) {
             if (buf[i] == '\r' && buf[i+1] == '\n' && buf[i+2] == '\r' && 
buf[i+3] == '\n') {
-                    i += 4;
-                    break;
+                i += 4;
+                break;
             }
         }
 
         j = 0;
         while (i < sizeof(buf) && j < (sizeof(battery_value)-2) && buf[i] >= 
'0' && buf[i] <= '9')
-                battery_value[j++] = buf[i++];
+            battery_value[j++] = buf[i++];
 
         if (j == 0)
             battery_value[j++] = '-';
 
         battery_value[j++] = '%';
-        battery_value[sizeof(battery_value) - 1] = 0;
+        battery_value[j++] = 0;
         dbgprint("battery_value: %s\n", battery_value);
         UpdateBatteryLabel(battery_value);
 
@@ -120,12 +126,14 @@
 
     len = snprintf(buf, sizeof(buf), VIDEO_REQ, decoder_get_video_width(), 
decoder_get_video_height());
     if (Send(buf, len, videoSocket) <= 0){
+        errprint("send error (%d) '%s'\n", errno, strerror(errno));
         MSG_ERROR("Error sending request, DroidCam might be busy with another 
client.");
         goto early_out;
     }
 
     memset(buf, 0, sizeof(buf));
     if (RecvAll(buf, 9, videoSocket) <= 0) {
+        errprint("recv error (%d) '%s'\n", errno, strerror(errno));
         MSG_ERROR("Connection reset!\nIs the app running?");
         goto early_out;
     }
@@ -134,6 +142,7 @@
         goto early_out;
     }
 
+    v_active = 1;
     while (v_running != 0){
         if (thread_cmd != 0) {
             len = 0;
@@ -161,6 +170,7 @@
     }
 
 early_out:
+    v_active = 0;
     dbgprint("disconnect\n");
     disconnect(videoSocket);
     decoder_cleanup();
@@ -195,6 +205,13 @@
         return 0;
     }
 
+    // wait for video
+    while (v_running) {
+        usleep(200000);
+        if (v_active) break;
+        if (!a_running) return 0;
+    }
+
     if (g_settings.connection == CB_RADIO_IOS)
         goto TCP_ONLY;
     if (strncmp(g_settings.ip, ADB_LOCALHOST_IP, CSTR_LEN(ADB_LOCALHOST_IP)) 
== 0)
@@ -230,12 +247,14 @@
     }
 
     if (Send(AUDIO_REQ, CSTR_LEN(AUDIO_REQ), socket) <= 0) {
+        errprint("send error (audio) (%d) '%s'\n", errno, strerror(errno));
         MSG_ERROR("Error sending audio request");
         goto early_out;
     }
 
     memset(stream_buf, 0, 6);
     if (RecvAll(stream_buf, 6, socket) <= 0) {
+        errprint("recv error (audio) (%d) '%s'\n", errno, strerror(errno));
         MSG_ERROR("Audio connection reset!");
         goto early_out;
     }
@@ -257,11 +276,15 @@
     bytes_per_packet = CHUNKS_PER_PACKET * DROIDCAM_SPX_CHUNK_BYTES_2;
 
 STREAM:
+    a_active = 1;
     while (a_running) {
         int len = (mode == UDP_STREAM)
             ? RecvNonBlockUDP(stream_buf, STREAM_BUF_SIZE, socket)
             : RecvNonBlock   (stream_buf, STREAM_BUF_SIZE, socket);
-        if (len < 0) { goto early_out; }
+        if (len < 0) {
+            errprint("recv error (audio) (%d) '%s'\n", errno, strerror(errno));
+            goto early_out;
+        }
 
         if (len > 0) {
             // dbgprint("recv %d frames\n", (len / 
DROIDCAM_SPX_CHUNK_BYTES_2));
@@ -316,6 +339,7 @@
     }
 
 early_out:
+    a_active = 0;
     if (mode == UDP_STREAM)
         SendUDPMessage(socket, STOP_REQ, CSTR_LEN(STOP_REQ), g_settings.ip, 
g_settings.port + 1);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/common.h 
new/droidcam-1.9.0/src/common.h
--- old/droidcam-1.8.2/src/common.h     2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/src/common.h     2023-03-21 21:10:48.000000000 +0100
@@ -9,8 +9,8 @@
 #ifndef _COMMON_H_
 #define _COMMON_H_
 
-#define APP_VER_INT 182
-#define APP_VER_STR "1.8.2"
+#define APP_VER_INT 190
+#define APP_VER_STR "1.9.0"
 
 #define MSG_ERROR(str)     ShowError("Error",str)
 #define MSG_LASTERROR(str) ShowError(str,strerror(errno))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/connection.c 
new/droidcam-1.9.0/src/connection.c
--- old/droidcam-1.8.2/src/connection.c 2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/src/connection.c 2023-03-21 21:10:48.000000000 +0100
@@ -30,14 +30,15 @@
 SOCKET Connect(const char* ip, int port, char **errormsg) {
     int flags;
     struct sockaddr_in sin;
-    SOCKET sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+    SOCKET sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
 
-    printf("connecting to %s:%d\n", ip, port);
+    dbgprint("connect to %s:%d\n", ip, port);
     if(sock == INVALID_SOCKET) {
         errprint("socket() error %d '%s'\n", errno, strerror(errno));
         *errormsg = strerror(errno);
         goto _error_out;
     }
+
     sin.sin_family = AF_INET;
     sin.sin_addr.s_addr = inet_addr(ip);
     sin.sin_port = htons(port);
@@ -74,6 +75,7 @@
     flags &= ~O_NONBLOCK;
     fcntl(sock, F_SETFL, flags);
 
+    timeout.tv_sec = 5;
     if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)) < 0
     || setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &timeout, sizeof(timeout)) < 
0)
         perror("setsockopt failed");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/decoder_snd.c 
new/droidcam-1.9.0/src/decoder_snd.c
--- old/droidcam-1.8.2/src/decoder_snd.c        2022-02-02 23:57:51.000000000 
+0100
+++ new/droidcam-1.9.0/src/decoder_snd.c        2023-03-21 21:10:48.000000000 
+0100
@@ -278,7 +278,7 @@
             if (set_hwparams(handle, hwparams, 
SND_PCM_ACCESS_MMAP_INTERLEAVED) < 0) {
                 errprint("setting audio hwparams failed\n");
                 snd_pcm_close(handle);
-                goto OUT;
+                continue;
             }
 
             if (set_swparams(handle, swparams) < 0) {
@@ -302,4 +302,4 @@
 OUT:
     snd_device[0] = 0; // this will get shown on the UI, clear the value
     return NULL;
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/droidcam-cli.c 
new/droidcam-1.9.0/src/droidcam-cli.c
--- old/droidcam-1.8.2/src/droidcam-cli.c       2022-02-02 23:57:51.000000000 
+0100
+++ new/droidcam-1.9.0/src/droidcam-cli.c       2023-03-21 21:10:48.000000000 
+0100
@@ -23,9 +23,11 @@
 
 char *v4l2_dev = 0;
 unsigned v4l2_width = 0, v4l2_height = 0;
-int v_running = 0;
-int a_running = 0;
-int thread_cmd = 0;
+volatile int a_active = 0;
+volatile int v_active = 0;
+volatile int v_running = 0;
+volatile int a_running = 0;
+volatile int thread_cmd = 0;
 int no_controls = 0;
 struct settings g_settings = {0};
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/src/droidcam.c 
new/droidcam-1.9.0/src/droidcam.c
--- old/droidcam-1.8.2/src/droidcam.c   2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/src/droidcam.c   2023-03-21 21:10:48.000000000 +0100
@@ -7,7 +7,12 @@
  */
 
 #include <gtk/gtk.h>
+#ifdef USE_AYATANA_APPINDICATOR
+#include <libayatana-appindicator/app-indicator.h>
+#else
 #include <libappindicator/app-indicator.h>
+#endif
+
 #include <X11/Xlib.h>
 #include <stdint.h>
 
@@ -35,9 +40,11 @@
 GThread* hBatteryThread;
 
 char *v4l2_dev = 0;
-int a_running = 0;
-int v_running = 0;
-int thread_cmd = 0;
+volatile int a_active = 0;
+volatile int v_active = 0;
+volatile int a_running = 0;
+volatile int v_running = 0;
+volatile int thread_cmd = 0;
 struct settings g_settings = {0};
 
 extern const char *thread_cmd_val_str;
@@ -119,6 +126,8 @@
                hBatteryThread = NULL;
        }
 
+       a_active = 0;
+       v_active = 0;
        gtk_widget_set_sensitive(GTK_WIDGET(elButton), FALSE);
        gtk_widget_set_sensitive(GTK_WIDGET(wbButton), FALSE);
        gtk_widget_set_sensitive(GTK_WIDGET(menuButton), FALSE);
@@ -189,6 +198,7 @@
        }
 
        if (g_settings.video) {
+               v_active = 0;
                v_running = 1;
                hVideoThread = g_thread_new(NULL, VideoThreadProc, (void*) 
(SOCKET_PTR) s);
                hDecodeThread = g_thread_new(NULL, DecodeThreadProc, NULL);
@@ -197,6 +207,7 @@
        }
 
        if (g_settings.audio) {
+                a_active = 0;
                a_running = 1;
                hAudioThread = g_thread_new(NULL, AudioThreadProc, NULL);
        }
@@ -280,12 +291,10 @@
                        ipEdit = FALSE;
                break;
                case CB_BTN_OTR:
-                       gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 
0, 0);
-                       // TODO drop support for older OSs and use
-                       // gtk_menu_popup_at_pointer(GTK_MENU(menu), NULL);
+                       gtk_menu_popup_at_pointer(GTK_MENU(menu), NULL);
                break;
                case CB_BTN_WB:
-                       gtk_menu_popup(GTK_MENU(wbMenu), NULL, NULL, NULL, 
NULL, 0, 0);
+                       gtk_menu_popup_at_pointer(GTK_MENU(wbMenu), NULL);
                break;
                case CB_BTN_EL:
                        if (v_running != 1 || thread_cmd != 0) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/droidcam-1.8.2/uninstall new/droidcam-1.9.0/uninstall
--- old/droidcam-1.8.2/uninstall        2022-02-02 23:57:51.000000000 +0100
+++ new/droidcam-1.9.0/uninstall        2023-03-21 21:10:48.000000000 +0100
@@ -21,9 +21,9 @@
        sudo chmod $prevperm /etc/modules
 }
 
-echo "Cleaning configs"
+echo "Cleaning DroidCam configs"
 [[ -e "/etc/modules" ]] && etc_modules
 rm -f /etc/modprobe.d/droidcam.conf || true
 rm -f /etc/modules-load.d/droidcam.conf || true
-rm -f /opt/droidcam*
-echo "Done"
+rm -rf /opt/droidcam*
+echo "Completed"

Reply via email to