]> git.sesse.net Git - casparcg/blob - modules/ffmpeg/ffmpeg_params.h
Merge branch 'master' of https://github.com/ronag/Server into ronag-master
[casparcg] / modules / ffmpeg / ffmpeg_params.h
1 /*
2 * Copyright (c) 2011 Sveriges Television AB <info@casparcg.com>
3 *
4 * This file is part of CasparCG (www.casparcg.com).
5 *
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Author: Cambell Prince, cambell.prince@gmail.com
20 */
21
22 #pragma once
23
24 #include <common/memory/safe_ptr.h>
25
26 #include <stdint.h>
27 #include <string>
28 #include <vector>
29
30 namespace caspar {
31         
32 namespace ffmpeg {
33
34 enum FFMPEG_Resource {
35         FFMPEG_FILE,
36         FFMPEG_DEVICE,
37         FFMPEG_STREAM
38 };
39
40 struct option
41 {
42         std::string name;
43         std::string value;
44
45         option(std::string name, std::string value)
46                 : name(std::move(name))
47                 , value(std::move(value))
48         {
49         }
50 };
51
52 struct ffmpeg_producer_params
53 {
54         bool                loop;
55         uint32_t            start;
56         uint32_t            length;
57         std::wstring        filter_str;
58
59         FFMPEG_Resource     resource_type;
60         std::wstring        resource_name;
61
62         std::vector<option> options;
63
64         ffmpeg_producer_params() 
65                 : loop(false)
66                 , start(0)
67                 , length(std::numeric_limits<uint32_t>::max())
68                 , filter_str(L"")
69                 , resource_type(FFMPEG_FILE)
70                 , resource_name(L"")
71         {
72         }
73
74 };
75
76 }}