2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
\r
4 * This file is part of CasparCG (www.casparcg.com).
\r
6 * CasparCG is free software: you can redistribute it and/or modify
\r
7 * it under the terms of the GNU General Public License as published by
\r
8 * the Free Software Foundation, either version 3 of the License, or
\r
9 * (at your option) any later version.
\r
11 * CasparCG is distributed in the hope that it will be useful,
\r
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
14 * GNU General Public License for more details.
\r
16 * You should have received a copy of the GNU General Public License
\r
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
\r
19 * Author: Robert Nagy, ronag89@gmail.com
\r
24 #include <common/spl/memory.h>
\r
25 #include <common/forward.h>
\r
27 #include <core/frame/data_frame.h>
\r
28 #include <core/frame/pixel_format.h>
\r
29 #include <core/video_format.h>
\r
30 #include <core/mixer/audio/audio_mixer.h>
\r
35 FORWARD1(boost, template <typename> class iterator_range);
\r
36 FORWARD2(caspar, core, class frame_visitor);
\r
37 FORWARD2(caspar, core, struct pixel_format_desc);
\r
39 namespace caspar { namespace accelerator { namespace ogl {
\r
41 class data_frame sealed : public core::data_frame
\r
43 data_frame(const data_frame&);
\r
44 data_frame& operator=(const data_frame);
\r
46 explicit data_frame(const void* tag);
\r
47 explicit data_frame(const spl::shared_ptr<class device>& ogl, const void* tag, const core::pixel_format_desc& desc, double frame_rate, core::field_mode field_mode);
\r
49 data_frame(data_frame&& other);
\r
50 data_frame& operator=(data_frame&& other);
\r
52 void swap(data_frame& other);
\r
56 virtual const core::pixel_format_desc& pixel_format_desc() const override;
\r
58 virtual const boost::iterator_range<const uint8_t*> image_data(int index) const override;
\r
59 virtual const core::audio_buffer& audio_data() const override;
\r
61 virtual const boost::iterator_range<uint8_t*> image_data(int index) override;
\r
62 virtual core::audio_buffer& audio_data() override;
\r
64 virtual double frame_rate() const override;
\r
65 virtual core::field_mode field_mode() const override;
\r
67 virtual int width() const override;
\r
68 virtual int height() const override;
\r
70 virtual const void* tag() const override;
\r
74 std::vector<spl::shared_ptr<class host_buffer>> buffers() const;
\r
77 spl::shared_ptr<impl> impl_;
\r