summaryrefslogtreecommitdiff
path: root/thumbnailer/shotwell-video-thumbnailer.c
blob: 5495ab8a968342c646d1e3b2f22e8f882679ee86 (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
/* shotwell-video-thumbnailer.c generated by valac 0.32.1, the Vala compiler
 * generated from shotwell-video-thumbnailer.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 * 
 * This is a Vala-rewrite of GStreamer snapshot example. Adapted from earlier 
 * work from Wim Taymans.
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */
/* Shotwell Thumbnailer takes in a video file and returns a thumbnail to stdout.  This is*/
/* a replacement for totem-video-thumbnailer*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gst/gst.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdio.h>
#include <gobject/gvaluecollector.h>


#define TYPE_SHOTWELL_THUMBNAILER (shotwell_thumbnailer_get_type ())
#define SHOTWELL_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SHOTWELL_THUMBNAILER, ShotwellThumbnailer))
#define SHOTWELL_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SHOTWELL_THUMBNAILER, ShotwellThumbnailerClass))
#define IS_SHOTWELL_THUMBNAILER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SHOTWELL_THUMBNAILER))
#define IS_SHOTWELL_THUMBNAILER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SHOTWELL_THUMBNAILER))
#define SHOTWELL_THUMBNAILER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SHOTWELL_THUMBNAILER, ShotwellThumbnailerClass))

typedef struct _ShotwellThumbnailer ShotwellThumbnailer;
typedef struct _ShotwellThumbnailerClass ShotwellThumbnailerClass;
typedef struct _ShotwellThumbnailerPrivate ShotwellThumbnailerPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ParamSpecShotwellThumbnailer ParamSpecShotwellThumbnailer;

struct _ShotwellThumbnailer {
	GTypeInstance parent_instance;
	volatile int ref_count;
	ShotwellThumbnailerPrivate * priv;
};

struct _ShotwellThumbnailerClass {
	GTypeClass parent_class;
	void (*finalize) (ShotwellThumbnailer *self);
};

struct _ParamSpecShotwellThumbnailer {
	GParamSpec parent_instance;
};


static gpointer shotwell_thumbnailer_parent_class = NULL;

gpointer shotwell_thumbnailer_ref (gpointer instance);
void shotwell_thumbnailer_unref (gpointer instance);
GParamSpec* param_spec_shotwell_thumbnailer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_shotwell_thumbnailer (GValue* value, gpointer v_object);
void value_take_shotwell_thumbnailer (GValue* value, gpointer v_object);
gpointer value_get_shotwell_thumbnailer (const GValue* value);
GType shotwell_thumbnailer_get_type (void) G_GNUC_CONST;
enum  {
	SHOTWELL_THUMBNAILER_DUMMY_PROPERTY
};
#define SHOTWELL_THUMBNAILER_caps_string "video/x-raw,format=RGB,pixel-aspect-ratio=1/1"
gint shotwell_thumbnailer_main (gchar** args, int args_length1);
ShotwellThumbnailer* shotwell_thumbnailer_new (void);
ShotwellThumbnailer* shotwell_thumbnailer_construct (GType object_type);
static void shotwell_thumbnailer_finalize (ShotwellThumbnailer* obj);


gint shotwell_thumbnailer_main (gchar** args, int args_length1) {
	gint result = 0;
	GstElement* pipeline = NULL;
	GstElement* sink = NULL;
	gchar* descr = NULL;
	GdkPixbuf* pixbuf = NULL;
	guint8* pngdata = NULL;
	gint pngdata_length1 = 0;
	gint _pngdata_size_ = 0;
	gint64 duration = 0LL;
	gint64 position = 0LL;
	GstStateChangeReturn ret = 0;
	gchar** _tmp0_ = NULL;
	gint _tmp0__length1 = 0;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	gchar* _tmp9_ = NULL;
	gchar* _tmp10_ = NULL;
	GError * _inner_error_ = NULL;
#line 23 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	gst_init (&args_length1, &args);
#line 25 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp0_ = args;
#line 25 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp0__length1 = args_length1;
#line 25 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (_tmp0__length1 != 2) {
#line 107 "shotwell-video-thumbnailer.c"
		FILE* _tmp1_ = NULL;
		gchar** _tmp2_ = NULL;
		gint _tmp2__length1 = 0;
		const gchar* _tmp3_ = NULL;
#line 26 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp1_ = stdout;
#line 26 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp2_ = args;
#line 26 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp2__length1 = args_length1;
#line 26 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp3_ = _tmp2_[0];
#line 26 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		fprintf (_tmp1_, "usage: %s [filename]\n Writes video thumbnail to stdout\n", _tmp3_);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		result = 1;
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata = (g_free (pngdata), NULL);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pixbuf);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_free0 (descr);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (sink);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pipeline);
#line 27 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		return result;
#line 136 "shotwell-video-thumbnailer.c"
	}
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp4_ = args;
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp4__length1 = args_length1;
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp5_ = _tmp4_[1];
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp6_ = g_strdup_printf ("filesrc location=\"%s\" ! decodebin ! videoconvert ! videoscale ! ", _tmp5_);
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp7_ = _tmp6_;
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp8_ = g_strdup_printf ("%s ! gdkpixbufsink name=sink", SHOTWELL_THUMBNAILER_caps_string);
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp9_ = _tmp8_;
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_tmp10_ = g_strconcat (_tmp7_, _tmp9_, NULL);
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_free0 (descr);
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	descr = _tmp10_;
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_free0 (_tmp9_);
#line 30 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_free0 (_tmp7_);
#line 162 "shotwell-video-thumbnailer.c"
	{
		GstElement* _tmp11_ = NULL;
		const gchar* _tmp12_ = NULL;
		GstElement* _tmp13_ = NULL;
		GstElement* _tmp14_ = NULL;
		GstElement* _tmp15_ = NULL;
		GstElement* _tmp16_ = NULL;
		GstElement* _tmp17_ = NULL;
		GstStateChangeReturn _tmp18_ = 0;
		GstStateChangeReturn _tmp19_ = 0;
		GstElement* _tmp23_ = NULL;
		GstStateChangeReturn _tmp24_ = 0;
		GstStateChangeReturn _tmp25_ = 0;
		GstElement* _tmp27_ = NULL;
		gint64 _tmp28_ = 0LL;
		gboolean _tmp29_ = FALSE;
		GstElement* _tmp31_ = NULL;
		gint64 _tmp32_ = 0LL;
		GstElement* _tmp33_ = NULL;
		GstStateChangeReturn _tmp34_ = 0;
		GstStateChangeReturn _tmp35_ = 0;
		GstElement* _tmp37_ = NULL;
		GdkPixbuf* _tmp38_ = NULL;
		guint8* _tmp39_ = NULL;
		gsize _tmp40_;
		FILE* _tmp41_ = NULL;
		guint8* _tmp42_ = NULL;
		gint _tmp42__length1 = 0;
		GstElement* _tmp43_ = NULL;
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp12_ = descr;
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp13_ = gst_parse_launch_full (_tmp12_, NULL, GST_PARSE_FLAG_NONE, &_inner_error_);
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_object_ref_sink (_tmp13_);
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp11_ = _tmp13_;
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 202 "shotwell-video-thumbnailer.c"
			goto __catch0_g_error;
		}
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp14_ = _tmp11_;
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp11_ = NULL;
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_object_ref_sink (_tmp14_);
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pipeline);
#line 35 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pipeline = _tmp14_;
#line 38 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp15_ = pipeline;
#line 38 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp16_ = gst_bin_get_by_name (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, gst_bin_get_type (), GstBin), "sink");
#line 38 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (sink);
#line 38 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		sink = _tmp16_;
#line 41 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp17_ = pipeline;
#line 41 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp18_ = gst_element_set_state (_tmp17_, GST_STATE_PAUSED);
#line 41 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		ret = _tmp18_;
#line 42 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp19_ = ret;
#line 42 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (_tmp19_ == GST_STATE_CHANGE_FAILURE) {
#line 233 "shotwell-video-thumbnailer.c"
			FILE* _tmp20_ = NULL;
#line 43 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_tmp20_ = stderr;
#line 43 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			fprintf (_tmp20_, "Failed to play the file: couldn't set state\n");
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			result = 3;
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (_tmp11_);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			pngdata = (g_free (pngdata), NULL);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pixbuf);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_free0 (descr);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (sink);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pipeline);
#line 44 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return result;
#line 255 "shotwell-video-thumbnailer.c"
		} else {
			GstStateChangeReturn _tmp21_ = 0;
#line 45 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_tmp21_ = ret;
#line 45 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			if (_tmp21_ == GST_STATE_CHANGE_NO_PREROLL) {
#line 262 "shotwell-video-thumbnailer.c"
				FILE* _tmp22_ = NULL;
#line 46 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_tmp22_ = stderr;
#line 46 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				fprintf (_tmp22_, "Live sources not supported yet.\n");
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				result = 4;
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_g_object_unref0 (_tmp11_);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				pngdata = (g_free (pngdata), NULL);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_g_object_unref0 (pixbuf);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_g_free0 (descr);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_g_object_unref0 (sink);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				_g_object_unref0 (pipeline);
#line 47 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
				return result;
#line 284 "shotwell-video-thumbnailer.c"
			}
		}
#line 53 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp23_ = pipeline;
#line 53 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp24_ = gst_element_get_state (_tmp23_, NULL, NULL, (GstClockTime) (5 * GST_SECOND));
#line 53 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		ret = _tmp24_;
#line 54 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp25_ = ret;
#line 54 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (_tmp25_ == GST_STATE_CHANGE_FAILURE) {
#line 297 "shotwell-video-thumbnailer.c"
			FILE* _tmp26_ = NULL;
#line 55 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_tmp26_ = stderr;
#line 55 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			fprintf (_tmp26_, "Failed to play the file: couldn't get state.\n");
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			result = 3;
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (_tmp11_);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			pngdata = (g_free (pngdata), NULL);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pixbuf);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_free0 (descr);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (sink);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pipeline);
#line 56 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return result;
#line 319 "shotwell-video-thumbnailer.c"
		}
#line 60 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp27_ = pipeline;
#line 60 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp29_ = gst_element_query_duration (_tmp27_, GST_FORMAT_TIME, &_tmp28_);
#line 60 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		duration = _tmp28_;
#line 60 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (!_tmp29_) {
#line 329 "shotwell-video-thumbnailer.c"
			FILE* _tmp30_ = NULL;
#line 61 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_tmp30_ = stderr;
#line 61 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			fprintf (_tmp30_, "Failed to query file for duration\n");
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			result = 3;
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (_tmp11_);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			pngdata = (g_free (pngdata), NULL);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pixbuf);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_free0 (descr);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (sink);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pipeline);
#line 62 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return result;
#line 351 "shotwell-video-thumbnailer.c"
		}
#line 65 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		position = (gint64) (1 * GST_SECOND);
#line 71 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp31_ = pipeline;
#line 71 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp32_ = position;
#line 71 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		gst_element_seek_simple (_tmp31_, GST_FORMAT_TIME, GST_SEEK_FLAG_KEY_UNIT | GST_SEEK_FLAG_FLUSH, _tmp32_);
#line 73 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp33_ = pipeline;
#line 73 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp34_ = gst_element_get_state (_tmp33_, NULL, NULL, (GstClockTime) (5 * GST_SECOND));
#line 73 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		ret = _tmp34_;
#line 74 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp35_ = ret;
#line 74 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (_tmp35_ == GST_STATE_CHANGE_FAILURE) {
#line 371 "shotwell-video-thumbnailer.c"
			FILE* _tmp36_ = NULL;
#line 75 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_tmp36_ = stderr;
#line 75 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			fprintf (_tmp36_, "Failed to play the file: couldn't get state.\n");
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			result = 3;
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (_tmp11_);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			pngdata = (g_free (pngdata), NULL);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pixbuf);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_free0 (descr);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (sink);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (pipeline);
#line 76 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return result;
#line 393 "shotwell-video-thumbnailer.c"
		}
#line 79 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp37_ = sink;
#line 79 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_object_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, G_TYPE_OBJECT, GObject), "last-pixbuf", &pixbuf, NULL);
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp38_ = pixbuf;
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		gdk_pixbuf_save_to_buffer (_tmp38_, (gchar**) (&_tmp39_), &_tmp40_, "png", &_inner_error_, NULL);
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata = (g_free (pngdata), NULL);
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata = _tmp39_;
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata_length1 = _tmp40_;
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_pngdata_size_ = pngdata_length1;
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 82 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			_g_object_unref0 (_tmp11_);
#line 415 "shotwell-video-thumbnailer.c"
			goto __catch0_g_error;
		}
#line 83 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp41_ = stdout;
#line 83 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp42_ = pngdata;
#line 83 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp42__length1 = pngdata_length1;
#line 83 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		fwrite (_tmp42_, (gsize) 1, _tmp42__length1, _tmp41_);
#line 86 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp43_ = pipeline;
#line 86 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		gst_element_set_state (_tmp43_, GST_STATE_NULL);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (_tmp11_);
#line 432 "shotwell-video-thumbnailer.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		FILE* _tmp44_ = NULL;
		GError* _tmp45_ = NULL;
		const gchar* _tmp46_ = NULL;
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		e = _inner_error_;
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_inner_error_ = NULL;
#line 89 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp44_ = stderr;
#line 89 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp45_ = e;
#line 89 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_tmp46_ = _tmp45_->message;
#line 89 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		fprintf (_tmp44_, "%s", _tmp46_);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		result = 2;
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_error_free0 (e);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata = (g_free (pngdata), NULL);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pixbuf);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_free0 (descr);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (sink);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pipeline);
#line 90 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		return result;
#line 469 "shotwell-video-thumbnailer.c"
	}
	__finally0:
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		pngdata = (g_free (pngdata), NULL);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pixbuf);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_free0 (descr);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (sink);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		_g_object_unref0 (pipeline);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_clear_error (&_inner_error_);
#line 33 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		return 0;
#line 490 "shotwell-video-thumbnailer.c"
	}
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	result = 0;
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	pngdata = (g_free (pngdata), NULL);
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_object_unref0 (pixbuf);
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_free0 (descr);
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_object_unref0 (sink);
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	_g_object_unref0 (pipeline);
#line 93 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return result;
#line 506 "shotwell-video-thumbnailer.c"
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,32,0)
	g_thread_init (NULL);
#endif
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
#line 15 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return shotwell_thumbnailer_main (argv, argc);
#line 519 "shotwell-video-thumbnailer.c"
}


ShotwellThumbnailer* shotwell_thumbnailer_construct (GType object_type) {
	ShotwellThumbnailer* self = NULL;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	self = (ShotwellThumbnailer*) g_type_create_instance (object_type);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return self;
#line 529 "shotwell-video-thumbnailer.c"
}


ShotwellThumbnailer* shotwell_thumbnailer_new (void) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return shotwell_thumbnailer_construct (TYPE_SHOTWELL_THUMBNAILER);
#line 536 "shotwell-video-thumbnailer.c"
}


static void value_shotwell_thumbnailer_init (GValue* value) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	value->data[0].v_pointer = NULL;
#line 543 "shotwell-video-thumbnailer.c"
}


static void value_shotwell_thumbnailer_free_value (GValue* value) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (value->data[0].v_pointer) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		shotwell_thumbnailer_unref (value->data[0].v_pointer);
#line 552 "shotwell-video-thumbnailer.c"
	}
}


static void value_shotwell_thumbnailer_copy_value (const GValue* src_value, GValue* dest_value) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (src_value->data[0].v_pointer) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		dest_value->data[0].v_pointer = shotwell_thumbnailer_ref (src_value->data[0].v_pointer);
#line 562 "shotwell-video-thumbnailer.c"
	} else {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		dest_value->data[0].v_pointer = NULL;
#line 566 "shotwell-video-thumbnailer.c"
	}
}


static gpointer value_shotwell_thumbnailer_peek_pointer (const GValue* value) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return value->data[0].v_pointer;
#line 574 "shotwell-video-thumbnailer.c"
}


static gchar* value_shotwell_thumbnailer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (collect_values[0].v_pointer) {
#line 581 "shotwell-video-thumbnailer.c"
		ShotwellThumbnailer* object;
		object = collect_values[0].v_pointer;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		if (object->parent_instance.g_class == NULL) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 588 "shotwell-video-thumbnailer.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 592 "shotwell-video-thumbnailer.c"
		}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = shotwell_thumbnailer_ref (object);
#line 596 "shotwell-video-thumbnailer.c"
	} else {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = NULL;
#line 600 "shotwell-video-thumbnailer.c"
	}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return NULL;
#line 604 "shotwell-video-thumbnailer.c"
}


static gchar* value_shotwell_thumbnailer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	ShotwellThumbnailer** object_p;
	object_p = collect_values[0].v_pointer;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (!object_p) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 615 "shotwell-video-thumbnailer.c"
	}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (!value->data[0].v_pointer) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		*object_p = NULL;
#line 621 "shotwell-video-thumbnailer.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		*object_p = value->data[0].v_pointer;
#line 625 "shotwell-video-thumbnailer.c"
	} else {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		*object_p = shotwell_thumbnailer_ref (value->data[0].v_pointer);
#line 629 "shotwell-video-thumbnailer.c"
	}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return NULL;
#line 633 "shotwell-video-thumbnailer.c"
}


GParamSpec* param_spec_shotwell_thumbnailer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecShotwellThumbnailer* spec;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_SHOTWELL_THUMBNAILER), NULL);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return G_PARAM_SPEC (spec);
#line 647 "shotwell-video-thumbnailer.c"
}


gpointer value_get_shotwell_thumbnailer (const GValue* value) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SHOTWELL_THUMBNAILER), NULL);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return value->data[0].v_pointer;
#line 656 "shotwell-video-thumbnailer.c"
}


void value_set_shotwell_thumbnailer (GValue* value, gpointer v_object) {
	ShotwellThumbnailer* old;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SHOTWELL_THUMBNAILER));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	old = value->data[0].v_pointer;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (v_object) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SHOTWELL_THUMBNAILER));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = v_object;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		shotwell_thumbnailer_ref (value->data[0].v_pointer);
#line 676 "shotwell-video-thumbnailer.c"
	} else {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = NULL;
#line 680 "shotwell-video-thumbnailer.c"
	}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (old) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		shotwell_thumbnailer_unref (old);
#line 686 "shotwell-video-thumbnailer.c"
	}
}


void value_take_shotwell_thumbnailer (GValue* value, gpointer v_object) {
	ShotwellThumbnailer* old;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_SHOTWELL_THUMBNAILER));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	old = value->data[0].v_pointer;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (v_object) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_SHOTWELL_THUMBNAILER));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = v_object;
#line 705 "shotwell-video-thumbnailer.c"
	} else {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		value->data[0].v_pointer = NULL;
#line 709 "shotwell-video-thumbnailer.c"
	}
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (old) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		shotwell_thumbnailer_unref (old);
#line 715 "shotwell-video-thumbnailer.c"
	}
}


static void shotwell_thumbnailer_class_init (ShotwellThumbnailerClass * klass) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	shotwell_thumbnailer_parent_class = g_type_class_peek_parent (klass);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	((ShotwellThumbnailerClass *) klass)->finalize = shotwell_thumbnailer_finalize;
#line 725 "shotwell-video-thumbnailer.c"
}


static void shotwell_thumbnailer_instance_init (ShotwellThumbnailer * self) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	self->ref_count = 1;
#line 732 "shotwell-video-thumbnailer.c"
}


static void shotwell_thumbnailer_finalize (ShotwellThumbnailer* obj) {
	ShotwellThumbnailer * self;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_SHOTWELL_THUMBNAILER, ShotwellThumbnailer);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_signal_handlers_destroy (self);
#line 742 "shotwell-video-thumbnailer.c"
}


GType shotwell_thumbnailer_get_type (void) {
	static volatile gsize shotwell_thumbnailer_type_id__volatile = 0;
	if (g_once_init_enter (&shotwell_thumbnailer_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_shotwell_thumbnailer_init, value_shotwell_thumbnailer_free_value, value_shotwell_thumbnailer_copy_value, value_shotwell_thumbnailer_peek_pointer, "p", value_shotwell_thumbnailer_collect_value, "p", value_shotwell_thumbnailer_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (ShotwellThumbnailerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) shotwell_thumbnailer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ShotwellThumbnailer), 0, (GInstanceInitFunc) shotwell_thumbnailer_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType shotwell_thumbnailer_type_id;
		shotwell_thumbnailer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "ShotwellThumbnailer", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&shotwell_thumbnailer_type_id__volatile, shotwell_thumbnailer_type_id);
	}
	return shotwell_thumbnailer_type_id__volatile;
}


gpointer shotwell_thumbnailer_ref (gpointer instance) {
	ShotwellThumbnailer* self;
	self = instance;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	g_atomic_int_inc (&self->ref_count);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	return instance;
#line 767 "shotwell-video-thumbnailer.c"
}


void shotwell_thumbnailer_unref (gpointer instance) {
	ShotwellThumbnailer* self;
	self = instance;
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		SHOTWELL_THUMBNAILER_GET_CLASS (self)->finalize (self);
#line 12 "/home/jens/Source/shotwell/thumbnailer/shotwell-video-thumbnailer.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 780 "shotwell-video-thumbnailer.c"
	}
}