summaryrefslogtreecommitdiff
path: root/src/VideoMonitor.c
blob: 638b755c906cac7637b0b217b83935de2b5707f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
/* VideoMonitor.c generated by valac 0.34.4, the Vala compiler
 * generated from VideoMonitor.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#define TYPE_MONITORABLE_UPDATES (monitorable_updates_get_type ())
#define MONITORABLE_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITORABLE_UPDATES, MonitorableUpdates))
#define MONITORABLE_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MONITORABLE_UPDATES, MonitorableUpdatesClass))
#define IS_MONITORABLE_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONITORABLE_UPDATES))
#define IS_MONITORABLE_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MONITORABLE_UPDATES))
#define MONITORABLE_UPDATES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MONITORABLE_UPDATES, MonitorableUpdatesClass))

typedef struct _MonitorableUpdates MonitorableUpdates;
typedef struct _MonitorableUpdatesClass MonitorableUpdatesClass;
typedef struct _MonitorableUpdatesPrivate MonitorableUpdatesPrivate;

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))

typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;

#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))

typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;

#define TYPE_MONITORABLE (monitorable_get_type ())
#define MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITORABLE, Monitorable))
#define IS_MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONITORABLE))
#define MONITORABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MONITORABLE, MonitorableIface))

typedef struct _Monitorable Monitorable;
typedef struct _MonitorableIface MonitorableIface;

#define TYPE_VIDEO_UPDATES (video_updates_get_type ())
#define VIDEO_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_UPDATES, VideoUpdates))
#define VIDEO_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_UPDATES, VideoUpdatesClass))
#define IS_VIDEO_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_UPDATES))
#define IS_VIDEO_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_UPDATES))
#define VIDEO_UPDATES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_UPDATES, VideoUpdatesClass))

typedef struct _VideoUpdates VideoUpdates;
typedef struct _VideoUpdatesClass VideoUpdatesClass;
typedef struct _VideoUpdatesPrivate VideoUpdatesPrivate;

#define TYPE_VIDEO_SOURCE (video_source_get_type ())
#define VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE, VideoSource))
#define VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE, VideoSourceClass))
#define IS_VIDEO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE))
#define IS_VIDEO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE))
#define VIDEO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE, VideoSourceClass))

typedef struct _VideoSource VideoSource;
typedef struct _VideoSourceClass VideoSourceClass;

#define TYPE_VIDEO (video_get_type ())
#define VIDEO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO, Video))
#define VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO, VideoClass))
#define IS_VIDEO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO))
#define IS_VIDEO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO))
#define VIDEO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO, VideoClass))

typedef struct _Video Video;
typedef struct _VideoClass VideoClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define TYPE_MEDIA_MONITOR (media_monitor_get_type ())
#define MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_MONITOR, MediaMonitor))
#define MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_MONITOR, MediaMonitorClass))
#define IS_MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_MONITOR))
#define IS_MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_MONITOR))
#define MEDIA_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_MONITOR, MediaMonitorClass))

typedef struct _MediaMonitor MediaMonitor;
typedef struct _MediaMonitorClass MediaMonitorClass;
typedef struct _MediaMonitorPrivate MediaMonitorPrivate;

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

#define TYPE_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ())
#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection))
#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION))
#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION))
#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))

typedef struct _MediaSourceCollection MediaSourceCollection;
typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass;

#define MEDIA_MONITOR_TYPE_DISCOVERED_FILE (media_monitor_discovered_file_get_type ())

#define TYPE_TRANSACTION_CONTROLLER (transaction_controller_get_type ())
#define TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionController))
#define TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))
#define IS_TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRANSACTION_CONTROLLER))
#define IS_TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRANSACTION_CONTROLLER))
#define TRANSACTION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))

typedef struct _TransactionController TransactionController;
typedef struct _TransactionControllerClass TransactionControllerClass;

#define TYPE_VIDEO_MONITOR (video_monitor_get_type ())
#define VIDEO_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_MONITOR, VideoMonitor))
#define VIDEO_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_MONITOR, VideoMonitorClass))
#define IS_VIDEO_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_MONITOR))
#define IS_VIDEO_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_MONITOR))
#define VIDEO_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_MONITOR, VideoMonitorClass))

typedef struct _VideoMonitor VideoMonitor;
typedef struct _VideoMonitorClass VideoMonitorClass;
typedef struct _VideoMonitorPrivate VideoMonitorPrivate;

#define TYPE_WORKERS (workers_get_type ())
#define WORKERS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_WORKERS, Workers))
#define WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_WORKERS, WorkersClass))
#define IS_WORKERS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_WORKERS))
#define IS_WORKERS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_WORKERS))
#define WORKERS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_WORKERS, WorkersClass))

typedef struct _Workers Workers;
typedef struct _WorkersClass WorkersClass;
#define _workers_unref0(var) ((var == NULL) ? NULL : (var = (workers_unref (var), NULL)))

#define TYPE_VIDEO_SOURCE_COLLECTION (video_source_collection_get_type ())
#define VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection))
#define VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))
#define IS_VIDEO_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_SOURCE_COLLECTION))
#define IS_VIDEO_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_SOURCE_COLLECTION))
#define VIDEO_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionClass))

typedef struct _VideoSourceCollection VideoSourceCollection;
typedef struct _VideoSourceCollectionClass VideoSourceCollectionClass;

#define VIDEO_SOURCE_COLLECTION_TYPE_STATE (video_source_collection_state_get_type ())
#define _monitorable_updates_unref0(var) ((var == NULL) ? NULL : (var = (monitorable_updates_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_BACKGROUND_JOB (background_job_get_type ())
#define BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKGROUND_JOB, BackgroundJob))
#define BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKGROUND_JOB, BackgroundJobClass))
#define IS_BACKGROUND_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKGROUND_JOB))
#define IS_BACKGROUND_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKGROUND_JOB))
#define BACKGROUND_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKGROUND_JOB, BackgroundJobClass))

typedef struct _BackgroundJob BackgroundJob;
typedef struct _BackgroundJobClass BackgroundJobClass;

#define VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB (video_monitor_video_interpretable_check_job_get_type ())
#define VIDEO_MONITOR_VIDEO_INTERPRETABLE_CHECK_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJob))
#define VIDEO_MONITOR_VIDEO_INTERPRETABLE_CHECK_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJobClass))
#define VIDEO_MONITOR_IS_VIDEO_INTERPRETABLE_CHECK_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB))
#define VIDEO_MONITOR_IS_VIDEO_INTERPRETABLE_CHECK_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB))
#define VIDEO_MONITOR_VIDEO_INTERPRETABLE_CHECK_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJobClass))

typedef struct _VideoMonitorVideoInterpretableCheckJob VideoMonitorVideoInterpretableCheckJob;
typedef struct _VideoMonitorVideoInterpretableCheckJobClass VideoMonitorVideoInterpretableCheckJobClass;
#define _background_job_unref0(var) ((var == NULL) ? NULL : (var = (background_job_unref (var), NULL)))
typedef struct _BackgroundJobPrivate BackgroundJobPrivate;

#define BACKGROUND_JOB_TYPE_JOB_PRIORITY (background_job_job_priority_get_type ())
typedef struct _VideoMonitorVideoInterpretableCheckJobPrivate VideoMonitorVideoInterpretableCheckJobPrivate;

#define VIDEO_TYPE_INTERPRETABLE_RESULTS (video_interpretable_results_get_type ())
#define VIDEO_INTERPRETABLE_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIDEO_TYPE_INTERPRETABLE_RESULTS, VideoInterpretableResults))
#define VIDEO_INTERPRETABLE_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIDEO_TYPE_INTERPRETABLE_RESULTS, VideoInterpretableResultsClass))
#define VIDEO_IS_INTERPRETABLE_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIDEO_TYPE_INTERPRETABLE_RESULTS))
#define VIDEO_IS_INTERPRETABLE_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIDEO_TYPE_INTERPRETABLE_RESULTS))
#define VIDEO_INTERPRETABLE_RESULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIDEO_TYPE_INTERPRETABLE_RESULTS, VideoInterpretableResultsClass))

typedef struct _VideoInterpretableResults VideoInterpretableResults;
typedef struct _VideoInterpretableResultsClass VideoInterpretableResultsClass;
#define _video_interpretable_results_unref0(var) ((var == NULL) ? NULL : (var = (video_interpretable_results_unref (var), NULL)))

#define TYPE_ABSTRACT_SEMAPHORE (abstract_semaphore_get_type ())
#define ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphore))
#define ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))
#define IS_ABSTRACT_SEMAPHORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ABSTRACT_SEMAPHORE))
#define IS_ABSTRACT_SEMAPHORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ABSTRACT_SEMAPHORE))
#define ABSTRACT_SEMAPHORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ABSTRACT_SEMAPHORE, AbstractSemaphoreClass))

typedef struct _AbstractSemaphore AbstractSemaphore;
typedef struct _AbstractSemaphoreClass AbstractSemaphoreClass;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _MonitorableIface {
	GTypeInterface parent_iface;
	gboolean (*is_offline) (Monitorable* self);
	void (*mark_online) (Monitorable* self);
	void (*mark_offline) (Monitorable* self);
	void (*set_master_file) (Monitorable* self, GFile* file);
	void (*set_master_timestamp) (Monitorable* self, GFileInfo* info);
};

struct _MonitorableUpdates {
	GTypeInstance parent_instance;
	volatile int ref_count;
	MonitorableUpdatesPrivate * priv;
	Monitorable* monitorable;
};

struct _MonitorableUpdatesClass {
	GTypeClass parent_class;
	void (*finalize) (MonitorableUpdates *self);
	gboolean (*is_in_alteration) (MonitorableUpdates* self);
	void (*set_master_file) (MonitorableUpdates* self, GFile* file);
	void (*set_master_file_info_altered) (MonitorableUpdates* self, gboolean altered);
	void (*set_master_file_info) (MonitorableUpdates* self, GFileInfo* info);
	void (*set_master_in_alteration) (MonitorableUpdates* self, gboolean in_alteration);
	void (*set_master_alterations_complete) (MonitorableUpdates* self, GFileInfo* info);
	void (*mark_offline) (MonitorableUpdates* self);
	void (*mark_online) (MonitorableUpdates* self);
	void (*reset_online_offline) (MonitorableUpdates* self);
	gboolean (*is_all_updated) (MonitorableUpdates* self);
};

struct _VideoUpdates {
	MonitorableUpdates parent_instance;
	VideoUpdatesPrivate * priv;
	Video* video;
};

struct _VideoUpdatesClass {
	MonitorableUpdatesClass parent_class;
	void (*set_check_interpretable) (VideoUpdates* self, gboolean check);
};

struct _VideoUpdatesPrivate {
	gboolean check_interpretable;
};

typedef enum  {
	MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED,
	MEDIA_MONITOR_DISCOVERED_FILE_IGNORE,
	MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN
} MediaMonitorDiscoveredFile;

struct _MediaMonitor {
	GObject parent_instance;
	MediaMonitorPrivate * priv;
};

struct _MediaMonitorClass {
	GObjectClass parent_class;
	MediaSourceCollection* (*get_media_source_collection) (MediaMonitor* self);
	void (*close) (MediaMonitor* self);
	gchar* (*to_string) (MediaMonitor* self);
	MonitorableUpdates* (*create_updates) (MediaMonitor* self, Monitorable* monitorable);
	void (*on_media_source_destroyed) (MediaMonitor* self, DataSource* source);
	void (*notify_discovery_started) (MediaMonitor* self);
	MediaMonitorDiscoveredFile (*notify_file_discovered) (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable);
	GeeCollection* (*candidates_for_unknown_file) (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
	GFile** (*get_auxilliary_backing_files) (MediaMonitor* self, Monitorable* monitorable, int* result_length1);
	void (*update_backing_file_info) (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info);
	void (*notify_discovery_completing) (MediaMonitor* self);
	gboolean (*is_file_represented) (MediaMonitor* self, GFile* file);
	gboolean (*notify_file_created) (MediaMonitor* self, GFile* file, GFileInfo* info);
	gboolean (*notify_file_moved) (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
	gboolean (*notify_file_altered) (MediaMonitor* self, GFile* file);
	gboolean (*notify_file_attributes_altered) (MediaMonitor* self, GFile* file);
	gboolean (*notify_file_alteration_completed) (MediaMonitor* self, GFile* file, GFileInfo* info);
	gboolean (*notify_file_deleted) (MediaMonitor* self, GFile* file);
	void (*process_updates) (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
};

struct _VideoMonitor {
	MediaMonitor parent_instance;
	VideoMonitorPrivate * priv;
};

struct _VideoMonitorClass {
	MediaMonitorClass parent_class;
};

struct _VideoMonitorPrivate {
	Workers* workers;
	guint64 background_jobs;
};

typedef enum  {
	VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN,
	VIDEO_SOURCE_COLLECTION_STATE_ONLINE,
	VIDEO_SOURCE_COLLECTION_STATE_OFFLINE,
	VIDEO_SOURCE_COLLECTION_STATE_TRASH
} VideoSourceCollectionState;

typedef void (*CompletionCallback) (BackgroundJob* job, void* user_data);
typedef enum  {
	BACKGROUND_JOB_JOB_PRIORITY_HIGHEST = 100,
	BACKGROUND_JOB_JOB_PRIORITY_HIGH = 75,
	BACKGROUND_JOB_JOB_PRIORITY_NORMAL = 50,
	BACKGROUND_JOB_JOB_PRIORITY_LOW = 25,
	BACKGROUND_JOB_JOB_PRIORITY_LOWEST = 0
} BackgroundJobJobPriority;

struct _BackgroundJob {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BackgroundJobPrivate * priv;
};

struct _BackgroundJobClass {
	GTypeClass parent_class;
	void (*finalize) (BackgroundJob *self);
	void (*execute) (BackgroundJob* self);
	BackgroundJobJobPriority (*get_priority) (BackgroundJob* self);
};

struct _VideoMonitorVideoInterpretableCheckJob {
	BackgroundJob parent_instance;
	VideoMonitorVideoInterpretableCheckJobPrivate * priv;
	Video* video;
	VideoInterpretableResults* results;
};

struct _VideoMonitorVideoInterpretableCheckJobClass {
	BackgroundJobClass parent_class;
};

typedef void (*CancellationCallback) (BackgroundJob* job, void* user_data);

static gpointer video_updates_parent_class = NULL;
static gpointer video_monitor_parent_class = NULL;
extern VideoSourceCollection* video_global;
static gpointer video_monitor_video_interpretable_check_job_parent_class = NULL;

gpointer monitorable_updates_ref (gpointer instance);
void monitorable_updates_unref (gpointer instance);
GParamSpec* param_spec_monitorable_updates (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_monitorable_updates (GValue* value, gpointer v_object);
void value_take_monitorable_updates (GValue* value, gpointer v_object);
gpointer value_get_monitorable_updates (const GValue* value);
GType monitorable_updates_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
GType monitorable_get_type (void) G_GNUC_CONST;
GType video_updates_get_type (void) G_GNUC_CONST;
GType video_source_get_type (void) G_GNUC_CONST;
GType video_get_type (void) G_GNUC_CONST;
#define VIDEO_UPDATES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIDEO_UPDATES, VideoUpdatesPrivate))
enum  {
	VIDEO_UPDATES_DUMMY_PROPERTY
};
VideoUpdates* video_updates_new (Video* video);
VideoUpdates* video_updates_construct (GType object_type, Video* video);
MonitorableUpdates* monitorable_updates_new (Monitorable* monitorable);
MonitorableUpdates* monitorable_updates_construct (GType object_type, Monitorable* monitorable);
void video_updates_set_check_interpretable (VideoUpdates* self, gboolean check);
static void video_updates_real_set_check_interpretable (VideoUpdates* self, gboolean check);
static void video_updates_real_mark_online (MonitorableUpdates* base);
void monitorable_updates_mark_online (MonitorableUpdates* self);
gboolean video_updates_is_check_interpretable (VideoUpdates* self);
static gboolean video_updates_real_is_all_updated (MonitorableUpdates* base);
gboolean monitorable_updates_is_all_updated (MonitorableUpdates* self);
static void video_updates_finalize (MonitorableUpdates* obj);
GType media_monitor_get_type (void) G_GNUC_CONST;
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType media_source_collection_get_type (void) G_GNUC_CONST;
GType media_monitor_discovered_file_get_type (void) G_GNUC_CONST;
gpointer transaction_controller_ref (gpointer instance);
void transaction_controller_unref (gpointer instance);
GParamSpec* param_spec_transaction_controller (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_transaction_controller (GValue* value, gpointer v_object);
void value_take_transaction_controller (GValue* value, gpointer v_object);
gpointer value_get_transaction_controller (const GValue* value);
GType transaction_controller_get_type (void) G_GNUC_CONST;
GType video_monitor_get_type (void) G_GNUC_CONST;
gpointer workers_ref (gpointer instance);
void workers_unref (gpointer instance);
GParamSpec* param_spec_workers (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_workers (GValue* value, gpointer v_object);
void value_take_workers (GValue* value, gpointer v_object);
gpointer value_get_workers (const GValue* value);
GType workers_get_type (void) G_GNUC_CONST;
#define VIDEO_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIDEO_MONITOR, VideoMonitorPrivate))
enum  {
	VIDEO_MONITOR_DUMMY_PROPERTY
};
Workers* workers_new (guint max_threads, gboolean exclusive);
Workers* workers_construct (GType object_type, guint max_threads, gboolean exclusive);
#define VIDEO_MONITOR_MAX_INTERPRETABLE_CHECKS_PER_CYCLE 5
VideoMonitor* video_monitor_new (GCancellable* cancellable);
VideoMonitor* video_monitor_construct (GType object_type, GCancellable* cancellable);
GType video_source_collection_get_type (void) G_GNUC_CONST;
MediaMonitor* media_monitor_construct (GType object_type, MediaSourceCollection* sources, GCancellable* cancellable);
GeeCollection* data_collection_get_all (DataCollection* self);
gboolean video_get_is_interpretable (Video* self);
void video_monitor_set_check_interpretable (VideoMonitor* self, Video* video, gboolean check);
static MonitorableUpdates* video_monitor_real_create_updates (MediaMonitor* base, Monitorable* monitorable);
static MediaSourceCollection* video_monitor_real_get_media_source_collection (MediaMonitor* base);
static gboolean video_monitor_real_is_file_represented (MediaMonitor* base, GFile* file);
GType video_source_collection_state_get_type (void) G_GNUC_CONST;
static Video* video_monitor_get_state (VideoMonitor* self, GFile* file, VideoSourceCollectionState* state);
static MediaMonitorDiscoveredFile video_monitor_real_notify_file_discovered (MediaMonitor* base, GFile* file, GFileInfo* info, Monitorable** monitorable);
static GeeCollection* video_monitor_real_candidates_for_unknown_file (MediaMonitor* base, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
void video_source_collection_fetch_by_matching_backing (VideoSourceCollection* self, GFileInfo* info, GeeCollection* matching_master);
static gboolean video_monitor_real_notify_file_created (MediaMonitor* base, GFile* file, GFileInfo* info);
void media_monitor_update_online (MediaMonitor* self, Monitorable* monitorable);
static gboolean video_monitor_real_notify_file_moved (MediaMonitor* base, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
void media_monitor_update_master_file (MediaMonitor* self, Monitorable* monitorable, GFile* file);
void media_monitor_update_offline (MediaMonitor* self, Monitorable* monitorable);
static gboolean video_monitor_real_notify_file_altered (MediaMonitor* base, GFile* file);
static gboolean video_monitor_real_notify_file_attributes_altered (MediaMonitor* base, GFile* file);
void media_monitor_update_master_file_info_altered (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_master_file_in_alteration (MediaMonitor* self, Monitorable* monitorable, gboolean in_alteration);
static gboolean video_monitor_real_notify_file_alteration_completed (MediaMonitor* base, GFile* file, GFileInfo* info);
void media_monitor_update_master_file_alterations_completed (MediaMonitor* self, Monitorable* monitorable, GFileInfo* info);
static gboolean video_monitor_real_notify_file_deleted (MediaMonitor* base, GFile* file);
GeeCollection* media_monitor_get_monitorables (MediaMonitor* self);
VideoUpdates* video_monitor_get_existing_video_updates (VideoMonitor* self, Video* video);
GFile* monitorable_updates_get_master_file (MonitorableUpdates* self);
GFile* media_source_get_master_file (MediaSource* self);
Video* video_source_collection_get_state_by_file (VideoSourceCollection* self, GFile* file, VideoSourceCollectionState* state);
VideoUpdates* video_monitor_fetch_video_updates (VideoMonitor* self, Video* video);
MonitorableUpdates* media_monitor_fetch_updates (MediaMonitor* self, Monitorable* monitorable);
MonitorableUpdates* media_monitor_get_existing_updates (MediaMonitor* self, Monitorable* monitorable);
static void video_monitor_real_process_updates (MediaMonitor* base, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
void media_monitor_process_updates (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
#define MEDIA_MONITOR_MAX_OPERATIONS_PER_CYCLE 100
void media_monitor_mdbg (const gchar* msg);
void video_notify_offline_thumbs_regenerated (void);
gpointer background_job_ref (gpointer instance);
void background_job_unref (gpointer instance);
GParamSpec* param_spec_background_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_background_job (GValue* value, gpointer v_object);
void value_take_background_job (GValue* value, gpointer v_object);
gpointer value_get_background_job (const GValue* value);
GType background_job_get_type (void) G_GNUC_CONST;
void workers_enqueue (Workers* self, BackgroundJob* job);
static void video_monitor_on_interpretable_check_complete (VideoMonitor* self, BackgroundJob* j);
static void _video_monitor_on_interpretable_check_complete_completion_callback (BackgroundJob* job, gpointer self);
static VideoMonitorVideoInterpretableCheckJob* video_monitor_video_interpretable_check_job_new (Video* video, CompletionCallback callback, void* callback_target);
static VideoMonitorVideoInterpretableCheckJob* video_monitor_video_interpretable_check_job_construct (GType object_type, Video* video, CompletionCallback callback, void* callback_target);
static GType video_monitor_video_interpretable_check_job_get_type (void) G_GNUC_CONST G_GNUC_UNUSED;
GType background_job_job_priority_get_type (void) G_GNUC_CONST;
gpointer video_interpretable_results_ref (gpointer instance);
void video_interpretable_results_unref (gpointer instance);
GParamSpec* video_param_spec_interpretable_results (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void video_value_set_interpretable_results (GValue* value, gpointer v_object);
void video_value_take_interpretable_results (GValue* value, gpointer v_object);
gpointer video_value_get_interpretable_results (const GValue* value);
GType video_interpretable_results_get_type (void) G_GNUC_CONST;
void video_interpretable_results_foreground_finish (VideoInterpretableResults* self);
void video_notify_normal_thumbs_regenerated (void);
enum  {
	VIDEO_MONITOR_VIDEO_INTERPRETABLE_CHECK_JOB_DUMMY_PROPERTY
};
gpointer abstract_semaphore_ref (gpointer instance);
void abstract_semaphore_unref (gpointer instance);
GParamSpec* param_spec_abstract_semaphore (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_abstract_semaphore (GValue* value, gpointer v_object);
void value_take_abstract_semaphore (GValue* value, gpointer v_object);
gpointer value_get_abstract_semaphore (const GValue* value);
GType abstract_semaphore_get_type (void) G_GNUC_CONST;
BackgroundJob* background_job_construct (GType object_type, GObject* owner, CompletionCallback callback, void* callback_target, GCancellable* cancellable, CancellationCallback cancellation, void* cancellation_target, AbstractSemaphore* completion_semaphore);
static void video_monitor_video_interpretable_check_job_real_execute (BackgroundJob* base);
VideoInterpretableResults* video_check_is_interpretable (Video* self);
static void video_monitor_video_interpretable_check_job_finalize (BackgroundJob* obj);
static void video_monitor_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 15 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self ? g_object_ref (self) : NULL;
#line 548 "VideoMonitor.c"
}


VideoUpdates* video_updates_construct (GType object_type, Video* video) {
	VideoUpdates* self = NULL;
	Video* _tmp0_ = NULL;
	Video* _tmp1_ = NULL;
	Video* _tmp2_ = NULL;
#line 12 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO (video), NULL);
#line 13 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video;
#line 13 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = (VideoUpdates*) monitorable_updates_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MONITORABLE, Monitorable));
#line 15 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = video;
#line 15 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 15 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (self->video);
#line 15 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->video = _tmp2_;
#line 12 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self;
#line 573 "VideoMonitor.c"
}


VideoUpdates* video_updates_new (Video* video) {
#line 12 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return video_updates_construct (TYPE_VIDEO_UPDATES, video);
#line 580 "VideoMonitor.c"
}


static void video_updates_real_set_check_interpretable (VideoUpdates* self, gboolean check) {
	gboolean _tmp0_ = FALSE;
#line 19 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = check;
#line 19 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv->check_interpretable = _tmp0_;
#line 590 "VideoMonitor.c"
}


void video_updates_set_check_interpretable (VideoUpdates* self, gboolean check) {
#line 18 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_VIDEO_UPDATES (self));
#line 18 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	VIDEO_UPDATES_GET_CLASS (self)->set_check_interpretable (self, check);
#line 599 "VideoMonitor.c"
}


static void video_updates_real_mark_online (MonitorableUpdates* base) {
	VideoUpdates * self;
#line 22 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_UPDATES, VideoUpdates);
#line 23 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	MONITORABLE_UPDATES_CLASS (video_updates_parent_class)->mark_online (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MONITORABLE_UPDATES, MonitorableUpdates));
#line 25 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_updates_set_check_interpretable (self, TRUE);
#line 611 "VideoMonitor.c"
}


gboolean video_updates_is_check_interpretable (VideoUpdates* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 28 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO_UPDATES (self), FALSE);
#line 29 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = self->priv->check_interpretable;
#line 29 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp0_;
#line 29 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 626 "VideoMonitor.c"
}


static gboolean video_updates_real_is_all_updated (MonitorableUpdates* base) {
	VideoUpdates * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gboolean _tmp1_ = FALSE;
#line 32 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_UPDATES, VideoUpdates);
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = self->priv->check_interpretable;
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp1_ == FALSE) {
#line 641 "VideoMonitor.c"
		gboolean _tmp2_ = FALSE;
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp2_ = MONITORABLE_UPDATES_CLASS (video_updates_parent_class)->is_all_updated (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MONITORABLE_UPDATES, MonitorableUpdates));
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp0_ = _tmp2_;
#line 647 "VideoMonitor.c"
	} else {
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp0_ = FALSE;
#line 651 "VideoMonitor.c"
	}
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp0_;
#line 33 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 657 "VideoMonitor.c"
}


static void video_updates_class_init (VideoUpdatesClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_updates_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MonitorableUpdatesClass *) klass)->finalize = video_updates_finalize;
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_type_class_add_private (klass, sizeof (VideoUpdatesPrivate));
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((VideoUpdatesClass *) klass)->set_check_interpretable = video_updates_real_set_check_interpretable;
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MonitorableUpdatesClass *) klass)->mark_online = video_updates_real_mark_online;
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MonitorableUpdatesClass *) klass)->is_all_updated = video_updates_real_is_all_updated;
#line 674 "VideoMonitor.c"
}


static void video_updates_instance_init (VideoUpdates * self) {
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv = VIDEO_UPDATES_GET_PRIVATE (self);
#line 10 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv->check_interpretable = FALSE;
#line 683 "VideoMonitor.c"
}


static void video_updates_finalize (MonitorableUpdates* obj) {
	VideoUpdates * self;
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO_UPDATES, VideoUpdates);
#line 8 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (self->video);
#line 7 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	MONITORABLE_UPDATES_CLASS (video_updates_parent_class)->finalize (obj);
#line 695 "VideoMonitor.c"
}


GType video_updates_get_type (void) {
	static volatile gsize video_updates_type_id__volatile = 0;
	if (g_once_init_enter (&video_updates_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (VideoUpdatesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_updates_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoUpdates), 0, (GInstanceInitFunc) video_updates_instance_init, NULL };
		GType video_updates_type_id;
		video_updates_type_id = g_type_register_static (TYPE_MONITORABLE_UPDATES, "VideoUpdates", &g_define_type_info, 0);
		g_once_init_leave (&video_updates_type_id__volatile, video_updates_type_id);
	}
	return video_updates_type_id__volatile;
}


VideoMonitor* video_monitor_construct (GType object_type, GCancellable* cancellable) {
	VideoMonitor * self = NULL;
	VideoSourceCollection* _tmp0_ = NULL;
	GCancellable* _tmp1_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 66 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video_global;
#line 66 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = cancellable;
#line 66 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = (VideoMonitor*) media_monitor_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), _tmp1_);
#line 723 "VideoMonitor.c"
	{
		GeeIterator* _obj_it = NULL;
		VideoSourceCollection* _tmp2_ = NULL;
		GeeCollection* _tmp3_ = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
		GeeIterator* _tmp6_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp2_ = video_global;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp3_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_DATA_COLLECTION, DataCollection));
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp4_ = _tmp3_;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp6_ = _tmp5_;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_tmp4_);
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_obj_it = _tmp6_;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		while (TRUE) {
#line 747 "VideoMonitor.c"
			GeeIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			DataObject* obj = NULL;
			GeeIterator* _tmp9_ = NULL;
			gpointer _tmp10_ = NULL;
			Video* video = NULL;
			DataObject* _tmp11_ = NULL;
			Video* _tmp12_ = NULL;
			Video* _tmp13_ = NULL;
			Video* _tmp14_ = NULL;
			gboolean _tmp15_ = FALSE;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp7_ = _obj_it;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp8_ = gee_iterator_next (_tmp7_);
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (!_tmp8_) {
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 767 "VideoMonitor.c"
			}
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp9_ = _obj_it;
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp10_ = gee_iterator_get (_tmp9_);
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			obj = (DataObject*) _tmp10_;
#line 69 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp11_ = obj;
#line 69 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp12_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp11_, TYPE_VIDEO) ? ((Video*) _tmp11_) : NULL);
#line 69 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			video = _tmp12_;
#line 70 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp13_ = video;
#line 70 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_vala_assert (_tmp13_ != NULL, "video != null");
#line 71 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp14_ = video;
#line 71 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp15_ = video_get_is_interpretable (_tmp14_);
#line 71 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (!_tmp15_) {
#line 791 "VideoMonitor.c"
				Video* _tmp16_ = NULL;
#line 72 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp16_ = video;
#line 72 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				video_monitor_set_check_interpretable (self, _tmp16_, TRUE);
#line 797 "VideoMonitor.c"
			}
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (video);
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (obj);
#line 803 "VideoMonitor.c"
		}
#line 68 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_obj_it);
#line 807 "VideoMonitor.c"
	}
#line 65 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self;
#line 811 "VideoMonitor.c"
}


VideoMonitor* video_monitor_new (GCancellable* cancellable) {
#line 65 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return video_monitor_construct (TYPE_VIDEO_MONITOR, cancellable);
#line 818 "VideoMonitor.c"
}


static MonitorableUpdates* video_monitor_real_create_updates (MediaMonitor* base, Monitorable* monitorable) {
	VideoMonitor * self;
	MonitorableUpdates* result = NULL;
	Monitorable* _tmp0_ = NULL;
	Monitorable* _tmp1_ = NULL;
	VideoUpdates* _tmp2_ = NULL;
#line 76 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 76 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 77 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = monitorable;
#line 77 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_vala_assert (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_VIDEO), "monitorable is Video");
#line 79 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = monitorable;
#line 79 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_updates_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_VIDEO, Video));
#line 79 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MONITORABLE_UPDATES, MonitorableUpdates);
#line 79 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 844 "VideoMonitor.c"
}


static gpointer _data_collection_ref0 (gpointer self) {
#line 83 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self ? data_collection_ref (self) : NULL;
#line 851 "VideoMonitor.c"
}


static MediaSourceCollection* video_monitor_real_get_media_source_collection (MediaMonitor* base) {
	VideoMonitor * self;
	MediaSourceCollection* result = NULL;
	VideoSourceCollection* _tmp0_ = NULL;
	MediaSourceCollection* _tmp1_ = NULL;
#line 82 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 83 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video_global;
#line 83 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = _data_collection_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
#line 83 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp1_;
#line 83 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 870 "VideoMonitor.c"
}


static gboolean video_monitor_real_is_file_represented (MediaMonitor* base, GFile* file) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 86 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 86 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = _tmp2_;
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = _tmp3_ != NULL;
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (_tmp3_);
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp4_;
#line 88 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 903 "VideoMonitor.c"
}


static MediaMonitorDiscoveredFile video_monitor_real_notify_file_discovered (MediaMonitor* base, GFile* file, GFileInfo* info, Monitorable** monitorable) {
	VideoMonitor * self;
	Monitorable* _vala_monitorable = NULL;
	MediaMonitorDiscoveredFile result = 0;
	VideoSourceCollectionState state = 0;
	Video* video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	VideoSourceCollectionState _tmp4_ = 0;
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), 0);
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE_INFO (info), 0);
#line 94 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 94 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 94 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 94 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video = _tmp2_;
#line 95 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = video;
#line 95 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp3_ == NULL) {
#line 96 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_vala_monitorable);
#line 96 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_vala_monitorable = NULL;
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		result = MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN;
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (video);
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		if (monitorable) {
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			*monitorable = _vala_monitorable;
#line 948 "VideoMonitor.c"
		} else {
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (_vala_monitorable);
#line 952 "VideoMonitor.c"
		}
#line 98 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return result;
#line 956 "VideoMonitor.c"
	}
#line 101 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = state;
#line 101 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	switch (_tmp4_) {
#line 101 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		case VIDEO_SOURCE_COLLECTION_STATE_ONLINE:
#line 101 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		case VIDEO_SOURCE_COLLECTION_STATE_OFFLINE:
#line 966 "VideoMonitor.c"
		{
			Video* _tmp5_ = NULL;
			Monitorable* _tmp6_ = NULL;
#line 104 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp5_ = video;
#line 104 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp6_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MONITORABLE, Monitorable));
#line 104 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (_vala_monitorable);
#line 104 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_vala_monitorable = _tmp6_;
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			result = MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED;
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (video);
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (monitorable) {
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				*monitorable = _vala_monitorable;
#line 986 "VideoMonitor.c"
			} else {
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (_vala_monitorable);
#line 990 "VideoMonitor.c"
			}
#line 106 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			return result;
#line 994 "VideoMonitor.c"
		}
		default:
#line 101 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		case VIDEO_SOURCE_COLLECTION_STATE_TRASH:
#line 999 "VideoMonitor.c"
		{
#line 111 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (_vala_monitorable);
#line 111 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_vala_monitorable = NULL;
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			result = MEDIA_MONITOR_DISCOVERED_FILE_IGNORE;
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (video);
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (monitorable) {
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				*monitorable = _vala_monitorable;
#line 1013 "VideoMonitor.c"
			} else {
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (_vala_monitorable);
#line 1017 "VideoMonitor.c"
			}
#line 113 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			return result;
#line 1021 "VideoMonitor.c"
		}
	}
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (video);
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (monitorable) {
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		*monitorable = _vala_monitorable;
#line 1030 "VideoMonitor.c"
	} else {
#line 91 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_vala_monitorable);
#line 1034 "VideoMonitor.c"
	}
}


static GeeCollection* video_monitor_real_candidates_for_unknown_file (MediaMonitor* base, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_) {
	VideoMonitor * self;
	MediaMonitorDiscoveredFile _vala_result = 0;
	GeeCollection* result = NULL;
	GeeCollection* matched = NULL;
	GeeArrayList* _tmp0_ = NULL;
	VideoSourceCollection* _tmp1_ = NULL;
	GFileInfo* _tmp2_ = NULL;
#line 117 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 117 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 117 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE_INFO (info), NULL);
#line 119 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 119 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	matched = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection);
#line 120 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = video_global;
#line 120 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = info;
#line 120 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_source_collection_fetch_by_matching_backing (_tmp1_, _tmp2_, matched);
#line 122 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_vala_result = MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN;
#line 124 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = matched;
#line 124 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_result_) {
#line 124 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		*_result_ = _vala_result;
#line 1071 "VideoMonitor.c"
	}
#line 124 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1075 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_created (MediaMonitor* base, GFile* file, GFileInfo* info) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	Video* video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	Video* _tmp4_ = NULL;
#line 127 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 127 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 127 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
#line 129 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 129 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 129 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 129 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video = _tmp2_;
#line 130 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = video;
#line 130 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp3_ == NULL) {
#line 131 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		result = FALSE;
#line 131 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (video);
#line 131 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return result;
#line 1113 "VideoMonitor.c"
	}
#line 133 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = video;
#line 133 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_online (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MONITORABLE, Monitorable));
#line 135 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = TRUE;
#line 135 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (video);
#line 135 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1125 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_moved (MediaMonitor* base, GFile* old_file, GFile* new_file, GFileInfo* new_file_info) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState old_state = 0;
	Video* old_video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	VideoSourceCollectionState new_state = 0;
	Video* new_video = NULL;
	GFile* _tmp3_ = NULL;
	VideoSourceCollectionState _tmp4_ = 0;
	Video* _tmp5_ = NULL;
	gboolean _tmp6_ = FALSE;
	Video* _tmp7_ = NULL;
#line 138 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 138 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (old_file), FALSE);
#line 138 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (new_file), FALSE);
#line 138 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE_INFO (new_file_info), FALSE);
#line 140 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = old_file;
#line 140 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 140 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	old_state = _tmp1_;
#line 140 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	old_video = _tmp2_;
#line 143 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = new_file;
#line 143 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp5_ = video_monitor_get_state (self, _tmp3_, &_tmp4_);
#line 143 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	new_state = _tmp4_;
#line 143 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	new_video = _tmp5_;
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp7_ = old_video;
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp7_ != NULL) {
#line 1172 "VideoMonitor.c"
		Video* _tmp8_ = NULL;
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp8_ = new_video;
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp6_ = _tmp8_ == NULL;
#line 1178 "VideoMonitor.c"
	} else {
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp6_ = FALSE;
#line 1182 "VideoMonitor.c"
	}
#line 157 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp6_) {
#line 1186 "VideoMonitor.c"
		Video* _tmp9_ = NULL;
		GFile* _tmp10_ = NULL;
#line 159 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp9_ = old_video;
#line 159 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp10_ = new_file;
#line 159 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		media_monitor_update_master_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_MONITORABLE, Monitorable), _tmp10_);
#line 1195 "VideoMonitor.c"
	} else {
		gboolean _tmp11_ = FALSE;
		Video* _tmp12_ = NULL;
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp12_ = old_video;
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		if (_tmp12_ == NULL) {
#line 1203 "VideoMonitor.c"
			Video* _tmp13_ = NULL;
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp13_ = new_video;
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp11_ = _tmp13_ != NULL;
#line 1209 "VideoMonitor.c"
		} else {
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp11_ = FALSE;
#line 1213 "VideoMonitor.c"
		}
#line 160 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		if (_tmp11_) {
#line 1217 "VideoMonitor.c"
			Video* _tmp14_ = NULL;
#line 162 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp14_ = new_video;
#line 162 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			video_monitor_set_check_interpretable (self, _tmp14_, TRUE);
#line 1223 "VideoMonitor.c"
		} else {
			gboolean _tmp15_ = FALSE;
			Video* _tmp16_ = NULL;
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp16_ = old_video;
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp16_ == NULL) {
#line 1231 "VideoMonitor.c"
				Video* _tmp17_ = NULL;
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp17_ = new_video;
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp15_ = _tmp17_ == NULL;
#line 1237 "VideoMonitor.c"
			} else {
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp15_ = FALSE;
#line 1241 "VideoMonitor.c"
			}
#line 163 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp15_) {
#line 165 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				result = FALSE;
#line 165 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (new_video);
#line 165 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (old_video);
#line 165 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				return result;
#line 1253 "VideoMonitor.c"
			} else {
				gboolean _tmp18_ = FALSE;
				Video* _tmp19_ = NULL;
				Video* _tmp21_ = NULL;
				Video* _tmp22_ = NULL;
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp19_ = old_video;
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				if (_tmp19_ != NULL) {
#line 1263 "VideoMonitor.c"
					Video* _tmp20_ = NULL;
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					_tmp20_ = new_video;
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					_tmp18_ = _tmp20_ != NULL;
#line 1269 "VideoMonitor.c"
				} else {
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					_tmp18_ = FALSE;
#line 1273 "VideoMonitor.c"
				}
#line 167 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_vala_assert (_tmp18_, "old_video != null && new_video != null");
#line 170 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp21_ = old_video;
#line 170 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				media_monitor_update_offline (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, TYPE_MONITORABLE, Monitorable));
#line 171 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp22_ = new_video;
#line 171 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				video_monitor_set_check_interpretable (self, _tmp22_, TRUE);
#line 1285 "VideoMonitor.c"
			}
		}
	}
#line 174 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = TRUE;
#line 174 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (new_video);
#line 174 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (old_video);
#line 174 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1297 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_altered (MediaMonitor* base, GFile* file) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	gboolean _tmp4_ = FALSE;
#line 177 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 177 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = _tmp2_;
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = _tmp3_ != NULL;
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (_tmp3_);
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp4_;
#line 179 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1330 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_attributes_altered (MediaMonitor* base, GFile* file) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	Video* video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	Video* _tmp4_ = NULL;
	Video* _tmp5_ = NULL;
#line 182 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 182 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 184 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 184 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 184 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 184 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video = _tmp2_;
#line 185 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = video;
#line 185 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp3_ == NULL) {
#line 186 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		result = FALSE;
#line 186 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (video);
#line 186 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return result;
#line 1367 "VideoMonitor.c"
	}
#line 188 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = video;
#line 188 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_master_file_info_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MONITORABLE, Monitorable));
#line 189 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp5_ = video;
#line 189 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_master_file_in_alteration (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MONITORABLE, Monitorable), TRUE);
#line 191 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = TRUE;
#line 191 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (video);
#line 191 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1383 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_alteration_completed (MediaMonitor* base, GFile* file, GFileInfo* info) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	Video* video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	Video* _tmp4_ = NULL;
	GFileInfo* _tmp5_ = NULL;
#line 194 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 194 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 194 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE_INFO (info), FALSE);
#line 196 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 196 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 196 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 196 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video = _tmp2_;
#line 197 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = video;
#line 197 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp3_ == NULL) {
#line 198 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		result = FALSE;
#line 198 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (video);
#line 198 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return result;
#line 1422 "VideoMonitor.c"
	}
#line 200 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = video;
#line 200 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp5_ = info;
#line 200 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_master_file_alterations_completed (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MONITORABLE, Monitorable), _tmp5_);
#line 202 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = TRUE;
#line 202 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (video);
#line 202 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1436 "VideoMonitor.c"
}


static gboolean video_monitor_real_notify_file_deleted (MediaMonitor* base, GFile* file) {
	VideoMonitor * self;
	gboolean result = FALSE;
	VideoSourceCollectionState state = 0;
	Video* video = NULL;
	GFile* _tmp0_ = NULL;
	VideoSourceCollectionState _tmp1_ = 0;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
	Video* _tmp4_ = NULL;
	Video* _tmp5_ = NULL;
#line 205 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 205 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), FALSE);
#line 207 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = file;
#line 207 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video_monitor_get_state (self, _tmp0_, &_tmp1_);
#line 207 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	state = _tmp1_;
#line 207 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video = _tmp2_;
#line 208 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = video;
#line 208 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp3_ == NULL) {
#line 209 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		result = FALSE;
#line 209 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (video);
#line 209 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return result;
#line 1473 "VideoMonitor.c"
	}
#line 211 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = video;
#line 211 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_master_file_in_alteration (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MONITORABLE, Monitorable), FALSE);
#line 212 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp5_ = video;
#line 212 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	media_monitor_update_offline (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_MONITORABLE, Monitorable));
#line 214 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = TRUE;
#line 214 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (video);
#line 214 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1489 "VideoMonitor.c"
}


static Video* video_monitor_get_state (VideoMonitor* self, GFile* file, VideoSourceCollectionState* state) {
	VideoSourceCollectionState _vala_state = 0;
	Video* result = NULL;
	GFile* real_file = NULL;
	GFile* _tmp25_ = NULL;
	GFile* _tmp26_ = NULL;
	VideoSourceCollection* _tmp28_ = NULL;
	VideoSourceCollectionState _tmp29_ = 0;
	Video* _tmp30_ = NULL;
#line 217 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO_MONITOR (self), NULL);
#line 217 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (G_IS_FILE (file), NULL);
#line 218 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	real_file = NULL;
#line 1508 "VideoMonitor.c"
	{
		GeeIterator* _monitorable_it = NULL;
		GeeCollection* _tmp0_ = NULL;
		GeeCollection* _tmp1_ = NULL;
		GeeIterator* _tmp2_ = NULL;
		GeeIterator* _tmp3_ = NULL;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp0_ = media_monitor_get_monitorables (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor));
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp1_ = _tmp0_;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp3_ = _tmp2_;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_tmp1_);
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_monitorable_it = _tmp3_;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		while (TRUE) {
#line 1529 "VideoMonitor.c"
			GeeIterator* _tmp4_ = NULL;
			gboolean _tmp5_ = FALSE;
			Monitorable* monitorable = NULL;
			GeeIterator* _tmp6_ = NULL;
			gpointer _tmp7_ = NULL;
			Video* video = NULL;
			Monitorable* _tmp8_ = NULL;
			Video* _tmp9_ = NULL;
			VideoUpdates* updates = NULL;
			Video* _tmp10_ = NULL;
			VideoUpdates* _tmp11_ = NULL;
			VideoUpdates* _tmp12_ = NULL;
			gboolean _tmp13_ = FALSE;
			VideoUpdates* _tmp14_ = NULL;
			GFile* _tmp15_ = NULL;
			GFile* _tmp16_ = NULL;
			gboolean _tmp17_ = FALSE;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp4_ = _monitorable_it;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (!_tmp5_) {
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 1555 "VideoMonitor.c"
			}
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp6_ = _monitorable_it;
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			monitorable = (Monitorable*) _tmp7_;
#line 220 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp8_ = monitorable;
#line 220 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp9_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_VIDEO, Video));
#line 220 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			video = _tmp9_;
#line 222 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp10_ = video;
#line 222 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp11_ = video_monitor_get_existing_video_updates (self, _tmp10_);
#line 222 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			updates = _tmp11_;
#line 223 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp12_ = updates;
#line 223 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp12_ == NULL) {
#line 224 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (updates);
#line 224 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (video);
#line 224 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (monitorable);
#line 224 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				continue;
#line 1587 "VideoMonitor.c"
			}
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp14_ = updates;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp15_ = monitorable_updates_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, TYPE_MONITORABLE_UPDATES, MonitorableUpdates));
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp16_ = _tmp15_;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp17_ = _tmp16_ != NULL;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (_tmp16_);
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp17_) {
#line 1601 "VideoMonitor.c"
				VideoUpdates* _tmp18_ = NULL;
				GFile* _tmp19_ = NULL;
				GFile* _tmp20_ = NULL;
				GFile* _tmp21_ = NULL;
				gboolean _tmp22_ = FALSE;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp18_ = updates;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp19_ = monitorable_updates_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp18_, TYPE_MONITORABLE_UPDATES, MonitorableUpdates));
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp20_ = _tmp19_;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp21_ = file;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp22_ = g_file_equal (_tmp20_, _tmp21_);
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp13_ = _tmp22_;
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (_tmp20_);
#line 1621 "VideoMonitor.c"
			} else {
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp13_ = FALSE;
#line 1625 "VideoMonitor.c"
			}
#line 226 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp13_) {
#line 1629 "VideoMonitor.c"
				Video* _tmp23_ = NULL;
				GFile* _tmp24_ = NULL;
#line 227 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp23_ = video;
#line 227 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp24_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_MEDIA_SOURCE, MediaSource));
#line 227 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (real_file);
#line 227 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				real_file = _tmp24_;
#line 229 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (updates);
#line 229 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (video);
#line 229 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (monitorable);
#line 229 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 1648 "VideoMonitor.c"
			}
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_monitorable_updates_unref0 (updates);
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (video);
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (monitorable);
#line 1656 "VideoMonitor.c"
		}
#line 219 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_monitorable_it);
#line 1660 "VideoMonitor.c"
	}
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp26_ = real_file;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp25_ = _tmp26_;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp25_ == NULL) {
#line 1668 "VideoMonitor.c"
		GFile* _tmp27_ = NULL;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp27_ = file;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp25_ = _tmp27_;
#line 1674 "VideoMonitor.c"
	}
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp28_ = video_global;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp30_ = video_source_collection_get_state_by_file (_tmp28_, _tmp25_, &_tmp29_);
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_vala_state = _tmp29_;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp30_;
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (real_file);
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (state) {
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		*state = _vala_state;
#line 1690 "VideoMonitor.c"
	}
#line 233 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1694 "VideoMonitor.c"
}


VideoUpdates* video_monitor_fetch_video_updates (VideoMonitor* self, Video* video) {
	VideoUpdates* result = NULL;
	VideoUpdates* updates = NULL;
	Video* _tmp0_ = NULL;
	MonitorableUpdates* _tmp1_ = NULL;
	VideoUpdates* _tmp2_ = NULL;
#line 236 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO_MONITOR (self), NULL);
#line 236 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO (video), NULL);
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video;
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = media_monitor_fetch_updates (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MONITORABLE, Monitorable));
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIDEO_UPDATES) ? ((VideoUpdates*) _tmp1_) : NULL;
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp2_ == NULL) {
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_monitorable_updates_unref0 (_tmp1_);
#line 1718 "VideoMonitor.c"
	}
#line 237 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	updates = _tmp2_;
#line 238 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_vala_assert (updates != NULL, "updates != null");
#line 240 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = updates;
#line 240 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1728 "VideoMonitor.c"
}


VideoUpdates* video_monitor_get_existing_video_updates (VideoMonitor* self, Video* video) {
	VideoUpdates* result = NULL;
	Video* _tmp0_ = NULL;
	MonitorableUpdates* _tmp1_ = NULL;
	VideoUpdates* _tmp2_ = NULL;
#line 243 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO_MONITOR (self), NULL);
#line 243 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO (video), NULL);
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video;
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = media_monitor_get_existing_updates (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MONITORABLE, Monitorable));
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, TYPE_VIDEO_UPDATES) ? ((VideoUpdates*) _tmp1_) : NULL;
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp2_ == NULL) {
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_monitorable_updates_unref0 (_tmp1_);
#line 1751 "VideoMonitor.c"
	}
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	result = _tmp2_;
#line 244 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return result;
#line 1757 "VideoMonitor.c"
}


void video_monitor_set_check_interpretable (VideoMonitor* self, Video* video, gboolean check) {
	Video* _tmp0_ = NULL;
	VideoUpdates* _tmp1_ = NULL;
	VideoUpdates* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
#line 247 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_VIDEO_MONITOR (self));
#line 247 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_VIDEO (video));
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video;
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = video_monitor_fetch_video_updates (self, _tmp0_);
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = _tmp1_;
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = check;
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_updates_set_check_interpretable (_tmp2_, _tmp3_);
#line 248 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_monitorable_updates_unref0 (_tmp2_);
#line 1782 "VideoMonitor.c"
}


static gpointer _monitorable_updates_ref0 (gpointer self) {
#line 266 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self ? monitorable_updates_ref (self) : NULL;
#line 1789 "VideoMonitor.c"
}


static void _video_monitor_on_interpretable_check_complete_completion_callback (BackgroundJob* job, gpointer self) {
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_monitor_on_interpretable_check_complete ((VideoMonitor*) self, job);
#line 1796 "VideoMonitor.c"
}


static void video_monitor_real_process_updates (MediaMonitor* base, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error) {
	VideoMonitor * self;
	GeeCollection* _tmp0_ = NULL;
	TransactionController* _tmp1_ = NULL;
	GeeArrayList* check = NULL;
	GeeArrayList* _tmp26_ = NULL;
	GError * _inner_error_ = NULL;
#line 251 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 251 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (GEE_IS_COLLECTION (all_updates));
#line 251 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = all_updates;
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = controller;
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	MEDIA_MONITOR_CLASS (video_monitor_parent_class)->process_updates (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_MONITOR, MediaMonitor), _tmp0_, _tmp1_, op_count, &_inner_error_);
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		g_propagate_error (error, _inner_error_);
#line 253 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		return;
#line 1825 "VideoMonitor.c"
	}
#line 255 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	check = NULL;
#line 1829 "VideoMonitor.c"
	{
		GeeIterator* _monitorable_updates_it = NULL;
		GeeCollection* _tmp2_ = NULL;
		GeeIterator* _tmp3_ = NULL;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp2_ = all_updates;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_monitorable_updates_it = _tmp3_;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		while (TRUE) {
#line 1842 "VideoMonitor.c"
			GeeIterator* _tmp4_ = NULL;
			gboolean _tmp5_ = FALSE;
			MonitorableUpdates* monitorable_updates = NULL;
			GeeIterator* _tmp6_ = NULL;
			gpointer _tmp7_ = NULL;
			gint _tmp8_ = 0;
			gboolean _tmp9_ = FALSE;
			GeeArrayList* _tmp10_ = NULL;
			VideoUpdates* updates = NULL;
			MonitorableUpdates* _tmp14_ = NULL;
			VideoUpdates* _tmp15_ = NULL;
			VideoUpdates* _tmp16_ = NULL;
			VideoUpdates* _tmp17_ = NULL;
			gboolean _tmp18_ = FALSE;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp4_ = _monitorable_updates_it;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp5_ = gee_iterator_next (_tmp4_);
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (!_tmp5_) {
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 1865 "VideoMonitor.c"
			}
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp6_ = _monitorable_updates_it;
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			monitorable_updates = (MonitorableUpdates*) _tmp7_;
#line 258 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp8_ = *op_count;
#line 258 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp8_ >= MEDIA_MONITOR_MAX_OPERATIONS_PER_CYCLE) {
#line 259 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (monitorable_updates);
#line 259 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 1881 "VideoMonitor.c"
			}
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp10_ = check;
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp10_ != NULL) {
#line 1887 "VideoMonitor.c"
				GeeArrayList* _tmp11_ = NULL;
				gint _tmp12_ = 0;
				gint _tmp13_ = 0;
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp11_ = check;
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp12_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp13_ = _tmp12_;
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp9_ = _tmp13_ >= VIDEO_MONITOR_MAX_INTERPRETABLE_CHECKS_PER_CYCLE;
#line 1899 "VideoMonitor.c"
			} else {
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp9_ = FALSE;
#line 1903 "VideoMonitor.c"
			}
#line 263 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp9_) {
#line 264 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (monitorable_updates);
#line 264 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				break;
#line 1911 "VideoMonitor.c"
			}
#line 266 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp14_ = monitorable_updates;
#line 266 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp15_ = _monitorable_updates_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp14_, TYPE_VIDEO_UPDATES) ? ((VideoUpdates*) _tmp14_) : NULL);
#line 266 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			updates = _tmp15_;
#line 267 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp16_ = updates;
#line 267 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp16_ == NULL) {
#line 268 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (updates);
#line 268 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_monitorable_updates_unref0 (monitorable_updates);
#line 268 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				continue;
#line 1929 "VideoMonitor.c"
			}
#line 270 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp17_ = updates;
#line 270 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp18_ = video_updates_is_check_interpretable (_tmp17_);
#line 270 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			if (_tmp18_) {
#line 1937 "VideoMonitor.c"
				GeeArrayList* _tmp19_ = NULL;
				GeeArrayList* _tmp21_ = NULL;
				VideoUpdates* _tmp22_ = NULL;
				Video* _tmp23_ = NULL;
				VideoUpdates* _tmp24_ = NULL;
				gint _tmp25_ = 0;
#line 271 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp19_ = check;
#line 271 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				if (_tmp19_ == NULL) {
#line 1948 "VideoMonitor.c"
					GeeArrayList* _tmp20_ = NULL;
#line 272 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					_tmp20_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 272 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					_g_object_unref0 (check);
#line 272 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					check = _tmp20_;
#line 1956 "VideoMonitor.c"
				}
#line 274 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp21_ = check;
#line 274 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp22_ = updates;
#line 274 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp23_ = _tmp22_->video;
#line 274 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp21_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp23_);
#line 275 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp24_ = updates;
#line 275 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				video_updates_set_check_interpretable (_tmp24_, FALSE);
#line 276 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp25_ = *op_count;
#line 276 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				*op_count = _tmp25_ + 1;
#line 1974 "VideoMonitor.c"
			}
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_monitorable_updates_unref0 (updates);
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_monitorable_updates_unref0 (monitorable_updates);
#line 1980 "VideoMonitor.c"
		}
#line 257 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_object_unref0 (_monitorable_updates_it);
#line 1984 "VideoMonitor.c"
	}
#line 280 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp26_ = check;
#line 280 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp26_ != NULL) {
#line 1990 "VideoMonitor.c"
		GeeArrayList* _tmp27_ = NULL;
		gint _tmp28_ = 0;
		gint _tmp29_ = 0;
		gchar* _tmp30_ = NULL;
		gchar* _tmp31_ = NULL;
		guint64 _tmp32_ = 0ULL;
		GeeArrayList* _tmp33_ = NULL;
		gint _tmp34_ = 0;
		gint _tmp35_ = 0;
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp27_ = check;
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp28_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_COLLECTION, GeeCollection));
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp29_ = _tmp28_;
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp30_ = g_strdup_printf ("Checking interpretable for %d videos", _tmp29_);
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp31_ = _tmp30_;
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		media_monitor_mdbg (_tmp31_);
#line 281 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_g_free0 (_tmp31_);
#line 283 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		video_notify_offline_thumbs_regenerated ();
#line 285 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp32_ = self->priv->background_jobs;
#line 285 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp33_ = check;
#line 285 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp34_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_COLLECTION, GeeCollection));
#line 285 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		_tmp35_ = _tmp34_;
#line 285 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		self->priv->background_jobs = _tmp32_ + _tmp35_;
#line 2026 "VideoMonitor.c"
		{
			GeeArrayList* _video_list = NULL;
			GeeArrayList* _tmp36_ = NULL;
			GeeArrayList* _tmp37_ = NULL;
			gint _video_size = 0;
			GeeArrayList* _tmp38_ = NULL;
			gint _tmp39_ = 0;
			gint _tmp40_ = 0;
			gint _video_index = 0;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp36_ = check;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp37_ = _g_object_ref0 (_tmp36_);
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_video_list = _tmp37_;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp38_ = _video_list;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp39_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_COLLECTION, GeeCollection));
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_tmp40_ = _tmp39_;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_video_size = _tmp40_;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_video_index = -1;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			while (TRUE) {
#line 2054 "VideoMonitor.c"
				gint _tmp41_ = 0;
				gint _tmp42_ = 0;
				gint _tmp43_ = 0;
				Video* video = NULL;
				GeeArrayList* _tmp44_ = NULL;
				gint _tmp45_ = 0;
				gpointer _tmp46_ = NULL;
				Workers* _tmp47_ = NULL;
				Video* _tmp48_ = NULL;
				VideoMonitorVideoInterpretableCheckJob* _tmp49_ = NULL;
				VideoMonitorVideoInterpretableCheckJob* _tmp50_ = NULL;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp41_ = _video_index;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_video_index = _tmp41_ + 1;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp42_ = _video_index;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp43_ = _video_size;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				if (!(_tmp42_ < _tmp43_)) {
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
					break;
#line 2078 "VideoMonitor.c"
				}
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp44_ = _video_list;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp45_ = _video_index;
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp46_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp45_);
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				video = (Video*) _tmp46_;
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp47_ = self->priv->workers;
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp48_ = video;
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp49_ = video_monitor_video_interpretable_check_job_new (_tmp48_, _video_monitor_on_interpretable_check_complete_completion_callback, self);
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_tmp50_ = _tmp49_;
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				workers_enqueue (_tmp47_, G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_BACKGROUND_JOB, BackgroundJob));
#line 287 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_background_job_unref0 (_tmp50_);
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
				_g_object_unref0 (video);
#line 2102 "VideoMonitor.c"
			}
#line 286 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
			_g_object_unref0 (_video_list);
#line 2106 "VideoMonitor.c"
		}
	}
#line 251 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (check);
#line 2111 "VideoMonitor.c"
}


static gpointer _background_job_ref0 (gpointer self) {
#line 292 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self ? background_job_ref (self) : NULL;
#line 2118 "VideoMonitor.c"
}


static void video_monitor_on_interpretable_check_complete (VideoMonitor* self, BackgroundJob* j) {
	VideoMonitorVideoInterpretableCheckJob* job = NULL;
	BackgroundJob* _tmp0_ = NULL;
	VideoMonitorVideoInterpretableCheckJob* _tmp1_ = NULL;
	VideoMonitorVideoInterpretableCheckJob* _tmp2_ = NULL;
	VideoInterpretableResults* _tmp3_ = NULL;
	guint64 _tmp4_ = 0ULL;
	guint64 _tmp5_ = 0ULL;
#line 291 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_VIDEO_MONITOR (self));
#line 291 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_if_fail (IS_BACKGROUND_JOB (j));
#line 292 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = j;
#line 292 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = _background_job_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJob));
#line 292 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	job = _tmp1_;
#line 294 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = job;
#line 294 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = _tmp2_->results;
#line 294 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_interpretable_results_foreground_finish (_tmp3_);
#line 296 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp4_ = self->priv->background_jobs;
#line 296 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv->background_jobs = _tmp4_ - 1;
#line 297 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp5_ = self->priv->background_jobs;
#line 297 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	if (_tmp5_ <= ((guint64) 0)) {
#line 298 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
		video_notify_normal_thumbs_regenerated ();
#line 2156 "VideoMonitor.c"
	}
#line 291 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_background_job_unref0 (job);
#line 2160 "VideoMonitor.c"
}


static VideoMonitorVideoInterpretableCheckJob* video_monitor_video_interpretable_check_job_construct (GType object_type, Video* video, CompletionCallback callback, void* callback_target) {
	VideoMonitorVideoInterpretableCheckJob* self = NULL;
	Video* _tmp0_ = NULL;
	CompletionCallback _tmp1_ = NULL;
	void* _tmp1__target = NULL;
	Video* _tmp2_ = NULL;
	Video* _tmp3_ = NULL;
#line 49 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_return_val_if_fail (IS_VIDEO (video), NULL);
#line 50 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = video;
#line 50 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = callback;
#line 50 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1__target = callback_target;
#line 50 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = (VideoMonitorVideoInterpretableCheckJob*) background_job_construct (object_type, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, G_TYPE_OBJECT, GObject), _tmp1_, _tmp1__target, NULL, NULL, NULL, NULL);
#line 51 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp2_ = video;
#line 51 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 51 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (self->video);
#line 51 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->video = _tmp3_;
#line 49 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return self;
#line 2191 "VideoMonitor.c"
}


static VideoMonitorVideoInterpretableCheckJob* video_monitor_video_interpretable_check_job_new (Video* video, CompletionCallback callback, void* callback_target) {
#line 49 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	return video_monitor_video_interpretable_check_job_construct (VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, video, callback, callback_target);
#line 2198 "VideoMonitor.c"
}


static void video_monitor_video_interpretable_check_job_real_execute (BackgroundJob* base) {
	VideoMonitorVideoInterpretableCheckJob * self;
	Video* _tmp0_ = NULL;
	VideoInterpretableResults* _tmp1_ = NULL;
#line 54 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJob);
#line 55 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = self->video;
#line 55 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp1_ = video_check_is_interpretable (_tmp0_);
#line 55 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_video_interpretable_results_unref0 (self->results);
#line 55 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->results = _tmp1_;
#line 2216 "VideoMonitor.c"
}


static void video_monitor_video_interpretable_check_job_class_init (VideoMonitorVideoInterpretableCheckJobClass * klass) {
#line 42 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_monitor_video_interpretable_check_job_parent_class = g_type_class_peek_parent (klass);
#line 42 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((BackgroundJobClass *) klass)->finalize = video_monitor_video_interpretable_check_job_finalize;
#line 42 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((BackgroundJobClass *) klass)->execute = video_monitor_video_interpretable_check_job_real_execute;
#line 2227 "VideoMonitor.c"
}


static void video_monitor_video_interpretable_check_job_instance_init (VideoMonitorVideoInterpretableCheckJob * self) {
#line 47 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->results = NULL;
#line 2234 "VideoMonitor.c"
}


static void video_monitor_video_interpretable_check_job_finalize (BackgroundJob* obj) {
	VideoMonitorVideoInterpretableCheckJob * self;
#line 42 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIDEO_MONITOR_TYPE_VIDEO_INTERPRETABLE_CHECK_JOB, VideoMonitorVideoInterpretableCheckJob);
#line 44 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_g_object_unref0 (self->video);
#line 47 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_video_interpretable_results_unref0 (self->results);
#line 42 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	BACKGROUND_JOB_CLASS (video_monitor_video_interpretable_check_job_parent_class)->finalize (obj);
#line 2248 "VideoMonitor.c"
}


static GType video_monitor_video_interpretable_check_job_get_type (void) {
	static volatile gsize video_monitor_video_interpretable_check_job_type_id__volatile = 0;
	if (g_once_init_enter (&video_monitor_video_interpretable_check_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (VideoMonitorVideoInterpretableCheckJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_monitor_video_interpretable_check_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoMonitorVideoInterpretableCheckJob), 0, (GInstanceInitFunc) video_monitor_video_interpretable_check_job_instance_init, NULL };
		GType video_monitor_video_interpretable_check_job_type_id;
		video_monitor_video_interpretable_check_job_type_id = g_type_register_static (TYPE_BACKGROUND_JOB, "VideoMonitorVideoInterpretableCheckJob", &g_define_type_info, 0);
		g_once_init_leave (&video_monitor_video_interpretable_check_job_type_id__volatile, video_monitor_video_interpretable_check_job_type_id);
	}
	return video_monitor_video_interpretable_check_job_type_id__volatile;
}


static void video_monitor_class_init (VideoMonitorClass * klass) {
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	video_monitor_parent_class = g_type_class_peek_parent (klass);
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	g_type_class_add_private (klass, sizeof (VideoMonitorPrivate));
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->create_updates = video_monitor_real_create_updates;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->get_media_source_collection = video_monitor_real_get_media_source_collection;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->is_file_represented = video_monitor_real_is_file_represented;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_discovered = video_monitor_real_notify_file_discovered;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->candidates_for_unknown_file = video_monitor_real_candidates_for_unknown_file;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_created = video_monitor_real_notify_file_created;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_moved = video_monitor_real_notify_file_moved;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_altered = video_monitor_real_notify_file_altered;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_attributes_altered = video_monitor_real_notify_file_attributes_altered;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_alteration_completed = video_monitor_real_notify_file_alteration_completed;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->notify_file_deleted = video_monitor_real_notify_file_deleted;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	((MediaMonitorClass *) klass)->process_updates = video_monitor_real_process_updates;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	G_OBJECT_CLASS (klass)->finalize = video_monitor_finalize;
#line 2295 "VideoMonitor.c"
}


static void video_monitor_instance_init (VideoMonitor * self) {
	Workers* _tmp0_ = NULL;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv = VIDEO_MONITOR_GET_PRIVATE (self);
#line 62 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_tmp0_ = workers_new ((guint) 1, FALSE);
#line 62 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv->workers = _tmp0_;
#line 63 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self->priv->background_jobs = (guint64) 0;
#line 2309 "VideoMonitor.c"
}


static void video_monitor_finalize (GObject* obj) {
	VideoMonitor * self;
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO_MONITOR, VideoMonitor);
#line 62 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	_workers_unref0 (self->priv->workers);
#line 37 "/home/jens/Source/shotwell/src/VideoMonitor.vala"
	G_OBJECT_CLASS (video_monitor_parent_class)->finalize (obj);
#line 2321 "VideoMonitor.c"
}


GType video_monitor_get_type (void) {
	static volatile gsize video_monitor_type_id__volatile = 0;
	if (g_once_init_enter (&video_monitor_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (VideoMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoMonitor), 0, (GInstanceInitFunc) video_monitor_instance_init, NULL };
		GType video_monitor_type_id;
		video_monitor_type_id = g_type_register_static (TYPE_MEDIA_MONITOR, "VideoMonitor", &g_define_type_info, 0);
		g_once_init_leave (&video_monitor_type_id__volatile, video_monitor_type_id);
	}
	return video_monitor_type_id__volatile;
}