Lines 1-254
Link Here
|
1 |
Convert old GNU field designator syntax to C99 syntax to remove some |
|
|
2 |
annoying warnings. Fixed upstream in a870946, mostly. |
3 |
|
4 |
--- conf.c.orig 2016-10-25 01:39:24 UTC |
5 |
+++ conf.c |
6 |
@@ -49,131 +49,131 @@ char *get_current_dir_name(void) |
7 |
#define stripnewline(x) {if ((x)[strlen(x)-1]=='\n') (x)[strlen(x) - 1] = 0; } |
8 |
|
9 |
struct config conf_template = { |
10 |
- camera_name: NULL, |
11 |
- width: DEF_WIDTH, |
12 |
- height: DEF_HEIGHT, |
13 |
- quality: DEF_QUALITY, |
14 |
- camera_id: 0, |
15 |
- rotate_deg: 0, |
16 |
- max_changes: DEF_CHANGES, |
17 |
- threshold_tune: 0, |
18 |
- output_pictures: "on", |
19 |
- motion_img: 0, |
20 |
- emulate_motion: 0, |
21 |
- event_gap: DEF_EVENT_GAP, |
22 |
- max_movie_time: DEF_MAXMOVIETIME, |
23 |
- snapshot_interval: 0, |
24 |
- locate_motion_mode: "off", |
25 |
- locate_motion_style: "box", |
26 |
- input: IN_DEFAULT, |
27 |
- norm: 0, |
28 |
- frame_limit: DEF_MAXFRAMERATE, |
29 |
- quiet: 1, |
30 |
- picture_type: "jpeg", |
31 |
- noise: DEF_NOISELEVEL, |
32 |
- noise_tune: 1, |
33 |
- minimum_frame_time: 0, |
34 |
- lightswitch: 0, |
35 |
- autobright: 0, |
36 |
- brightness: 0, |
37 |
- contrast: 0, |
38 |
- saturation: 0, |
39 |
- hue: 0, |
40 |
- power_line_frequency: -1, |
41 |
- roundrobin_frames: 1, |
42 |
- roundrobin_skip: 1, |
43 |
- pre_capture: 0, |
44 |
- post_capture: 0, |
45 |
- switchfilter: 0, |
46 |
- ffmpeg_output: 0, |
47 |
- extpipe: NULL, |
48 |
- useextpipe: 0, |
49 |
- ffmpeg_output_debug: 0, |
50 |
- ffmpeg_bps: DEF_FFMPEG_BPS, |
51 |
- ffmpeg_vbr: DEF_FFMPEG_VBR, |
52 |
- ffmpeg_video_codec: DEF_FFMPEG_CODEC, |
53 |
+ .camera_name = NULL, |
54 |
+ .width = DEF_WIDTH, |
55 |
+ .height = DEF_HEIGHT, |
56 |
+ .quality = DEF_QUALITY, |
57 |
+ .camera_id = 0, |
58 |
+ .rotate_deg = 0, |
59 |
+ .max_changes = DEF_CHANGES, |
60 |
+ .threshold_tune = 0, |
61 |
+ .output_pictures = "on", |
62 |
+ .motion_img = 0, |
63 |
+ .emulate_motion = 0, |
64 |
+ .event_gap = DEF_EVENT_GAP, |
65 |
+ .max_movie_time = DEF_MAXMOVIETIME, |
66 |
+ .snapshot_interval = 0, |
67 |
+ .locate_motion_mode = "off", |
68 |
+ .locate_motion_style = "box", |
69 |
+ .input = IN_DEFAULT, |
70 |
+ .norm = 0, |
71 |
+ .frame_limit = DEF_MAXFRAMERATE, |
72 |
+ .quiet = 1, |
73 |
+ .picture_type = "jpeg", |
74 |
+ .noise = DEF_NOISELEVEL, |
75 |
+ .noise_tune = 1, |
76 |
+ .minimum_frame_time = 0, |
77 |
+ .lightswitch = 0, |
78 |
+ .autobright = 0, |
79 |
+ .brightness = 0, |
80 |
+ .contrast = 0, |
81 |
+ .saturation = 0, |
82 |
+ .hue = 0, |
83 |
+ .power_line_frequency = -1, |
84 |
+ .roundrobin_frames = 1, |
85 |
+ .roundrobin_skip = 1, |
86 |
+ .pre_capture = 0, |
87 |
+ .post_capture = 0, |
88 |
+ .switchfilter = 0, |
89 |
+ .ffmpeg_output = 0, |
90 |
+ .extpipe = NULL, |
91 |
+ .useextpipe = 0, |
92 |
+ .ffmpeg_output_debug = 0, |
93 |
+ .ffmpeg_bps = DEF_FFMPEG_BPS, |
94 |
+ .ffmpeg_vbr = DEF_FFMPEG_VBR, |
95 |
+ .ffmpeg_video_codec = DEF_FFMPEG_CODEC, |
96 |
#ifdef HAVE_SDL |
97 |
- sdl_threadnr: 0, |
98 |
+ .sdl_threadnr = 0, |
99 |
#endif |
100 |
- ipv6_enabled: 0, |
101 |
- stream_port: 0, |
102 |
- stream_quality: 50, |
103 |
- stream_motion: 0, |
104 |
- stream_maxrate: 1, |
105 |
- stream_localhost: 1, |
106 |
- stream_limit: 0, |
107 |
- stream_auth_method: 0, |
108 |
- stream_authentication: NULL, |
109 |
- stream_preview_scale: 25, |
110 |
- stream_preview_newline: 0, |
111 |
- webcontrol_port: 0, |
112 |
- webcontrol_localhost: 1, |
113 |
- webcontrol_html_output: 1, |
114 |
- webcontrol_authentication: NULL, |
115 |
- frequency: 0, |
116 |
- tuner_number: 0, |
117 |
- timelapse: 0, |
118 |
- timelapse_mode: DEF_TIMELAPSE_MODE, |
119 |
+ .ipv6_enabled = 0, |
120 |
+ .stream_port = 0, |
121 |
+ .stream_quality = 50, |
122 |
+ .stream_motion = 0, |
123 |
+ .stream_maxrate = 1, |
124 |
+ .stream_localhost = 1, |
125 |
+ .stream_limit = 0, |
126 |
+ .stream_auth_method = 0, |
127 |
+ .stream_authentication = NULL, |
128 |
+ .stream_preview_scale = 25, |
129 |
+ .stream_preview_newline = 0, |
130 |
+ .webcontrol_port = 0, |
131 |
+ .webcontrol_localhost = 1, |
132 |
+ .webcontrol_html_output = 1, |
133 |
+ .webcontrol_authentication = NULL, |
134 |
+ .frequency = 0, |
135 |
+ .tuner_number = 0, |
136 |
+ .timelapse = 0, |
137 |
+ .timelapse_mode = DEF_TIMELAPSE_MODE, |
138 |
#if (defined(BSD)) |
139 |
- tuner_device: NULL, |
140 |
+ .tuner_device = NULL, |
141 |
#endif |
142 |
- video_device: VIDEO_DEVICE, |
143 |
- v4l2_palette: DEF_PALETTE, |
144 |
- vidpipe: NULL, |
145 |
- filepath: NULL, |
146 |
- imagepath: DEF_IMAGEPATH, |
147 |
- moviepath: DEF_MOVIEPATH, |
148 |
- snappath: DEF_SNAPPATH, |
149 |
- timepath: DEF_TIMEPATH, |
150 |
- on_event_start: NULL, |
151 |
- on_event_end: NULL, |
152 |
- mask_file: NULL, |
153 |
- smart_mask_speed: 0, |
154 |
+ .video_device = VIDEO_DEVICE, |
155 |
+ .v4l2_palette = DEF_PALETTE, |
156 |
+ .vidpipe = NULL, |
157 |
+ .filepath = NULL, |
158 |
+ .imagepath = DEF_IMAGEPATH, |
159 |
+ .moviepath = DEF_MOVIEPATH, |
160 |
+ .snappath = DEF_SNAPPATH, |
161 |
+ .timepath = DEF_TIMEPATH, |
162 |
+ .on_event_start = NULL, |
163 |
+ .on_event_end = NULL, |
164 |
+ .mask_file = NULL, |
165 |
+ .smart_mask_speed = 0, |
166 |
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3) |
167 |
- sql_log_image: 1, |
168 |
- sql_log_snapshot: 1, |
169 |
- sql_log_movie: 0, |
170 |
- sql_log_timelapse: 0, |
171 |
- sql_query: DEF_SQL_QUERY, |
172 |
- database_type: NULL, |
173 |
- database_dbname: NULL, |
174 |
- database_host: "localhost", |
175 |
- database_user: NULL, |
176 |
- database_password: NULL, |
177 |
- database_port: 0, |
178 |
- database_busy_timeout: 0, |
179 |
+ .sql_log_image = 1, |
180 |
+ .sql_log_snapshot = 1, |
181 |
+ .sql_log_movie = 0, |
182 |
+ .sql_log_timelapse = 0, |
183 |
+ .sql_query = DEF_SQL_QUERY, |
184 |
+ .database_type = NULL, |
185 |
+ .database_dbname = NULL, |
186 |
+ .database_host = "localhost", |
187 |
+ .database_user = NULL, |
188 |
+ .database_password = NULL, |
189 |
+ .database_port = 0, |
190 |
+ .database_busy_timeout = 0, |
191 |
#endif /* defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || define(HAVE_SQLITE3) */ |
192 |
- on_picture_save: NULL, |
193 |
- on_motion_detected: NULL, |
194 |
- on_area_detected: NULL, |
195 |
- on_movie_start: NULL, |
196 |
- on_movie_end: NULL, |
197 |
- on_camera_lost: NULL, |
198 |
- motionvidpipe: NULL, |
199 |
- netcam_url: NULL, |
200 |
- netcam_userpass: NULL, |
201 |
- netcam_keepalive: "off", |
202 |
- netcam_proxy: NULL, |
203 |
- netcam_tolerant_check: 0, |
204 |
- rtsp_uses_tcp: 1, |
205 |
+ .on_picture_save = NULL, |
206 |
+ .on_motion_detected = NULL, |
207 |
+ .on_area_detected = NULL, |
208 |
+ .on_movie_start = NULL, |
209 |
+ .on_movie_end = NULL, |
210 |
+ .on_camera_lost = NULL, |
211 |
+ .motionvidpipe = NULL, |
212 |
+ .netcam_url = NULL, |
213 |
+ .netcam_userpass = NULL, |
214 |
+ .netcam_keepalive = "off", |
215 |
+ .netcam_proxy = NULL, |
216 |
+ .netcam_tolerant_check = 0, |
217 |
+ .rtsp_uses_tcp = 1, |
218 |
#ifdef HAVE_MMAL |
219 |
- mmalcam_name: NULL, |
220 |
- mmalcam_control_params: NULL, |
221 |
+ .mmalcam_name = NULL, |
222 |
+ .mmalcam_control_params = NULL, |
223 |
#endif |
224 |
- text_changes: 0, |
225 |
- text_left: NULL, |
226 |
- text_right: DEF_TIMESTAMP, |
227 |
- text_event: DEF_EVENTSTAMP, |
228 |
- text_double: 0, |
229 |
- despeckle_filter: NULL, |
230 |
- area_detect: NULL, |
231 |
- minimum_motion_frames: 1, |
232 |
- exif_text: NULL, |
233 |
- pid_file: NULL, |
234 |
- log_file: NULL, |
235 |
- log_level: LEVEL_DEFAULT+10, |
236 |
- log_type_str: NULL, |
237 |
- camera_dir: sysconfdir"/conf.d" |
238 |
+ .text_changes = 0, |
239 |
+ .text_left = NULL, |
240 |
+ .text_right = DEF_TIMESTAMP, |
241 |
+ .text_event = DEF_EVENTSTAMP, |
242 |
+ .text_double = 0, |
243 |
+ .despeckle_filter = NULL, |
244 |
+ .area_detect = NULL, |
245 |
+ .minimum_motion_frames = 1, |
246 |
+ .exif_text = NULL, |
247 |
+ .pid_file = NULL, |
248 |
+ .log_file = NULL, |
249 |
+ .log_level = LEVEL_DEFAULT+10, |
250 |
+ .log_type_str = NULL, |
251 |
+ .camera_dir = sysconfdir"/conf.d" |
252 |
}; |
253 |
|
254 |
|