mVideoSizePropertyConstraint.Remove();
}
- mVideoSizePropertyIndex = mSyncActor.RegisterProperty(VIDEO_PLAYER_SIZE_NAME, Vector3::ZERO);
+ Actor syncActor = mSyncActor.GetHandle();
+ if(syncActor)
+ {
+ mVideoSizePropertyIndex = syncActor.RegisterProperty(VIDEO_PLAYER_SIZE_NAME, Vector3::ZERO);
- int width, height;
- Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
- ecore_wl2_display_screen_size_get(wl2_display, &width, &height);
+ int width, height;
+ Ecore_Wl2_Display* wl2_display = ecore_wl2_connected_display_get(NULL);
+ ecore_wl2_display_screen_size_get(wl2_display, &width, &height);
- mVideoSizePropertyConstraint = Constraint::New<Vector3>(mSyncActor,
- mVideoSizePropertyIndex,
- VideoPlayerSyncConstraint(mEcoreSubVideoWindow, width, height));
+ mVideoSizePropertyConstraint = Constraint::New<Vector3>(syncActor,
+ mVideoSizePropertyIndex,
+ VideoPlayerSyncConstraint(mEcoreSubVideoWindow, width, height));
- mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::SIZE));
- mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::WORLD_SCALE));
- mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::WORLD_POSITION));
+ mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::SIZE));
+ mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::WORLD_SCALE));
+ mVideoSizePropertyConstraint.AddSource(LocalSource(Actor::Property::WORLD_POSITION));
- mVideoSizePropertyConstraint.Apply();
+ mVideoSizePropertyConstraint.Apply();
+ }
}
}
#include <dali/public-api/adaptor-framework/native-image-source.h>
#include <dali/public-api/adaptor-framework/timer.h>
#include <dali/public-api/animation/constraints.h>
+#include <dali/public-api/object/weak-handle.h>
#include <player.h>
#include <string>
#include <list>
player_video_codec_type_ex_e mCodecType;
- Ecore_Wl2_Window* mEcoreWlWindow; ///< ecore native window handle
- Ecore_Wl2_Subsurface* mEcoreSubVideoWindow; ///< ecore native subsurface for synchronization with video player
- Actor mSyncActor;
- Constraint mVideoSizePropertyConstraint;
- Property::Index mVideoSizePropertyIndex;
- Dali::VideoSyncMode mSyncMode;
+ Ecore_Wl2_Window* mEcoreWlWindow; ///< ecore native window handle
+ Ecore_Wl2_Subsurface* mEcoreSubVideoWindow; ///< ecore native subsurface for synchronization with video player
+ Dali::WeakHandle<Dali::Actor> mSyncActor;
+ Constraint mVideoSizePropertyConstraint;
+ Property::Index mVideoSizePropertyIndex;
+ Dali::VideoSyncMode mSyncMode;
bool mIsInitForSyncMode; ///< the flag for synchronization with video player