Skip to content

Commit

Permalink
Version 2.3.3
Browse files Browse the repository at this point in the history
Log source position and transform
Skip libusbmuxd check in static builds (linux)
  • Loading branch information
aramg committed Jun 24, 2024
1 parent bc8b045 commit b931e25
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
1 change: 1 addition & 0 deletions linux/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ define ADD_Lib =
endef

ifeq "$(ALLOW_STATIC)" "yes"
CXXFLAGS += -DALLOW_STATIC
INCLUDES += -I$(IMOBILEDEV_DIR)/include
INCLUDES += -I$(JPEG_DIR)/include

Expand Down
10 changes: 10 additions & 0 deletions src/device_discovery.cc
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ USBMux::USBMux() : iproxy(this) {

#elif defined(__linux__)

#ifdef ALLOW_STATIC
hModuleUsbmux = (void*)1;
#else
// Check for usbmuxd presence
const char *USBMUXD_VARIANTS[] = {
"libusbmuxd.so",
Expand All @@ -455,6 +458,7 @@ USBMux::USBMux() : iproxy(this) {
elog("usbmuxd not found, iOS USB support not available");
return;
}
#endif

#ifdef DEBUG
libusbmuxd_set_debug_level(9);
Expand Down Expand Up @@ -504,9 +508,15 @@ USBMux::~USBMux() {
FreeLibrary(hModuleUsbmux);

#elif defined(__linux__)

#ifdef ALLOW_STATIC
hModuleUsbmux = 0;
#else
if (hModuleUsbmux)
dlclose(hModuleUsbmux);

#endif

#endif

#endif // __APPLE__
Expand Down
2 changes: 1 addition & 1 deletion src/droidcam.rc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
1 VERSIONINFO
FILEVERSION 2,3,2,0
FILEVERSION 2,3,3,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
Expand Down
24 changes: 23 additions & 1 deletion src/source.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#if ENABLE_GUI
#include "obs.hpp"
#include "obs-frontend-api.h"
#include <QMainWindow>
#include <QMessageBox>
extern QMainWindow *main_window;
Expand All @@ -38,7 +39,7 @@ extern QMainWindow *main_window;
#include "buffer_util.h"
#include "device_discovery.h"

#define PLUGIN_VERSION_STR "232"
#define PLUGIN_VERSION_STR "233"
#define FPS 25
#define MILLI_SEC 1000
#define NANO_SEC 1000000000
Expand Down Expand Up @@ -956,6 +957,27 @@ void source_show(void *data) {
droidcam_obs_source *plugin = (droidcam_obs_source*)(data);
plugin->is_showing = true;

#if ENABLE_GUI
obs_source_t *scene = obs_frontend_get_current_scene();
if (scene) {
obs_sceneitem_t *item = obs_scene_sceneitem_from_source(obs_scene_from_source(scene), plugin->source);
if (item) {
vec2 pos;
vec2 scale;
struct obs_sceneitem_crop crop;
obs_sceneitem_get_pos(item, &pos);
obs_sceneitem_get_crop(item, &crop);
obs_sceneitem_get_scale(item, &scale);
ilog("pos:%.0f,%.0f scale:%.1f,%.1f rot:%.1f crop:%d,%d; %d,%d",
pos.x, pos.y, scale.x, scale.y,
obs_sceneitem_get_rot(item),
crop.left, crop.top, crop.right, crop.bottom);
obs_sceneitem_release(item);
}
obs_source_release(scene);
}
#endif

plugin->tally.on_preview = true;
comms_task(CommsTask::TALLY);
dlog("source_show: is_showing=%d", plugin->is_showing);
Expand Down

0 comments on commit b931e25

Please sign in to comment.