@@ -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>
2930extern 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