X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=core%2Fproducer%2Ftransition%2Ftransition_producer.h;h=0e965ced2e2cc153b053679d71ad6a93e84d6f99;hb=02ebf804975f1c52e71deeefb0eafc53843c0272;hp=38d23e9203a2fb162768510fa6e9b1cf291f805c;hpb=7e5091cff2b2c2197f91eb5adb0edafdfa564069;p=casparcg diff --git a/core/producer/transition/transition_producer.h b/core/producer/transition/transition_producer.h index 38d23e920..0e965ced2 100644 --- a/core/producer/transition/transition_producer.h +++ b/core/producer/transition/transition_producer.h @@ -1,78 +1,61 @@ -/* -* copyright (c) 2010 Sveriges Television AB -* -* This file is part of CasparCG. -* -* CasparCG is free software: you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation, either version 3 of the License, or -* (at your option) any later version. -* -* CasparCG is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. - -* You should have received a copy of the GNU General Public License -* along with CasparCG. If not, see . -* -*/ -#pragma once - -#include "../frame_producer.h" - -#include -#include - -namespace caspar { namespace core { - -struct transition -{ - enum type - { - - cut = 1, - mix, - push, - slide, - wipe - }; -}; - -struct transition_direction -{ - enum type - { - from_left = 1, - from_right - }; -}; - -struct transition_info -{ - transition_info() : type(transition::cut), duration(0), direction(transition_direction::from_left){} - - size_t duration; - transition_direction::type direction; - transition::type type; -}; - -class transition_producer : public frame_producer -{ -public: - transition_producer(transition_producer&& other); - - transition_producer(const safe_ptr& destination, const transition_info& info); - - safe_ptr receive(); - - safe_ptr get_following_producer() const; - void set_leading_producer(const safe_ptr& producer); - virtual void initialize(const safe_ptr& frame_processor); - virtual std::wstring print() const; -private: - struct implementation; - std::shared_ptr impl_; -}; - -}} \ No newline at end of file +/* +* Copyright (c) 2011 Sveriges Television AB +* +* This file is part of CasparCG (www.casparcg.com). +* +* CasparCG is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* CasparCG is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with CasparCG. If not, see . +* +* Author: Robert Nagy, ronag89@gmail.com +*/ + +#pragma once + +#include "../../video_format.h" +#include "../../fwd.h" + +#include +#include + +#include + +namespace caspar { namespace core { + +enum class transition_type +{ + cut, + mix, + push, + slide, + wipe, + count +}; + +enum class transition_direction +{ + from_left, + from_right, + count +}; + +struct transition_info +{ + int duration = 0; + transition_direction direction = transition_direction::from_left; + transition_type type = transition_type::cut; + caspar::tweener tweener { L"linear" }; +}; + +spl::shared_ptr create_transition_producer(const field_mode& mode, const spl::shared_ptr& destination, const transition_info& info); + +}}