2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/public-api/controls/video-view/video-view.h>
22 #include <dali/devel-api/adaptor-framework/video-sync-mode.h>
23 #include <dali/public-api/object/property-map.h>
26 #include <dali-toolkit/internal/controls/video-view/video-view-impl.h>
32 VideoView::VideoView()
36 VideoView::VideoView(const VideoView& videoView) = default;
38 VideoView::VideoView(VideoView&& rhs) noexcept = default;
40 VideoView& VideoView::operator=(const VideoView& videoView) = default;
42 VideoView& VideoView::operator=(VideoView&& rhs) noexcept = default;
44 VideoView::~VideoView()
48 VideoView VideoView::New()
50 return Internal::VideoView::New(Dali::VideoSyncMode::DISABLED);
53 VideoView VideoView::New(const std::string& url)
55 VideoView videoView = Internal::VideoView::New(Dali::VideoSyncMode::DISABLED);
56 Dali::Toolkit::GetImpl(videoView).SetUrl(url);
60 VideoView VideoView::New(bool swCodec)
62 VideoView videoView = Internal::VideoView::New(Dali::VideoSyncMode::DISABLED);
63 Dali::Toolkit::GetImpl(videoView).SetSWCodec(swCodec);
67 VideoView VideoView::New(const std::string& url, bool swCodec)
69 VideoView videoView = Internal::VideoView::New(Dali::VideoSyncMode::DISABLED);
70 Dali::Toolkit::GetImpl(videoView).SetUrl(url);
71 Dali::Toolkit::GetImpl(videoView).SetSWCodec(swCodec);
75 VideoView VideoView::DownCast(BaseHandle handle)
77 return Control::DownCast<VideoView, Internal::VideoView>(handle);
80 void VideoView::Play()
82 Dali::Toolkit::GetImpl(*this).Play();
85 void VideoView::Pause()
87 Dali::Toolkit::GetImpl(*this).Pause();
90 void VideoView::Stop()
92 Dali::Toolkit::GetImpl(*this).Stop();
95 void VideoView::Forward(int millisecond)
97 Dali::Toolkit::GetImpl(*this).Forward(millisecond);
100 void VideoView::Backward(int millisecond)
102 Dali::Toolkit::GetImpl(*this).Backward(millisecond);
105 VideoView::VideoViewSignalType& VideoView::FinishedSignal()
107 return Dali::Toolkit::GetImpl(*this).FinishedSignal();
110 VideoView::VideoView(Internal::VideoView& implementation)
111 : Control(implementation)
115 VideoView::VideoView(Dali::Internal::CustomActor* internal)
118 VerifyCustomActorPointer<Internal::VideoView>(internal);
121 } // namespace Toolkit