Skip to content

Commit b931e25

Browse files
committed
Version 2.3.3
Log source position and transform Skip libusbmuxd check in static builds (linux)
1 parent bc8b045 commit b931e25

File tree

4 files changed

+35
-2
lines changed

4 files changed

+35
-2
lines changed

linux/linux.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ define ADD_Lib =
2424
endef
2525

2626
ifeq "$(ALLOW_STATIC)" "yes"
27+
CXXFLAGS += -DALLOW_STATIC
2728
INCLUDES += -I$(IMOBILEDEV_DIR)/include
2829
INCLUDES += -I$(JPEG_DIR)/include
2930

src/device_discovery.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,9 @@ USBMux::USBMux() : iproxy(this) {
436436

437437
#elif defined(__linux__)
438438

439+
#ifdef ALLOW_STATIC
440+
hModuleUsbmux = (void*)1;
441+
#else
439442
// Check for usbmuxd presence
440443
const char *USBMUXD_VARIANTS[] = {
441444
"libusbmuxd.so",
@@ -455,6 +458,7 @@ USBMux::USBMux() : iproxy(this) {
455458
elog("usbmuxd not found, iOS USB support not available");
456459
return;
457460
}
461+
#endif
458462

459463
#ifdef DEBUG
460464
libusbmuxd_set_debug_level(9);
@@ -504,9 +508,15 @@ USBMux::~USBMux() {
504508
FreeLibrary(hModuleUsbmux);
505509

506510
#elif defined(__linux__)
511+
512+
#ifdef ALLOW_STATIC
513+
hModuleUsbmux = 0;
514+
#else
507515
if (hModuleUsbmux)
508516
dlclose(hModuleUsbmux);
509517

518+
#endif
519+
510520
#endif
511521

512522
#endif // __APPLE__

src/droidcam.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
1 VERSIONINFO
2-
FILEVERSION 2,3,2,0
2+
FILEVERSION 2,3,3,0
33
BEGIN
44
BLOCK "StringFileInfo"
55
BEGIN

src/source.cc

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2424

2525
#if ENABLE_GUI
2626
#include "obs.hpp"
27+
#include "obs-frontend-api.h"
2728
#include <QMainWindow>
2829
#include <QMessageBox>
2930
extern QMainWindow *main_window;
@@ -38,7 +39,7 @@ extern QMainWindow *main_window;
3839
#include "buffer_util.h"
3940
#include "device_discovery.h"
4041

41-
#define PLUGIN_VERSION_STR "232"
42+
#define PLUGIN_VERSION_STR "233"
4243
#define FPS 25
4344
#define MILLI_SEC 1000
4445
#define NANO_SEC 1000000000
@@ -956,6 +957,27 @@ void source_show(void *data) {
956957
droidcam_obs_source *plugin = (droidcam_obs_source*)(data);
957958
plugin->is_showing = true;
958959

960+
#if ENABLE_GUI
961+
obs_source_t *scene = obs_frontend_get_current_scene();
962+
if (scene) {
963+
obs_sceneitem_t *item = obs_scene_sceneitem_from_source(obs_scene_from_source(scene), plugin->source);
964+
if (item) {
965+
vec2 pos;
966+
vec2 scale;
967+
struct obs_sceneitem_crop crop;
968+
obs_sceneitem_get_pos(item, &pos);
969+
obs_sceneitem_get_crop(item, &crop);
970+
obs_sceneitem_get_scale(item, &scale);
971+
ilog("pos:%.0f,%.0f scale:%.1f,%.1f rot:%.1f crop:%d,%d; %d,%d",
972+
pos.x, pos.y, scale.x, scale.y,
973+
obs_sceneitem_get_rot(item),
974+
crop.left, crop.top, crop.right, crop.bottom);
975+
obs_sceneitem_release(item);
976+
}
977+
obs_source_release(scene);
978+
}
979+
#endif
980+
959981
plugin->tally.on_preview = true;
960982
comms_task(CommsTask::TALLY);
961983
dlog("source_show: is_showing=%d", plugin->is_showing);

0 commit comments

Comments
 (0)