mMuted = false;
mLooping = false;
mPlayPosition = 0;
+ mDisplyMode = Dali::VideoPlayerPlugin::DisplayMode::DST_ROI;
}
void SetMuted( bool muted )
mPlayPosition = pos;
}
+ Dali::VideoPlayerPlugin::DisplayMode::Type GetDisplayMode() const
+ {
+ return mDisplyMode;
+ }
+
+ void SetDisplayMode( Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode )
+ {
+ mDisplyMode = mDisplyMode;
+ }
+
+
public:
std::string mUrl;
bool mMuted;
bool mLooping;
int mPlayPosition;
+ Dali::VideoPlayerPlugin::DisplayMode::Type mDisplyMode;
};
inline VideoPlayer& GetImplementation( Dali::VideoPlayer& player )
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();
+}
+
} // namespace Dali;
END_TEST;
}
+
+int UtcDaliVideoViewPropertyDisplayMode(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline("UtcDaliVideoViewPropertyDisplayMode");
+
+ VideoView view = VideoView::New();
+ DALI_TEST_CHECK( view );
+
+ Stage::GetCurrent().Add( view );
+ view.Play();
+
+ application.SendNotification();
+ application.Render();
+
+ view.SetProperty( Toolkit::VideoView::Property::DISPLAY_MODE, Toolkit::VideoView::DisplayMode::DST_ROI );
+ int displayMode = view.GetProperty( Toolkit::VideoView::Property::DISPLAY_MODE ).Get< int >();
+ DALI_TEST_CHECK( displayMode == Toolkit::VideoView::DisplayMode::DST_ROI );
+
+ END_TEST;
+}
ALIASES += SINCE_1_3_4="@since 1.3.4"
ALIASES += SINCE_1_3_5="@since 1.3.5"
ALIASES += SINCE_1_3_9="@since 1.3.9"
-
+ALIASES += SINCE_1_3_15="@since 1.3.15"
ALIASES += DEPRECATED_1_0="@deprecated Deprecated since 1.0"
ALIASES += DEPRECATED_1_1="@deprecated Deprecated since 1.1"
ALIASES += DEPRECATED_1_2_8="@deprecated Deprecated since 1.2.8"
#ALIASES += SINCE_1_3_4="\par Since:\n 4.0, DALi version 1.3.4"
#ALIASES += SINCE_1_3_5="\par Since:\n 4.0, DALi version 1.3.5"
#ALIASES += SINCE_1_3_9="\par Since:\n 4.0, DALi version 1.3.9"
+#ALIASES += SINCE_1_3_15="\par Since:\n 4.0, DALi version 1.3.15"
## DALi has no deprecated API in Tizen 2.4 because it's DALi's first release.
## Thus deprecated APIs in DALi 1.0.xx will be deprecated in Tizen 3.0.
DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "volume", MAP, VOLUME )
DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "underlay", BOOLEAN, UNDERLAY )
DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "playPosition", INTEGER, PLAY_POSITION )
+DALI_PROPERTY_REGISTRATION( Toolkit, VideoView, "displayMode", INTEGER, DISPLAY_MODE )
DALI_SIGNAL_REGISTRATION( Toolkit, VideoView, "finished", FINISHED_SIGNAL )
}
break;
}
+ case Toolkit::VideoView::Property::DISPLAY_MODE:
+ {
+ int mode;
+ if( value.Get( mode ) )
+ {
+ impl.SetDisplayMode( mode );
+ }
+ break;
+ }
}
}
}
value = impl.GetPlayPosition();
break;
}
+ case Toolkit::VideoView::Property::DISPLAY_MODE:
+ {
+ value = impl.GetDisplayMode();
+ break;
+ }
}
}
mVideoPlayer.SetPlayPosition( pos );
}
+void VideoView::SetDisplayMode( int mode )
+{
+ mVideoPlayer.SetDisplayMode( static_cast< Dali::VideoPlayerPlugin::DisplayMode::Type >( mode ) );
+}
+
+int VideoView::GetDisplayMode() const
+{
+ return static_cast< int >( mVideoPlayer.GetDisplayMode() );
+}
+
} // namespace Internal
} // namespace toolkit
*/
void SetPlayPosition( int pos );
+ /**
+ * @brief Sets Display mode.
+ */
+ void SetDisplayMode( int mode );
+
+ /**
+ * @brief Gets Display mode.
+ */
+ int GetDisplayMode() const;
+
private: // From Control
/**
* @details Name "playPosition", type Property::INTEGER
* @SINCE_1_3_9
*/
- PLAY_POSITION
+ PLAY_POSITION,
+
+ /**
+ * @brief The display mode of the video.
+ * @SINCE_1_3_15
+ */
+ DISPLAY_MODE
+ };
+ };
+
+ /**
+ * @brief The values of this enum determine how the video should be display mode to the view
+ * @SINCE_1_3_15
+ */
+ struct DisplayMode
+ {
+ enum Type
+ {
+ /**
+ * @brief Letter box
+ * @SINCE_1_3_15
+ */
+ LETTER_BOX = 0,
+ /**
+ * @brief Origin size
+ * @SINCE_1_3_15
+ */
+ ORIGIN_SIZE,
+ /**
+ * @brief Full-screen
+ * @SINCE_1_3_15
+ */
+ FULL_SCREEN,
+ /**
+ * @brief Cropped full-screen
+ * @SINCE_1_3_15
+ */
+ CROPPED_FULL,
+ /**
+ * @brief Origin size (if surface size is larger than video size(width/height)) or Letter box (if video size(width/height) is larger than surface size)
+ * @SINCE_1_3_15
+ */
+ ORIGIN_OR_LETTER,
+ /**
+ * @brief Region of Interest
+ * @SINCE_1_3_15
+ */
+ DST_ROI
};
};