X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-video-player.cpp;h=957681ec8591eea0b6d1d824e65c1bf4f12c291c;hp=05e66d8182fcd30243cc0e8e7afb7a11491a9bf7;hb=dc3bbd29a417e1fbc7f81104c60c5ba90212f216;hpb=f4f74e774495b9c798c86e5697fe84db6decc327 diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp old mode 100644 new mode 100755 index 05e66d8..957681e --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-video-player.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2019 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,11 +15,10 @@ * */ -// CLASS HEADER -#include "toolkit-video-player.h" - -// EXTERNAL INCLUDES +#include #include +#include +#include namespace Dali { @@ -35,9 +34,15 @@ class VideoPlayer: public Dali::BaseObject public: VideoPlayer() + : mUrl(), + mVolumeLeft( 0.0f ), + mVolumeRight( 0.0f ), + mFinishedSignal(), + mMuted( false ), + mLooping( false), + mPlayPosition( 0 ), + mDisplyMode( Dali::VideoPlayerPlugin::DisplayMode::DST_ROI ) { - mMuted = false; - mLooping = false; } void SetMuted( bool muted ) @@ -60,6 +65,40 @@ public: return mLooping; } + void Stop() + { + if( !mFinishedSignal.Empty() ) + { + mFinishedSignal.Emit(); + } + } + + int GetPlayPosition() + { + return mPlayPosition; + } + + void SetPlayPosition( int pos ) + { + mPlayPosition = pos; + } + + Dali::VideoPlayerPlugin::DisplayMode::Type GetDisplayMode() const + { + return mDisplyMode; + } + + void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode ) + { + mDisplyMode = mode; + } + + Any GetMediaPlayer() + { + return NULL; + } + + public: std::string mUrl; @@ -71,6 +110,8 @@ private: bool mMuted; bool mLooping; + int mPlayPosition; + Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode; }; inline VideoPlayer& GetImplementation( Dali::VideoPlayer& player ) @@ -163,6 +204,7 @@ void VideoPlayer::Pause() void VideoPlayer::Stop() { + Internal::Adaptor::GetImplementation( *this ).Stop(); } void VideoPlayer::SetMute( bool mute ) @@ -193,11 +235,16 @@ void VideoPlayer::SetRenderingTarget( Any target ) void VideoPlayer::SetPlayPosition( int millisecond ) { + Internal::Adaptor::GetImplementation( *this ).SetPlayPosition( millisecond ); } int VideoPlayer::GetPlayPosition() { - return 0; + return Internal::Adaptor::GetImplementation( *this ).GetPlayPosition(); +} + +void VideoPlayer::SetDisplayArea( DisplayArea area ) +{ } void VideoPlayer::SetDisplayRotation( Dali::VideoPlayerPlugin::DisplayRotation rotation ) @@ -214,5 +261,42 @@ Dali::VideoPlayerPlugin::VideoPlayerSignalType& VideoPlayer::FinishedSignal() return Internal::Adaptor::GetImplementation( *this ).mFinishedSignal; } +void VideoPlayer::Forward( int millisecond ) +{ +} + +void VideoPlayer::Backward( int millisecond ) +{ +} + +bool VideoPlayer::IsVideoTextureSupported() +{ + return ToolkitApplication::DECODED_IMAGES_SUPPORTED; +} + +void VideoPlayer::SetCodecType( Dali::VideoPlayerPlugin::CodecType type ) +{ +} + +Dali::VideoPlayerPlugin::CodecType VideoPlayer::GetCodecType() const +{ + return Dali::VideoPlayerPlugin::CodecType::DEFAULT; +} + +void VideoPlayer::SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mode ) +{ + Internal::Adaptor::GetImplementation( *this ).SetDisplayMode( mode ); +} + +Dali::VideoPlayerPlugin::DisplayMode::Type VideoPlayer::GetDisplayMode() const +{ + return Internal::Adaptor::GetImplementation( *this ).GetDisplayMode(); +} + +Any VideoPlayer::GetMediaPlayer() +{ + return Internal::Adaptor::GetImplementation( *this ).GetMediaPlayer(); +} + } // namespace Dali;