[Tizen] If you take the handle, you must be responsible for its destruction.
[platform/core/uifw/dali-extension.git] / dali-extension / video-player / ecore-wl2 / tizen-video-player.h
index fde2a7e..03a70b8 100755 (executable)
 #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>
 
 #ifndef HAVE_WAYLAND
 #define HAVE_WAYLAND
@@ -295,22 +297,23 @@ private:
   Dali::Vector4              mBackgroundColor;      ///< Current background color, which texturestream mode needs.
   RenderingTargetType        mTargetType;           ///< Current rendering target type
 
-  Dali::Mutex                  mPacketMutex;
-  Dali::Vector<media_packet_h> mPacketVector; ///< Container for media packet handle from Tizen player callback
+  Dali::Mutex                mPacketMutex;
+  std::list<media_packet_h>  mPacketList;           ///< Container for media packet handle from Tizen player callback
 
   sound_stream_info_h mStreamInfo;
   sound_stream_type_e mStreamType;
 
   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
+  bool mIsMovedHandle;     ///< the flag for moved the handle
 
 public:
   Dali::VideoPlayerPlugin::VideoPlayerSignalType mFinishedSignal;