summaryrefslogtreecommitdiff
path: root/src/VideoSupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/VideoSupport.c')
-rw-r--r--src/VideoSupport.c10961
1 files changed, 10961 insertions, 0 deletions
diff --git a/src/VideoSupport.c b/src/VideoSupport.c
new file mode 100644
index 0000000..989976f
--- /dev/null
+++ b/src/VideoSupport.c
@@ -0,0 +1,10961 @@
+/* VideoSupport.c generated by valac 0.32.1, the Vala compiler
+ * generated from VideoSupport.vala, do not modify */
+
+/* Copyright 2016 Software Freedom Conservancy Inc.
+ *
+ * This software is licensed under the GNU LGPL (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 <time.h>
+#include <float.h>
+#include <math.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gst/pbutils/pbutils.h>
+#include <gst/gst.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <gio/gunixinputstream.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <glib/gstdio.h>
+#include <gee.h>
+#include <gtk/gtk.h>
+#include <glib/gi18n-lib.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_VIDEO_IMPORT_PARAMS (video_import_params_get_type ())
+#define VIDEO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParams))
+#define VIDEO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParamsClass))
+#define IS_VIDEO_IMPORT_PARAMS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_IMPORT_PARAMS))
+#define IS_VIDEO_IMPORT_PARAMS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_IMPORT_PARAMS))
+#define VIDEO_IMPORT_PARAMS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_IMPORT_PARAMS, VideoImportParamsClass))
+
+typedef struct _VideoImportParams VideoImportParams;
+typedef struct _VideoImportParamsClass VideoImportParamsClass;
+typedef struct _VideoImportParamsPrivate VideoImportParamsPrivate;
+
+#define TYPE_IMPORT_ID (import_id_get_type ())
+typedef struct _ImportID ImportID;
+
+#define TYPE_THUMBNAILS (thumbnails_get_type ())
+#define THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAILS, Thumbnails))
+#define THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAILS, ThumbnailsClass))
+#define IS_THUMBNAILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAILS))
+#define IS_THUMBNAILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAILS))
+#define THUMBNAILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAILS, ThumbnailsClass))
+
+typedef struct _Thumbnails Thumbnails;
+typedef struct _ThumbnailsClass ThumbnailsClass;
+
+#define TYPE_VIDEO_ROW (video_row_get_type ())
+#define VIDEO_ROW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_ROW, VideoRow))
+#define VIDEO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_ROW, VideoRowClass))
+#define IS_VIDEO_ROW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_ROW))
+#define IS_VIDEO_ROW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_ROW))
+#define VIDEO_ROW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_ROW, VideoRowClass))
+
+typedef struct _VideoRow VideoRow;
+typedef struct _VideoRowClass VideoRowClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _thumbnails_unref0(var) ((var == NULL) ? NULL : (var = (thumbnails_unref (var), NULL)))
+#define _video_row_unref0(var) ((var == NULL) ? NULL : (var = (video_row_unref (var), NULL)))
+typedef struct _ParamSpecVideoImportParams ParamSpecVideoImportParams;
+
+#define TYPE_VIDEO_READER (video_reader_get_type ())
+#define VIDEO_READER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_READER, VideoReader))
+#define VIDEO_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_READER, VideoReaderClass))
+#define IS_VIDEO_READER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_READER))
+#define IS_VIDEO_READER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_READER))
+#define VIDEO_READER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_READER, VideoReaderClass))
+
+typedef struct _VideoReader VideoReader;
+typedef struct _VideoReaderClass VideoReaderClass;
+typedef struct _VideoReaderPrivate VideoReaderPrivate;
+#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
+
+#define TYPE_IMPORT_RESULT (import_result_get_type ())
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+#define _video_reader_unref0(var) ((var == NULL) ? NULL : (var = (video_reader_unref (var), NULL)))
+
+#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
+#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
+#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
+#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
+#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
+#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))
+
+typedef struct _MediaMetadata MediaMetadata;
+typedef struct _MediaMetadataClass MediaMetadataClass;
+
+#define TYPE_VIDEO_METADATA (video_metadata_get_type ())
+#define VIDEO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_METADATA, VideoMetadata))
+#define VIDEO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_METADATA, VideoMetadataClass))
+#define IS_VIDEO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_METADATA))
+#define IS_VIDEO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_METADATA))
+#define VIDEO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_METADATA, VideoMetadataClass))
+
+typedef struct _VideoMetadata VideoMetadata;
+typedef struct _VideoMetadataClass VideoMetadataClass;
+
+#define TYPE_METADATA_DATE_TIME (metadata_date_time_get_type ())
+#define METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTime))
+#define METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))
+#define IS_METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_METADATA_DATE_TIME))
+#define IS_METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_METADATA_DATE_TIME))
+#define METADATA_DATE_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))
+
+typedef struct _MetadataDateTime MetadataDateTime;
+typedef struct _MetadataDateTimeClass MetadataDateTimeClass;
+#define _metadata_date_time_unref0(var) ((var == NULL) ? NULL : (var = (metadata_date_time_unref (var), NULL)))
+#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
+typedef struct _VideoRowPrivate VideoRowPrivate;
+
+#define TYPE_VIDEO_ID (video_id_get_type ())
+typedef struct _VideoID VideoID;
+
+#define TYPE_EVENT_ID (event_id_get_type ())
+typedef struct _EventID EventID;
+
+#define TYPE_RATING (rating_get_type ())
+typedef struct _ParamSpecVideoReader ParamSpecVideoReader;
+
+#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;
+typedef struct _DataObjectPrivate DataObjectPrivate;
+
+#define TYPE_ALTERATION (alteration_get_type ())
+#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
+#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
+#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
+#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
+#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))
+
+typedef struct _Alteration Alteration;
+typedef struct _AlterationClass AlterationClass;
+
+#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_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;
+typedef struct _DataSourcePrivate DataSourcePrivate;
+
+#define TYPE_SOURCE_HOLDING_TANK (source_holding_tank_get_type ())
+#define SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank))
+#define SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass))
+#define IS_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_HOLDING_TANK))
+#define IS_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_HOLDING_TANK))
+#define SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_HOLDING_TANK, SourceHoldingTankClass))
+
+typedef struct _SourceHoldingTank SourceHoldingTank;
+typedef struct _SourceHoldingTankClass SourceHoldingTankClass;
+
+#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_SOURCE_SNAPSHOT (source_snapshot_get_type ())
+#define SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshot))
+#define SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass))
+#define IS_SOURCE_SNAPSHOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_SNAPSHOT))
+#define IS_SOURCE_SNAPSHOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_SNAPSHOT))
+#define SOURCE_SNAPSHOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_SNAPSHOT, SourceSnapshotClass))
+
+typedef struct _SourceSnapshot SourceSnapshot;
+typedef struct _SourceSnapshotClass SourceSnapshotClass;
+
+#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;
+typedef struct _ThumbnailSourcePrivate ThumbnailSourcePrivate;
+
+#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
+
+#define TYPE_INDEXABLE (indexable_get_type ())
+#define INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_INDEXABLE, Indexable))
+#define IS_INDEXABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_INDEXABLE))
+#define INDEXABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_INDEXABLE, IndexableIface))
+
+typedef struct _Indexable Indexable;
+typedef struct _IndexableIface IndexableIface;
+
+#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;
+typedef struct _MediaSourcePrivate MediaSourcePrivate;
+
+#define TYPE_BACKING_FILE_STATE (backing_file_state_get_type ())
+#define BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BACKING_FILE_STATE, BackingFileState))
+#define BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BACKING_FILE_STATE, BackingFileStateClass))
+#define IS_BACKING_FILE_STATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BACKING_FILE_STATE))
+#define IS_BACKING_FILE_STATE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BACKING_FILE_STATE))
+#define BACKING_FILE_STATE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BACKING_FILE_STATE, BackingFileStateClass))
+
+typedef struct _BackingFileState BackingFileState;
+typedef struct _BackingFileStateClass BackingFileStateClass;
+
+#define PHOTO_TYPE_EXCEPTION (photo_exception_get_type ())
+
+#define TYPE_DIMENSIONS (dimensions_get_type ())
+typedef struct _Dimensions Dimensions;
+
+#define TYPE_SCALING (scaling_get_type ())
+
+#define TYPE_SCALE_CONSTRAINT (scale_constraint_get_type ())
+typedef struct _Scaling Scaling;
+
+#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;
+typedef struct _VideoSourcePrivate VideoSourcePrivate;
+
+#define TYPE_FLAGGABLE (flaggable_get_type ())
+#define FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAGGABLE, Flaggable))
+#define IS_FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAGGABLE))
+#define FLAGGABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FLAGGABLE, FlaggableIface))
+
+typedef struct _Flaggable Flaggable;
+typedef struct _FlaggableIface FlaggableIface;
+
+#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_DATEABLE (dateable_get_type ())
+#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable))
+#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE))
+#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface))
+
+typedef struct _Dateable Dateable;
+typedef struct _DateableIface DateableIface;
+
+#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;
+typedef struct _VideoPrivate VideoPrivate;
+
+#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 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 TYPE_CONFIGURATION_FACADE (configuration_facade_get_type ())
+#define CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacade))
+#define CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
+#define IS_CONFIGURATION_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONFIGURATION_FACADE))
+#define IS_CONFIGURATION_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONFIGURATION_FACADE))
+#define CONFIGURATION_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONFIGURATION_FACADE, ConfigurationFacadeClass))
+
+typedef struct _ConfigurationFacade ConfigurationFacade;
+typedef struct _ConfigurationFacadeClass ConfigurationFacadeClass;
+
+#define CONFIG_TYPE_FACADE (config_facade_get_type ())
+#define CONFIG_FACADE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CONFIG_TYPE_FACADE, ConfigFacade))
+#define CONFIG_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CONFIG_TYPE_FACADE, ConfigFacadeClass))
+#define CONFIG_IS_FACADE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CONFIG_TYPE_FACADE))
+#define CONFIG_IS_FACADE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CONFIG_TYPE_FACADE))
+#define CONFIG_FACADE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CONFIG_TYPE_FACADE, ConfigFacadeClass))
+
+typedef struct _ConfigFacade ConfigFacade;
+typedef struct _ConfigFacadeClass ConfigFacadeClass;
+#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
+
+#define TYPE_DATABASE_TABLE (database_table_get_type ())
+#define DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_TABLE, DatabaseTable))
+#define DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_TABLE, DatabaseTableClass))
+#define IS_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_TABLE))
+#define IS_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_TABLE))
+#define DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_TABLE, DatabaseTableClass))
+
+typedef struct _DatabaseTable DatabaseTable;
+typedef struct _DatabaseTableClass DatabaseTableClass;
+
+#define TYPE_VIDEO_TABLE (video_table_get_type ())
+#define VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIDEO_TABLE, VideoTable))
+#define VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIDEO_TABLE, VideoTableClass))
+#define IS_VIDEO_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIDEO_TABLE))
+#define IS_VIDEO_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIDEO_TABLE))
+#define VIDEO_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIDEO_TABLE, VideoTableClass))
+
+typedef struct _VideoTable VideoTable;
+typedef struct _VideoTableClass VideoTableClass;
+#define _database_table_unref0(var) ((var == NULL) ? NULL : (var = (database_table_unref (var), NULL)))
+
+#define TYPE_EXPORTER (exporter_get_type ())
+#define EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER, Exporter))
+#define EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER, ExporterClass))
+#define IS_EXPORTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER))
+#define IS_EXPORTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER))
+#define EXPORTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER, ExporterClass))
+
+typedef struct _Exporter Exporter;
+typedef struct _ExporterClass ExporterClass;
+
+#define TYPE_EXPORTER_UI (exporter_ui_get_type ())
+#define EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_EXPORTER_UI, ExporterUI))
+#define EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_EXPORTER_UI, ExporterUIClass))
+#define IS_EXPORTER_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_EXPORTER_UI))
+#define IS_EXPORTER_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_EXPORTER_UI))
+#define EXPORTER_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_EXPORTER_UI, ExporterUIClass))
+
+typedef struct _ExporterUI ExporterUI;
+typedef struct _ExporterUIClass ExporterUIClass;
+
+#define TYPE_EXPORT_FORMAT_PARAMETERS (export_format_parameters_get_type ())
+
+#define TYPE_EXPORT_FORMAT_MODE (export_format_mode_get_type ())
+
+#define JPEG_TYPE_QUALITY (jpeg_quality_get_type ())
+typedef struct _ExportFormatParameters ExportFormatParameters;
+#define _exporter_ui_unref0(var) ((var == NULL) ? NULL : (var = (exporter_ui_unref (var), NULL)))
+
+#define TYPE_PAGE_WINDOW (page_window_get_type ())
+#define PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PAGE_WINDOW, PageWindow))
+#define PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PAGE_WINDOW, PageWindowClass))
+#define IS_PAGE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PAGE_WINDOW))
+#define IS_PAGE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PAGE_WINDOW))
+#define PAGE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PAGE_WINDOW, PageWindowClass))
+
+typedef struct _PageWindow PageWindow;
+typedef struct _PageWindowClass PageWindowClass;
+
+#define TYPE_APP_WINDOW (app_window_get_type ())
+#define APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_APP_WINDOW, AppWindow))
+#define APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_APP_WINDOW, AppWindowClass))
+#define IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_APP_WINDOW))
+#define IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_APP_WINDOW))
+#define APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_APP_WINDOW, AppWindowClass))
+
+typedef struct _AppWindow AppWindow;
+typedef struct _AppWindowClass AppWindowClass;
+#define _backing_file_state_unref0(var) ((var == NULL) ? NULL : (var = (backing_file_state_unref (var), NULL)))
+
+#define THUMBNAIL_CACHE_TYPE_SIZE (thumbnail_cache_size_get_type ())
+#define _alteration_unref0(var) ((var == NULL) ? NULL : (var = (alteration_unref (var), NULL)))
+
+#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)))
+typedef struct _VideoInterpretableResultsPrivate VideoInterpretableResultsPrivate;
+typedef struct _VideoParamSpecInterpretableResults VideoParamSpecInterpretableResults;
+typedef struct _DataCollectionPrivate DataCollectionPrivate;
+
+#define TYPE_MARKER (marker_get_type ())
+#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker))
+#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER))
+#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface))
+
+typedef struct _Marker Marker;
+typedef struct _MarkerIface MarkerIface;
+typedef struct _SourceCollectionPrivate SourceCollectionPrivate;
+
+#define TYPE_SOURCE_BACKLINK (source_backlink_get_type ())
+#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink))
+#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))
+#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK))
+#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK))
+#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))
+
+typedef struct _SourceBacklink SourceBacklink;
+typedef struct _SourceBacklinkClass SourceBacklinkClass;
+typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate;
+typedef struct _MediaSourceCollectionPrivate MediaSourceCollectionPrivate;
+
+#define TYPE_DATABASE_SOURCE_HOLDING_TANK (database_source_holding_tank_get_type ())
+#define DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTank))
+#define DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass))
+#define IS_DATABASE_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK))
+#define IS_DATABASE_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_HOLDING_TANK))
+#define DATABASE_SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_HOLDING_TANK, DatabaseSourceHoldingTankClass))
+
+typedef struct _DatabaseSourceHoldingTank DatabaseSourceHoldingTank;
+typedef struct _DatabaseSourceHoldingTankClass DatabaseSourceHoldingTankClass;
+
+#define TYPE_MEDIA_SOURCE_HOLDING_TANK (media_source_holding_tank_get_type ())
+#define MEDIA_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTank))
+#define MEDIA_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTankClass))
+#define IS_MEDIA_SOURCE_HOLDING_TANK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK))
+#define IS_MEDIA_SOURCE_HOLDING_TANK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_HOLDING_TANK))
+#define MEDIA_SOURCE_HOLDING_TANK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_HOLDING_TANK, MediaSourceHoldingTankClass))
+
+typedef struct _MediaSourceHoldingTank MediaSourceHoldingTank;
+typedef struct _MediaSourceHoldingTankClass MediaSourceHoldingTankClass;
+
+#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 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;
+
+#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;
+typedef struct _VideoSourceCollectionPrivate VideoSourceCollectionPrivate;
+
+#define VIDEO_SOURCE_COLLECTION_TYPE_STATE (video_source_collection_state_get_type ())
+#define _transaction_controller_unref0(var) ((var == NULL) ? NULL : (var = (transaction_controller_unref (var), NULL)))
+#define _source_holding_tank_unref0(var) ((var == NULL) ? NULL : (var = (source_holding_tank_unref (var), NULL)))
+
+#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;
+
+#define TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER (media_source_transaction_controller_get_type ())
+#define MEDIA_SOURCE_TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER, MediaSourceTransactionController))
+#define MEDIA_SOURCE_TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER, MediaSourceTransactionControllerClass))
+#define IS_MEDIA_SOURCE_TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER))
+#define IS_MEDIA_SOURCE_TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER))
+#define MEDIA_SOURCE_TRANSACTION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_TRANSACTION_CONTROLLER, MediaSourceTransactionControllerClass))
+
+typedef struct _MediaSourceTransactionController MediaSourceTransactionController;
+typedef struct _MediaSourceTransactionControllerClass MediaSourceTransactionControllerClass;
+#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);
+
+typedef enum {
+ VIDEO_ERROR_FILE,
+ VIDEO_ERROR_CONTENTS
+} VideoError;
+#define VIDEO_ERROR video_error_quark ()
+struct _ImportID {
+ gint64 id;
+};
+
+struct _VideoImportParams {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ VideoImportParamsPrivate * priv;
+ GFile* file;
+ ImportID import_id;
+ gchar* md5;
+ time_t exposure_time_override;
+ Thumbnails* thumbnails;
+ VideoRow* row;
+};
+
+struct _VideoImportParamsClass {
+ GTypeClass parent_class;
+ void (*finalize) (VideoImportParams *self);
+};
+
+struct _ParamSpecVideoImportParams {
+ GParamSpec parent_instance;
+};
+
+struct _VideoReader {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ VideoReaderPrivate * priv;
+};
+
+struct _VideoReaderClass {
+ GTypeClass parent_class;
+ void (*finalize) (VideoReader *self);
+};
+
+struct _VideoReaderPrivate {
+ gdouble clip_duration;
+ GdkPixbuf* preview_frame;
+ GFile* file;
+ GPid thumbnailer_pid;
+ GDateTime* _timestamp;
+};
+
+typedef enum {
+ IMPORT_RESULT_SUCCESS,
+ IMPORT_RESULT_FILE_ERROR,
+ IMPORT_RESULT_DECODE_ERROR,
+ IMPORT_RESULT_DATABASE_ERROR,
+ IMPORT_RESULT_USER_ABORT,
+ IMPORT_RESULT_NOT_A_FILE,
+ IMPORT_RESULT_PHOTO_EXISTS,
+ IMPORT_RESULT_UNSUPPORTED_FORMAT,
+ IMPORT_RESULT_NOT_AN_IMAGE,
+ IMPORT_RESULT_DISK_FAILURE,
+ IMPORT_RESULT_DISK_FULL,
+ IMPORT_RESULT_CAMERA_ERROR,
+ IMPORT_RESULT_FILE_WRITE_ERROR,
+ IMPORT_RESULT_PIXBUF_CORRUPT_IMAGE
+} ImportResult;
+
+struct _VideoID {
+ gint64 id;
+};
+
+struct _EventID {
+ gint64 id;
+};
+
+typedef enum {
+ RATING_REJECTED = -1,
+ RATING_UNRATED = 0,
+ RATING_ONE = 1,
+ RATING_TWO = 2,
+ RATING_THREE = 3,
+ RATING_FOUR = 4,
+ RATING_FIVE = 5
+} Rating;
+
+struct _VideoRow {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ VideoRowPrivate * priv;
+ VideoID video_id;
+ gchar* filepath;
+ gint64 filesize;
+ time_t timestamp;
+ gint width;
+ gint height;
+ gdouble clip_duration;
+ gboolean is_interpretable;
+ time_t exposure_time;
+ ImportID import_id;
+ EventID event_id;
+ gchar* md5;
+ time_t time_created;
+ Rating rating;
+ gchar* title;
+ gchar* backlinks;
+ time_t time_reimported;
+ guint64 flags;
+ gchar* comment;
+};
+
+struct _VideoRowClass {
+ GTypeClass parent_class;
+ void (*finalize) (VideoRow *self);
+};
+
+struct _ParamSpecVideoReader {
+ GParamSpec parent_instance;
+};
+
+struct _DataObject {
+ GObject parent_instance;
+ DataObjectPrivate * priv;
+};
+
+struct _DataObjectClass {
+ GObjectClass parent_class;
+ void (*notify_altered) (DataObject* self, Alteration* alteration);
+ void (*notify_membership_changed) (DataObject* self, DataCollection* collection);
+ void (*notify_collection_property_set) (DataObject* self, const gchar* name, GValue* old, GValue* val);
+ void (*notify_collection_property_cleared) (DataObject* self, const gchar* name);
+ gchar* (*get_name) (DataObject* self);
+ gchar* (*to_string) (DataObject* self);
+};
+
+struct _DataSource {
+ DataObject parent_instance;
+ DataSourcePrivate * priv;
+};
+
+struct _DataSourceClass {
+ DataObjectClass parent_class;
+ void (*notify_held_in_tank) (DataSource* self, SourceHoldingTank* holding_tank);
+ void (*notify_unlinking) (DataSource* self, SourceCollection* collection);
+ void (*notify_unlinked) (DataSource* self);
+ void (*notify_relinking) (DataSource* self, SourceCollection* collection);
+ void (*notify_relinked) (DataSource* self);
+ gchar* (*get_typename) (DataSource* self);
+ gint64 (*get_instance_id) (DataSource* self);
+ gchar* (*get_source_id) (DataSource* self);
+ void (*commit_backlinks) (DataSource* self, SourceCollection* sources, const gchar* dehydrated);
+ SourceSnapshot* (*save_snapshot) (DataSource* self);
+ gboolean (*internal_delete_backing) (DataSource* self, GError** error);
+ gboolean (*equals) (DataSource* self, DataSource* source);
+ void (*destroy) (DataSource* self);
+ void (*unlinked) (DataSource* self, SourceCollection* sources);
+ void (*relinked) (DataSource* self, SourceCollection* sources);
+ void (*destroyed) (DataSource* self);
+};
+
+typedef enum {
+ PHOTO_FILE_FORMAT_JFIF,
+ PHOTO_FILE_FORMAT_RAW,
+ PHOTO_FILE_FORMAT_PNG,
+ PHOTO_FILE_FORMAT_TIFF,
+ PHOTO_FILE_FORMAT_BMP,
+ PHOTO_FILE_FORMAT_UNKNOWN
+} PhotoFileFormat;
+
+struct _ThumbnailSource {
+ DataSource parent_instance;
+ ThumbnailSourcePrivate * priv;
+};
+
+struct _ThumbnailSourceClass {
+ DataSourceClass parent_class;
+ void (*notify_thumbnail_altered) (ThumbnailSource* self);
+ GdkPixbuf* (*get_thumbnail) (ThumbnailSource* self, gint scale, GError** error);
+ GdkPixbuf* (*create_thumbnail) (ThumbnailSource* self, gint scale, GError** error);
+ gchar* (*get_representative_id) (ThumbnailSource* self);
+ PhotoFileFormat (*get_preferred_thumbnail_format) (ThumbnailSource* self);
+ void (*thumbnail_altered) (ThumbnailSource* self);
+};
+
+struct _IndexableIface {
+ GTypeInterface parent_iface;
+ const gchar* (*get_indexable_keywords) (Indexable* self);
+};
+
+typedef enum {
+ PHOTO_EXCEPTION_NONE = 0,
+ PHOTO_EXCEPTION_ORIENTATION = 1 << 0,
+ PHOTO_EXCEPTION_CROP = 1 << 1,
+ PHOTO_EXCEPTION_REDEYE = 1 << 2,
+ PHOTO_EXCEPTION_ADJUST = 1 << 3,
+ PHOTO_EXCEPTION_STRAIGHTEN = 1 << 4,
+ PHOTO_EXCEPTION_ALL = 0xFFFFFFFFLL
+} PhotoException;
+
+struct _Dimensions {
+ gint width;
+ gint height;
+};
+
+typedef enum {
+ SCALE_CONSTRAINT_ORIGINAL,
+ SCALE_CONSTRAINT_DIMENSIONS,
+ SCALE_CONSTRAINT_WIDTH,
+ SCALE_CONSTRAINT_HEIGHT,
+ SCALE_CONSTRAINT_FILL_VIEWPORT
+} ScaleConstraint;
+
+struct _Scaling {
+ ScaleConstraint constraint;
+ gint scale;
+ Dimensions viewport;
+ gboolean scale_up;
+};
+
+struct _MediaSource {
+ ThumbnailSource parent_instance;
+ MediaSourcePrivate * priv;
+};
+
+struct _MediaSourceClass {
+ ThumbnailSourceClass parent_class;
+ void (*notify_master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file);
+ gboolean (*set_event_id) (MediaSource* self, EventID* id);
+ gchar* (*get_basename) (MediaSource* self);
+ GFile* (*get_file) (MediaSource* self);
+ GFile* (*get_master_file) (MediaSource* self);
+ guint64 (*get_master_filesize) (MediaSource* self);
+ guint64 (*get_filesize) (MediaSource* self);
+ time_t (*get_timestamp) (MediaSource* self);
+ BackingFileState** (*get_backing_files_state) (MediaSource* self, int* result_length1);
+ gchar* (*get_title) (MediaSource* self);
+ gchar* (*get_comment) (MediaSource* self);
+ void (*set_title) (MediaSource* self, const gchar* title);
+ gboolean (*set_comment) (MediaSource* self, const gchar* comment);
+ Rating (*get_rating) (MediaSource* self);
+ void (*set_rating) (MediaSource* self, Rating rating);
+ void (*increase_rating) (MediaSource* self);
+ void (*decrease_rating) (MediaSource* self);
+ void (*get_dimensions) (MediaSource* self, PhotoException disallowed_steps, Dimensions* result);
+ GdkPixbuf* (*get_preview_pixbuf) (MediaSource* self, Scaling* scaling, GError** error);
+ gboolean (*is_trashed) (MediaSource* self);
+ void (*trash) (MediaSource* self);
+ void (*untrash) (MediaSource* self);
+ gboolean (*is_offline) (MediaSource* self);
+ void (*mark_offline) (MediaSource* self);
+ void (*mark_online) (MediaSource* self);
+ gchar* (*get_master_md5) (MediaSource* self);
+ void (*get_event_id) (MediaSource* self, EventID* result);
+ time_t (*get_exposure_time) (MediaSource* self);
+ void (*get_import_id) (MediaSource* self, ImportID* result);
+ void (*master_replaced) (MediaSource* self, GFile* old_file, GFile* new_file);
+};
+
+struct _VideoSource {
+ MediaSource parent_instance;
+ VideoSourcePrivate * priv;
+};
+
+struct _VideoSourceClass {
+ MediaSourceClass parent_class;
+};
+
+struct _FlaggableIface {
+ GTypeInterface parent_iface;
+ gboolean (*is_flagged) (Flaggable* self);
+ void (*mark_flagged) (Flaggable* self);
+ void (*mark_unflagged) (Flaggable* self);
+};
+
+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 _DateableIface {
+ GTypeInterface parent_iface;
+ void (*set_exposure_time) (Dateable* self, time_t target_time);
+ time_t (*get_exposure_time) (Dateable* self);
+};
+
+struct _Video {
+ VideoSource parent_instance;
+ VideoPrivate * priv;
+};
+
+struct _VideoClass {
+ VideoSourceClass parent_class;
+};
+
+struct _VideoPrivate {
+ VideoRow* backing_row;
+ GRecMutex __lock_backing_row;
+};
+
+typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
+typedef void (*ExporterCompletionCallback) (Exporter* exporter, gboolean is_cancelled, void* user_data);
+typedef enum {
+ EXPORT_FORMAT_MODE_UNMODIFIED,
+ EXPORT_FORMAT_MODE_CURRENT,
+ EXPORT_FORMAT_MODE_SPECIFIED,
+ EXPORT_FORMAT_MODE_LAST
+} ExportFormatMode;
+
+typedef enum {
+ JPEG_QUALITY_LOW = 50,
+ JPEG_QUALITY_MEDIUM = 75,
+ JPEG_QUALITY_HIGH = 90,
+ JPEG_QUALITY_MAXIMUM = 100
+} JpegQuality;
+
+struct _ExportFormatParameters {
+ ExportFormatMode mode;
+ PhotoFileFormat specified_format;
+ JpegQuality quality;
+ gboolean export_metadata;
+};
+
+typedef enum {
+ DATABASE_ERROR_ERROR,
+ DATABASE_ERROR_BACKING,
+ DATABASE_ERROR_MEMORY,
+ DATABASE_ERROR_ABORT,
+ DATABASE_ERROR_LIMITS,
+ DATABASE_ERROR_TYPESPEC
+} DatabaseError;
+#define DATABASE_ERROR database_error_quark ()
+typedef enum {
+ THUMBNAIL_CACHE_SIZE_LARGEST = 360,
+ THUMBNAIL_CACHE_SIZE_BIG = 360,
+ THUMBNAIL_CACHE_SIZE_MEDIUM = 128,
+ THUMBNAIL_CACHE_SIZE_SMALLEST = 128
+} ThumbnailCacheSize;
+
+struct _VideoInterpretableResults {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ VideoInterpretableResultsPrivate * priv;
+ Video* video;
+ gboolean update_interpretable;
+ gboolean is_interpretable;
+ GdkPixbuf* new_thumbnail;
+};
+
+struct _VideoInterpretableResultsClass {
+ GTypeClass parent_class;
+ void (*finalize) (VideoInterpretableResults *self);
+};
+
+struct _VideoParamSpecInterpretableResults {
+ GParamSpec parent_instance;
+};
+
+typedef gint64 (*Comparator) (void* a, void* b, void* user_data);
+typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data);
+struct _MarkerIface {
+ GTypeInterface parent_iface;
+ void (*mark) (Marker* self, DataObject* object);
+ void (*unmark) (Marker* self, DataObject* object);
+ gboolean (*toggle) (Marker* self, DataObject* object);
+ void (*mark_many) (Marker* self, GeeCollection* list);
+ void (*unmark_many) (Marker* self, GeeCollection* list);
+ void (*mark_all) (Marker* self);
+ gint (*get_count) (Marker* self);
+ GeeCollection* (*get_all) (Marker* self);
+};
+
+struct _DataCollection {
+ GTypeInstance parent_instance;
+ volatile int ref_count;
+ DataCollectionPrivate * priv;
+};
+
+struct _DataCollectionClass {
+ GTypeClass parent_class;
+ void (*finalize) (DataCollection *self);
+ gchar* (*to_string) (DataCollection* self);
+ void (*notify_items_added) (DataCollection* self, GeeIterable* added);
+ void (*notify_items_removed) (DataCollection* self, GeeIterable* removed);
+ void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
+ void (*notify_items_altered) (DataCollection* self, GeeMap* items);
+ void (*notify_ordering_changed) (DataCollection* self);
+ void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
+ void (*notify_property_cleared) (DataCollection* self, const gchar* name);
+ gboolean (*valid_type) (DataCollection* self, DataObject* object);
+ void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target);
+ void (*reset_comparator) (DataCollection* self);
+ GeeCollection* (*get_all) (DataCollection* self);
+ gint (*get_count) (DataCollection* self);
+ DataObject* (*get_at) (DataCollection* self, gint index);
+ gint (*index_of) (DataCollection* self, DataObject* object);
+ gboolean (*contains) (DataCollection* self, DataObject* object);
+ gboolean (*add) (DataCollection* self, DataObject* object);
+ GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target);
+ void (*remove_marked) (DataCollection* self, Marker* m);
+ void (*clear) (DataCollection* self);
+ void (*close) (DataCollection* self);
+ void (*notify_frozen) (DataCollection* self);
+ void (*notify_thawed) (DataCollection* self);
+ void (*items_added) (DataCollection* self, GeeIterable* added);
+ void (*items_removed) (DataCollection* self, GeeIterable* removed);
+ void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
+ void (*items_altered) (DataCollection* self, GeeMap* items);
+ void (*ordering_changed) (DataCollection* self);
+ void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
+ void (*property_cleared) (DataCollection* self, const gchar* name);
+ void (*frozen) (DataCollection* self);
+ void (*thawed) (DataCollection* self);
+};
+
+struct _SourceCollection {
+ DataCollection parent_instance;
+ SourceCollectionPrivate * priv;
+};
+
+struct _SourceCollectionClass {
+ DataCollectionClass parent_class;
+ gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source);
+ void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking);
+ void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked);
+ void (*notify_item_destroyed) (SourceCollection* self, DataSource* source);
+ void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed);
+ void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked);
+ void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources);
+ gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink);
+ void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink);
+ void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking);
+ void (*items_relinked) (SourceCollection* self, GeeCollection* relinked);
+ void (*item_destroyed) (SourceCollection* self, DataSource* source);
+ void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed);
+ void (*unlinked_destroyed) (SourceCollection* self, DataSource* source);
+ void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources);
+};
+
+struct _DatabaseSourceCollection {
+ SourceCollection parent_instance;
+ DatabaseSourceCollectionPrivate * priv;
+};
+
+struct _DatabaseSourceCollectionClass {
+ SourceCollectionClass parent_class;
+};
+
+struct _MediaSourceCollection {
+ DatabaseSourceCollection parent_instance;
+ MediaSourceCollectionPrivate * priv;
+};
+
+struct _MediaSourceCollectionClass {
+ DatabaseSourceCollectionClass parent_class;
+ MediaSourceHoldingTank* (*create_trashcan) (MediaSourceCollection* self);
+ MediaSourceHoldingTank* (*create_offline_bin) (MediaSourceCollection* self);
+ MediaMonitor* (*create_media_monitor) (MediaSourceCollection* self, Workers* workers, GCancellable* cancellable);
+ gchar* (*get_typename) (MediaSourceCollection* self);
+ gboolean (*is_file_recognized) (MediaSourceCollection* self, GFile* file);
+ MediaSource* (*fetch_by_numeric_id) (MediaSourceCollection* self, gint64 numeric_id);
+ void (*notify_import_roll_altered) (MediaSourceCollection* self);
+ void (*notify_flagged_contents_altered) (MediaSourceCollection* self);
+ void (*notify_media_import_starting) (MediaSourceCollection* self, GeeCollection* media);
+ void (*notify_media_import_completed) (MediaSourceCollection* self, GeeCollection* media);
+ MediaSource* (*fetch_by_source_id) (MediaSourceCollection* self, const gchar* source_id);
+ GeeCollection* (*get_event_source_ids) (MediaSourceCollection* self, EventID* event_id);
+ void (*import_many) (MediaSourceCollection* self, GeeCollection* media);
+ void (*postprocess_imported_media) (MediaSourceCollection* self, GeeCollection* media);
+ void (*media_import_starting) (MediaSourceCollection* self, GeeCollection* media);
+ void (*media_import_completed) (MediaSourceCollection* self, GeeCollection* media);
+ void (*master_file_replaced) (MediaSourceCollection* self, MediaSource* media, GFile* old_file, GFile* new_file);
+ void (*trashcan_contents_altered) (MediaSourceCollection* self, GeeCollection* added, GeeCollection* removed);
+ void (*import_roll_altered) (MediaSourceCollection* self);
+ void (*offline_contents_altered) (MediaSourceCollection* self, GeeCollection* added, GeeCollection* removed);
+ void (*flagged_contents_altered) (MediaSourceCollection* self);
+ TransactionController* (*get_transaction_controller) (MediaSourceCollection* self);
+};
+
+struct _VideoSourceCollection {
+ MediaSourceCollection parent_instance;
+ VideoSourceCollectionPrivate * priv;
+};
+
+struct _VideoSourceCollectionClass {
+ MediaSourceCollectionClass parent_class;
+};
+
+struct _VideoSourceCollectionPrivate {
+ TransactionController* _transaction_controller;
+ GeeMultiMap* filesize_to_video;
+};
+
+typedef enum {
+ VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN,
+ VIDEO_SOURCE_COLLECTION_STATE_ONLINE,
+ VIDEO_SOURCE_COLLECTION_STATE_OFFLINE,
+ VIDEO_SOURCE_COLLECTION_STATE_TRASH
+} VideoSourceCollectionState;
+
+typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data);
+typedef gboolean (*SourceHoldingTankCheckToKeep) (DataSource* source, Alteration* alteration, void* user_data);
+
+static gpointer video_import_params_parent_class = NULL;
+static gpointer video_reader_parent_class = NULL;
+static gpointer video_parent_class = NULL;
+static gboolean video_interpreter_state_changed;
+static gboolean video_interpreter_state_changed = FALSE;
+static gint video_current_state;
+static gint video_current_state = 0;
+static gboolean video_normal_regen_complete;
+static gboolean video_normal_regen_complete = FALSE;
+static gboolean video_offline_regen_complete;
+static gboolean video_offline_regen_complete = FALSE;
+extern VideoSourceCollection* video_global;
+VideoSourceCollection* video_global = NULL;
+static gpointer video_interpretable_results_parent_class = NULL;
+static FlaggableIface* video_flaggable_parent_iface = NULL;
+static MonitorableIface* video_monitorable_parent_iface = NULL;
+static DateableIface* video_dateable_parent_iface = NULL;
+static gpointer video_source_collection_parent_class = NULL;
+
+GQuark video_error_quark (void);
+gpointer video_import_params_ref (gpointer instance);
+void video_import_params_unref (gpointer instance);
+GParamSpec* param_spec_video_import_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_video_import_params (GValue* value, gpointer v_object);
+void value_take_video_import_params (GValue* value, gpointer v_object);
+gpointer value_get_video_import_params (const GValue* value);
+GType video_import_params_get_type (void) G_GNUC_CONST;
+GType import_id_get_type (void) G_GNUC_CONST;
+ImportID* import_id_dup (const ImportID* self);
+void import_id_free (ImportID* self);
+gpointer thumbnails_ref (gpointer instance);
+void thumbnails_unref (gpointer instance);
+GParamSpec* param_spec_thumbnails (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_thumbnails (GValue* value, gpointer v_object);
+void value_take_thumbnails (GValue* value, gpointer v_object);
+gpointer value_get_thumbnails (const GValue* value);
+GType thumbnails_get_type (void) G_GNUC_CONST;
+gpointer video_row_ref (gpointer instance);
+void video_row_unref (gpointer instance);
+GParamSpec* param_spec_video_row (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_video_row (GValue* value, gpointer v_object);
+void value_take_video_row (GValue* value, gpointer v_object);
+gpointer value_get_video_row (const GValue* value);
+GType video_row_get_type (void) G_GNUC_CONST;
+enum {
+ VIDEO_IMPORT_PARAMS_DUMMY_PROPERTY
+};
+#define IMPORT_ID_INVALID ((gint64) 0)
+void import_id_init (ImportID *self, gint64 id);
+VideoRow* video_row_new (void);
+VideoRow* video_row_construct (GType object_type);
+VideoImportParams* video_import_params_new (GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override);
+VideoImportParams* video_import_params_construct (GType object_type, GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override);
+static void video_import_params_finalize (VideoImportParams* obj);
+gpointer video_reader_ref (gpointer instance);
+void video_reader_unref (gpointer instance);
+GParamSpec* param_spec_video_reader (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_video_reader (GValue* value, gpointer v_object);
+void value_take_video_reader (GValue* value, gpointer v_object);
+gpointer value_get_video_reader (const GValue* value);
+GType video_reader_get_type (void) G_GNUC_CONST;
+#define VIDEO_READER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIDEO_READER, VideoReaderPrivate))
+enum {
+ VIDEO_READER_DUMMY_PROPERTY
+};
+#define VIDEO_READER_UNKNOWN_CLIP_DURATION (-1.0)
+#define VIDEO_READER_THUMBNAILER_TIMEOUT ((guint) 10000)
+VideoReader* video_reader_new (GFile* file);
+VideoReader* video_reader_construct (GType object_type, GFile* file);
+gboolean video_reader_is_supported_video_file (GFile* file);
+gboolean video_reader_is_supported_video_filename (const gchar* filename);
+void disassemble_filename (const gchar* basename, gchar** name, gchar** ext);
+gint utf8_ci_compare (void* a, void* b);
+GType import_result_get_type (void) G_GNUC_CONST;
+ImportResult video_reader_prepare_for_import (VideoImportParams* params);
+#define UTIL_FILE_ATTRIBUTES "standard::*,time::*,id::file,id::filesystem,etag::value"
+#define DIRECTORY_MONITOR_SUPPLIED_ATTRIBUTES UTIL_FILE_ATTRIBUTES
+GdkPixbuf* video_reader_read_preview_frame (VideoReader* self);
+gdouble video_reader_read_clip_duration (VideoReader* self, GError** error);
+gpointer media_metadata_ref (gpointer instance);
+void media_metadata_unref (gpointer instance);
+GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_media_metadata (GValue* value, gpointer v_object);
+void value_take_media_metadata (GValue* value, gpointer v_object);
+gpointer value_get_media_metadata (const GValue* value);
+GType media_metadata_get_type (void) G_GNUC_CONST;
+GType video_metadata_get_type (void) G_GNUC_CONST;
+VideoMetadata* video_reader_read_metadata (VideoReader* self, GError** error);
+gpointer metadata_date_time_ref (gpointer instance);
+void metadata_date_time_unref (gpointer instance);
+GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_metadata_date_time (GValue* value, gpointer v_object);
+void value_take_metadata_date_time (GValue* value, gpointer v_object);
+gpointer value_get_metadata_date_time (const GValue* value);
+GType metadata_date_time_get_type (void) G_GNUC_CONST;
+MetadataDateTime* media_metadata_get_creation_date_time (MediaMetadata* self);
+time_t metadata_date_time_get_timestamp (MetadataDateTime* self);
+gchar* media_metadata_get_title (MediaMetadata* self);
+gchar* media_metadata_get_comment (MediaMetadata* self);
+GDateTime* video_reader_get_timestamp (VideoReader* self);
+GType video_id_get_type (void) G_GNUC_CONST;
+VideoID* video_id_dup (const VideoID* self);
+void video_id_free (VideoID* self);
+GType event_id_get_type (void) G_GNUC_CONST;
+EventID* event_id_dup (const EventID* self);
+void event_id_free (EventID* self);
+GType rating_get_type (void) G_GNUC_CONST;
+#define VIDEO_ID_INVALID ((gint64) -1)
+void video_id_init (VideoID *self, gint64 id);
+#define EVENT_ID_INVALID ((gint64) -1)
+void event_id_init (EventID *self, gint64 id);
+Thumbnails* thumbnails_new (void);
+Thumbnails* thumbnails_construct (GType object_type);
+void thumbnail_cache_generate_for_video_frame (Thumbnails* thumbnails, GdkPixbuf* preview_frame);
+static void video_reader_read_internal (VideoReader* self, GError** error);
+static gboolean video_reader_does_file_exist (VideoReader* self);
+static GDate* _g_date_dup (GDate* self);
+static void video_reader_set_timestamp (VideoReader* self, GDateTime* value);
+static gboolean video_reader_on_thumbnailer_timer (VideoReader* self);
+static GdkPixbuf* video_reader_thumbnailer (VideoReader* self, const gchar* video_file);
+GFile* app_dirs_get_thumbnailer_bin (void);
+static gboolean _video_reader_on_thumbnailer_timer_gsource_func (gpointer self);
+GdkPixbuf* resources_get_noninterpretable_badge_pixbuf (void);
+VideoMetadata* video_metadata_new (void);
+VideoMetadata* video_metadata_construct (GType object_type);
+void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error);
+static void video_reader_finalize (VideoReader* obj);
+GType data_object_get_type (void) G_GNUC_CONST;
+gpointer alteration_ref (gpointer instance);
+void alteration_unref (gpointer instance);
+GParamSpec* param_spec_alteration (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_alteration (GValue* value, gpointer v_object);
+void value_take_alteration (GValue* value, gpointer v_object);
+gpointer value_get_alteration (const GValue* value);
+GType alteration_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 data_source_get_type (void) G_GNUC_CONST;
+gpointer source_holding_tank_ref (gpointer instance);
+void source_holding_tank_unref (gpointer instance);
+GParamSpec* param_spec_source_holding_tank (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_source_holding_tank (GValue* value, gpointer v_object);
+void value_take_source_holding_tank (GValue* value, gpointer v_object);
+gpointer value_get_source_holding_tank (const GValue* value);
+GType source_holding_tank_get_type (void) G_GNUC_CONST;
+GType source_collection_get_type (void) G_GNUC_CONST;
+gpointer source_snapshot_ref (gpointer instance);
+void source_snapshot_unref (gpointer instance);
+GParamSpec* param_spec_source_snapshot (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_source_snapshot (GValue* value, gpointer v_object);
+void value_take_source_snapshot (GValue* value, gpointer v_object);
+gpointer value_get_source_snapshot (const GValue* value);
+GType source_snapshot_get_type (void) G_GNUC_CONST;
+GType thumbnail_source_get_type (void) G_GNUC_CONST;
+GType photo_file_format_get_type (void) G_GNUC_CONST;
+GType indexable_get_type (void) G_GNUC_CONST;
+GType media_source_get_type (void) G_GNUC_CONST;
+gpointer backing_file_state_ref (gpointer instance);
+void backing_file_state_unref (gpointer instance);
+GParamSpec* param_spec_backing_file_state (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_backing_file_state (GValue* value, gpointer v_object);
+void value_take_backing_file_state (GValue* value, gpointer v_object);
+gpointer value_get_backing_file_state (const GValue* value);
+GType backing_file_state_get_type (void) G_GNUC_CONST;
+GType photo_exception_get_type (void) G_GNUC_CONST;
+GType dimensions_get_type (void) G_GNUC_CONST;
+Dimensions* dimensions_dup (const Dimensions* self);
+void dimensions_free (Dimensions* self);
+GType scaling_get_type (void) G_GNUC_CONST;
+GType scale_constraint_get_type (void) G_GNUC_CONST;
+Scaling* scaling_dup (const Scaling* self);
+void scaling_free (Scaling* self);
+GType video_source_get_type (void) G_GNUC_CONST;
+GType flaggable_get_type (void) G_GNUC_CONST;
+GType monitorable_get_type (void) G_GNUC_CONST;
+GType dateable_get_type (void) G_GNUC_CONST;
+GType video_get_type (void) G_GNUC_CONST;
+#define VIDEO_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIDEO, VideoPrivate))
+enum {
+ VIDEO_DUMMY_PROPERTY
+};
+GType database_source_collection_get_type (void) G_GNUC_CONST;
+GType media_source_collection_get_type (void) G_GNUC_CONST;
+GType video_source_collection_get_type (void) G_GNUC_CONST;
+#define VIDEO_TYPENAME "video"
+#define VIDEO_FLAG_TRASH ((guint64) 0x0000000000000001)
+#define VIDEO_FLAG_OFFLINE ((guint64) 0x0000000000000002)
+#define VIDEO_FLAG_FLAGGED ((guint64) 0x0000000000000004)
+Video* video_new (VideoRow* row);
+Video* video_construct (GType object_type, VideoRow* row);
+VideoSource* video_source_construct (GType object_type);
+gchar* media_source_prep_title (const gchar* title);
+void data_source_rehydrate_backlinks (DataSource* self, SourceCollection* unlinked_from, const gchar* dehydrated);
+void video_init (ProgressMonitor monitor, void* monitor_target);
+GType configuration_facade_get_type (void) G_GNUC_CONST;
+GType config_facade_get_type (void) G_GNUC_CONST;
+ConfigFacade* config_facade_get_instance (void);
+gint configuration_facade_get_video_interpreter_state_cookie (ConfigurationFacade* self);
+#define CONFIG_FACADE_NO_VIDEO_INTERPRETER_STATE -1
+VideoSourceCollection* video_source_collection_new (void);
+VideoSourceCollection* video_source_collection_construct (GType object_type);
+gpointer database_table_ref (gpointer instance);
+void database_table_unref (gpointer instance);
+GParamSpec* param_spec_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_database_table (GValue* value, gpointer v_object);
+void value_take_database_table (GValue* value, gpointer v_object);
+gpointer value_get_database_table (const GValue* value);
+GType database_table_get_type (void) G_GNUC_CONST;
+GType video_table_get_type (void) G_GNUC_CONST;
+VideoTable* video_table_get_instance (void);
+GeeArrayList* video_table_get_all (VideoTable* self);
+static void video_set_is_interpretable (Video* self, gboolean is_interpretable);
+gboolean media_source_is_trashed (MediaSource* self);
+gboolean media_source_is_offline (MediaSource* self);
+void media_source_collection_add_many_to_trash (MediaSourceCollection* self, GeeCollection* sources);
+void media_source_collection_add_many_to_offline (MediaSourceCollection* self, GeeCollection* sources);
+GeeCollection* data_collection_add_many (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target);
+gboolean video_has_interpreter_state_changed (void);
+void video_notify_normal_thumbs_regenerated (void);
+static void video_save_interpreter_state (void);
+void video_notify_offline_thumbs_regenerated (void);
+void configuration_facade_set_video_interpreter_state_cookie (ConfigurationFacade* self, gint state_cookie);
+void video_terminate (void);
+GType exporter_get_type (void) G_GNUC_CONST;
+gpointer exporter_ui_ref (gpointer instance);
+void exporter_ui_unref (gpointer instance);
+GParamSpec* param_spec_exporter_ui (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_exporter_ui (GValue* value, gpointer v_object);
+void value_take_exporter_ui (GValue* value, gpointer v_object);
+gpointer value_get_exporter_ui (const GValue* value);
+GType exporter_ui_get_type (void) G_GNUC_CONST;
+ExporterUI* video_export_many (GeeCollection* videos, ExporterCompletionCallback done, void* done_target, gboolean export_in_place);
+void scaling_for_original (Scaling* result);
+GType export_format_parameters_get_type (void) G_GNUC_CONST;
+GType export_format_mode_get_type (void) G_GNUC_CONST;
+GType jpeg_quality_get_type (void) G_GNUC_CONST;
+ExportFormatParameters* export_format_parameters_dup (const ExportFormatParameters* self);
+void export_format_parameters_free (ExportFormatParameters* self);
+void export_format_parameters_unmodified (ExportFormatParameters* result);
+Exporter* exporter_new_for_temp_file (GeeCollection* to_export, Scaling* scaling, ExportFormatParameters* export_params);
+Exporter* exporter_construct_for_temp_file (GType object_type, GeeCollection* to_export, Scaling* scaling, ExportFormatParameters* export_params);
+ExporterUI* exporter_ui_new (Exporter* exporter);
+ExporterUI* exporter_ui_construct (GType object_type, Exporter* exporter);
+void exporter_ui_export (ExporterUI* self, ExporterCompletionCallback completion_callback, void* completion_callback_target);
+GFile* export_ui_choose_file (const gchar* current_file_basename);
+gchar* media_source_get_basename (MediaSource* self);
+GType page_window_get_type (void) G_GNUC_CONST;
+GType app_window_get_type (void) G_GNUC_CONST;
+AppWindow* app_window_get_instance (void);
+void page_window_set_busy_cursor (PageWindow* self);
+void video_export (Video* self, GFile* dest_file, GError** error);
+void page_window_set_normal_cursor (PageWindow* self);
+GtkResponseType export_error_dialog (GFile* dest, gboolean photos_remaining);
+GFile* export_ui_choose_dir (const gchar* user_title);
+Exporter* exporter_new (GeeCollection* to_export, GFile* dir, Scaling* scaling, ExportFormatParameters* export_params, gboolean auto_replace_all);
+Exporter* exporter_construct (GType object_type, GeeCollection* to_export, GFile* dir, Scaling* scaling, ExportFormatParameters* export_params, gboolean auto_replace_all);
+static void video_real_commit_backlinks (DataSource* base, SourceCollection* sources, const gchar* backlinks);
+GQuark database_error_quark (void);
+void video_table_update_backlinks (VideoTable* self, VideoID* video_id, const gchar* backlinks, GError** error);
+void video_get_video_id (Video* self, VideoID* result);
+gchar* data_object_to_string (DataObject* self);
+static gboolean video_real_set_event_id (MediaSource* base, EventID* event_id);
+gboolean video_table_set_event (VideoTable* self, VideoID* video_id, EventID* event_id);
+gboolean video_is_duplicate (GFile* file, const gchar* full_md5);
+gboolean video_table_has_duplicate (VideoTable* self, GFile* file, const gchar* md5);
+ImportResult video_import_create (VideoImportParams* params, Video** video);
+void video_table_add (VideoTable* self, VideoRow* video_row, VideoID* result, GError** error);
+gboolean video_id_is_invalid (VideoID *self);
+void video_import_failed (Video* video);
+void video_table_remove (VideoTable* self, VideoID* videoID, GError** error);
+void app_window_database_error (GError* err);
+static BackingFileState** video_real_get_backing_files_state (MediaSource* base, int* result_length1);
+BackingFileState* backing_file_state_new (const gchar* filepath, gint64 filesize, time_t modification_time, const gchar* md5);
+BackingFileState* backing_file_state_construct (GType object_type, const gchar* filepath, gint64 filesize, time_t modification_time, const gchar* md5);
+static GdkPixbuf* video_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error);
+GdkPixbuf* thumbnail_cache_fetch (ThumbnailSource* source, gint scale, GError** error);
+static gchar* video_real_get_master_md5 (MediaSource* base);
+static GdkPixbuf* video_real_get_preview_pixbuf (MediaSource* base, Scaling* scaling, GError** error);
+GdkPixbuf* thumbnail_source_get_thumbnail (ThumbnailSource* self, gint scale, GError** error);
+GType thumbnail_cache_size_get_type (void) G_GNUC_CONST;
+GdkPixbuf* scaling_perform_on_pixbuf (Scaling *self, GdkPixbuf* pixbuf, GdkInterpType interp, gboolean scale_up);
+static GdkPixbuf* video_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error);
+GFile* media_source_get_file (MediaSource* self);
+static gchar* video_real_get_typename (DataSource* base);
+static gint64 video_real_get_instance_id (DataSource* base);
+static void video_real_get_import_id (MediaSource* base, ImportID* result);
+static PhotoFileFormat video_real_get_preferred_thumbnail_format (ThumbnailSource* base);
+PhotoFileFormat photo_file_format_get_system_default_format (void);
+static gchar* video_real_get_title (MediaSource* base);
+static void video_real_set_title (MediaSource* base, const gchar* title);
+void video_table_set_title (VideoTable* self, VideoID* video_id, const gchar* new_title, GError** error);
+void data_object_notify_altered (DataObject* self, Alteration* alteration);
+Alteration* alteration_new (const gchar* subject, const gchar* detail);
+Alteration* alteration_construct (GType object_type, const gchar* subject, const gchar* detail);
+static gchar* video_real_get_comment (MediaSource* base);
+static gboolean video_real_set_comment (MediaSource* base, const gchar* comment);
+void video_table_set_comment (VideoTable* self, VideoID* video_id, const gchar* new_comment, GError** error);
+static Rating video_real_get_rating (MediaSource* base);
+static void video_real_set_rating (MediaSource* base, Rating rating);
+gboolean rating_is_valid (Rating self);
+void video_table_set_rating (VideoTable* self, VideoID* video_id, Rating rating, GError** error);
+static void video_real_increase_rating (MediaSource* base);
+void media_source_set_rating (MediaSource* self, Rating rating);
+Rating rating_increase (Rating self);
+static void video_real_decrease_rating (MediaSource* base);
+Rating rating_decrease (Rating self);
+static gboolean video_real_is_trashed (MediaSource* base);
+gboolean video_is_flag_set (Video* self, guint64 flag);
+static gboolean video_real_is_offline (Monitorable* base);
+static void video_real_mark_offline (Monitorable* base);
+guint64 video_add_flags (Video* self, guint64 flags_to_add, Alteration* additional_alteration);
+static void video_real_mark_online (Monitorable* base);
+guint64 video_remove_flags (Video* self, guint64 flags_to_remove, Alteration* additional_alteration);
+gboolean video_get_is_interpretable (Video* self);
+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;
+VideoInterpretableResults* video_check_is_interpretable (Video* self);
+void video_interpretable_results_foreground_finish (VideoInterpretableResults* self);
+static void video_real_trash (MediaSource* base);
+static void video_real_untrash (MediaSource* base);
+static gboolean video_real_is_flagged (Flaggable* base);
+static void video_real_mark_flagged (Flaggable* base);
+static void video_real_mark_unflagged (Flaggable* base);
+static void video_real_get_event_id (MediaSource* base, EventID* result);
+static gchar* video_real_to_string (DataObject* base);
+static time_t video_real_get_exposure_time (Dateable* base);
+static void video_real_set_exposure_time (Dateable* base, time_t time);
+void video_table_set_exposure_time (VideoTable* self, VideoID* video_id, time_t time, GError** error);
+void video_get_frame_dimensions (Video* self, Dimensions* result);
+void dimensions_init (Dimensions *self, gint width, gint height);
+static void video_real_get_dimensions (MediaSource* base, PhotoException disallowed_steps, Dimensions* result);
+static guint64 video_real_get_filesize (MediaSource* base);
+guint64 media_source_get_master_filesize (MediaSource* self);
+static guint64 video_real_get_master_filesize (MediaSource* base);
+static time_t video_real_get_timestamp (MediaSource* base);
+static void video_real_set_master_timestamp (Monitorable* base, GFileInfo* info);
+void video_table_set_timestamp (VideoTable* self, VideoID* video_id, time_t timestamp, GError** error);
+gchar* video_get_filename (Video* self);
+static GFile* video_real_get_file (MediaSource* base);
+static GFile* video_real_get_master_file (MediaSource* base);
+gdouble video_get_clip_duration (Video* self);
+void video_table_update_is_interpretable (VideoTable* self, VideoID* video_id, gboolean is_interpretable, GError** error);
+VideoInterpretableResults* video_interpretable_results_new (Video* video);
+VideoInterpretableResults* video_interpretable_results_construct (GType object_type, Video* video);
+static void video_real_destroy (DataSource* base);
+void thumbnail_cache_remove (ThumbnailSource* source);
+void data_source_destroy (DataSource* self);
+static gboolean video_real_internal_delete_backing (DataSource* base, GError** error);
+gboolean media_source_delete_original_file (MediaSource* self);
+gboolean data_source_internal_delete_backing (DataSource* self, GError** error);
+static void video_notify_flags_altered (Video* self, Alteration* additional_alteration);
+Alteration* alteration_compress (Alteration* self, Alteration* other);
+guint64 media_source_internal_add_flags (guint64 flags, guint64 selector);
+void video_table_set_flags (VideoTable* self, VideoID* video_id, guint64 flags, GError** error);
+guint64 media_source_internal_remove_flags (guint64 flags, guint64 selector);
+gboolean media_source_internal_is_flag_set (guint64 flags, guint64 selector);
+static void video_real_set_master_file (Monitorable* base, GFile* file);
+void video_table_set_filepath (VideoTable* self, VideoID* video_id, const gchar* filepath, GError** error);
+void media_source_notify_master_replaced (MediaSource* self, GFile* old_file, GFile* new_file);
+Alteration* alteration_new_from_list (const gchar* list);
+Alteration* alteration_construct_from_list (GType object_type, const gchar* list);
+VideoMetadata* video_read_metadata (Video* self, GError** error);
+enum {
+ VIDEO_INTERPRETABLE_RESULTS_DUMMY_PROPERTY
+};
+void thumbnail_cache_replace (ThumbnailSource* source, ThumbnailCacheSize size, GdkPixbuf* replacement, GError** error);
+void thumbnail_source_notify_thumbnail_altered (ThumbnailSource* self);
+static void video_interpretable_results_finalize (VideoInterpretableResults* obj);
+static void video_finalize (GObject* obj);
+GType marker_get_type (void) G_GNUC_CONST;
+gpointer source_backlink_ref (gpointer instance);
+void source_backlink_unref (gpointer instance);
+GParamSpec* param_spec_source_backlink (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_source_backlink (GValue* value, gpointer v_object);
+void value_take_source_backlink (GValue* value, gpointer v_object);
+gpointer value_get_source_backlink (const GValue* value);
+GType source_backlink_get_type (void) G_GNUC_CONST;
+GType database_source_holding_tank_get_type (void) G_GNUC_CONST;
+GType media_source_holding_tank_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;
+GType media_monitor_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;
+#define VIDEO_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollectionPrivate))
+enum {
+ VIDEO_SOURCE_COLLECTION_DUMMY_PROPERTY
+};
+GType video_source_collection_state_get_type (void) G_GNUC_CONST;
+gint uint64_compare (guint64* a, guint64* b);
+static gint _uint64_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
+static guint64* _uint64_dup (guint64* self);
+gint64 video_source_collection_get_video_key (DataSource* source);
+static gint64 _video_source_collection_get_video_key_get_source_database_key (DataSource* source, gpointer self);
+MediaSourceCollection* media_source_collection_construct (GType object_type, const gchar* name, GetSourceDatabaseKey source_key_func, void* source_key_func_target);
+MediaSourceHoldingTank* media_source_collection_get_trashcan (MediaSourceCollection* self);
+static void video_source_collection_on_trashcan_contents_altered (VideoSourceCollection* self, GeeCollection* added, GeeCollection* removed);
+static void _video_source_collection_on_trashcan_contents_altered_source_holding_tank_contents_altered (SourceHoldingTank* _sender, GeeCollection* added, GeeCollection* removed, gpointer self);
+MediaSourceHoldingTank* media_source_collection_get_offline_bin (MediaSourceCollection* self);
+static void video_source_collection_on_offline_contents_altered (VideoSourceCollection* self, GeeCollection* added, GeeCollection* removed);
+static void _video_source_collection_on_offline_contents_altered_source_holding_tank_contents_altered (SourceHoldingTank* _sender, GeeCollection* added, GeeCollection* removed, gpointer self);
+static MediaSourceHoldingTank* video_source_collection_real_create_trashcan (MediaSourceCollection* base);
+gboolean video_source_collection_is_video_trashed (DataSource* source);
+static gboolean _video_source_collection_is_video_trashed_source_holding_tank_check_to_keep (DataSource* source, Alteration* alteration, gpointer self);
+MediaSourceHoldingTank* media_source_holding_tank_new (MediaSourceCollection* sources, SourceHoldingTankCheckToKeep check_to_keep, void* check_to_keep_target, GetSourceDatabaseKey get_key, void* get_key_target);
+MediaSourceHoldingTank* media_source_holding_tank_construct (GType object_type, MediaSourceCollection* sources, SourceHoldingTankCheckToKeep check_to_keep, void* check_to_keep_target, GetSourceDatabaseKey get_key, void* get_key_target);
+static MediaSourceHoldingTank* video_source_collection_real_create_offline_bin (MediaSourceCollection* base);
+gboolean video_source_collection_is_video_offline (DataSource* source);
+static gboolean _video_source_collection_is_video_offline_source_holding_tank_check_to_keep (DataSource* source, Alteration* alteration, gpointer self);
+static MediaMonitor* video_source_collection_real_create_media_monitor (MediaSourceCollection* base, Workers* workers, GCancellable* cancellable);
+VideoMonitor* video_monitor_new (GCancellable* cancellable);
+VideoMonitor* video_monitor_construct (GType object_type, GCancellable* cancellable);
+GType video_monitor_get_type (void) G_GNUC_CONST;
+static gboolean video_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source);
+static gchar* video_source_collection_real_get_typename (MediaSourceCollection* base);
+static gboolean video_source_collection_real_is_file_recognized (MediaSourceCollection* base, GFile* file);
+static MediaSource* video_source_collection_real_fetch_by_numeric_id (MediaSourceCollection* base, gint64 numeric_id);
+Video* video_source_collection_fetch (VideoSourceCollection* self, VideoID* video_id);
+DataSource* database_source_collection_fetch_by_key (DatabaseSourceCollection* self, gint64 key);
+static GeeCollection* video_source_collection_real_get_event_source_ids (MediaSourceCollection* base, EventID* event_id);
+GeeArrayList* video_table_get_event_source_ids (VideoTable* self, EventID* event_id);
+Video* video_source_collection_get_state_by_file (VideoSourceCollection* self, GFile* file, VideoSourceCollectionState* state);
+MediaSource* media_source_collection_fetch_by_master_file (MediaSourceCollection* self, GFile* file);
+MediaSource* media_source_holding_tank_fetch_by_master_file (MediaSourceHoldingTank* self, GFile* file);
+static void video_source_collection_compare_backing (VideoSourceCollection* self, Video* video, GFileInfo* info, GeeCollection* matching_master);
+guint64 media_source_get_filesize (MediaSource* self);
+time_t media_source_get_timestamp (MediaSource* self);
+void video_source_collection_fetch_by_matching_backing (VideoSourceCollection* self, GFileInfo* info, GeeCollection* matching_master);
+GeeCollection* data_collection_get_all (DataCollection* self);
+GeeCollection* media_source_collection_get_offline_bin_contents (MediaSourceCollection* self);
+static void video_source_collection_real_notify_contents_altered (DataCollection* base, GeeIterable* added, GeeIterable* removed);
+void data_collection_notify_contents_altered (DataCollection* self, GeeIterable* added, GeeIterable* removed);
+void video_source_collection_get_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize, VideoID* result);
+GFile* media_source_get_master_file (MediaSource* self);
+gboolean video_source_collection_has_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize);
+gboolean video_id_is_valid (VideoID *self);
+MediaSourceTransactionController* media_source_transaction_controller_new (MediaSourceCollection* sources);
+MediaSourceTransactionController* media_source_transaction_controller_construct (GType object_type, MediaSourceCollection* sources);
+GType media_source_transaction_controller_get_type (void) G_GNUC_CONST;
+static void video_source_collection_finalize (DataCollection* obj);
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
+
+static const gchar* VIDEO_READER_METADATA_ONLY_FILE_EXTENSIONS[4] = {"bdm", "bdmv", "cpi", "mpl"};
+
+GQuark video_error_quark (void) {
+ return g_quark_from_static_string ("video_error-quark");
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+#line 30 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self ? g_object_ref (self) : NULL;
+#line 1516 "VideoSupport.c"
+}
+
+
+static gpointer _thumbnails_ref0 (gpointer self) {
+#line 33 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self ? thumbnails_ref (self) : NULL;
+#line 1523 "VideoSupport.c"
+}
+
+
+VideoImportParams* video_import_params_construct (GType object_type, GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override) {
+ VideoImportParams* self = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ ImportID _tmp2_ = {0};
+ const gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ Thumbnails* _tmp5_ = NULL;
+ Thumbnails* _tmp6_ = NULL;
+ time_t _tmp7_ = 0;
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (import_id != NULL, NULL);
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail ((thumbnails == NULL) || IS_THUMBNAILS (thumbnails), NULL);
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = (VideoImportParams*) g_type_create_instance (object_type);
+#line 30 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 30 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 30 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->file);
+#line 30 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->file = _tmp1_;
+#line 31 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = *import_id;
+#line 31 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->import_id = _tmp2_;
+#line 32 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = md5;
+#line 32 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = g_strdup (_tmp3_);
+#line 32 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (self->md5);
+#line 32 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->md5 = _tmp4_;
+#line 33 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = thumbnails;
+#line 33 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _thumbnails_ref0 (_tmp5_);
+#line 33 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _thumbnails_unref0 (self->thumbnails);
+#line 33 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->thumbnails = _tmp6_;
+#line 34 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = exposure_time_override;
+#line 34 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->exposure_time_override = _tmp7_;
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self;
+#line 1579 "VideoSupport.c"
+}
+
+
+VideoImportParams* video_import_params_new (GFile* file, ImportID* import_id, const gchar* md5, Thumbnails* thumbnails, time_t exposure_time_override) {
+#line 28 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return video_import_params_construct (TYPE_VIDEO_IMPORT_PARAMS, file, import_id, md5, thumbnails, exposure_time_override);
+#line 1586 "VideoSupport.c"
+}
+
+
+static void value_video_import_params_init (GValue* value) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 1593 "VideoSupport.c"
+}
+
+
+static void value_video_import_params_free_value (GValue* value) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (value->data[0].v_pointer) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_import_params_unref (value->data[0].v_pointer);
+#line 1602 "VideoSupport.c"
+ }
+}
+
+
+static void value_video_import_params_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (src_value->data[0].v_pointer) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = video_import_params_ref (src_value->data[0].v_pointer);
+#line 1612 "VideoSupport.c"
+ } else {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 1616 "VideoSupport.c"
+ }
+}
+
+
+static gpointer value_video_import_params_peek_pointer (const GValue* value) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 1624 "VideoSupport.c"
+}
+
+
+static gchar* value_video_import_params_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (collect_values[0].v_pointer) {
+#line 1631 "VideoSupport.c"
+ VideoImportParams* object;
+ object = collect_values[0].v_pointer;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 1638 "VideoSupport.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.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 1642 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = video_import_params_ref (object);
+#line 1646 "VideoSupport.c"
+ } else {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 1650 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 1654 "VideoSupport.c"
+}
+
+
+static gchar* value_video_import_params_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ VideoImportParams** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!object_p) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 1665 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!value->data[0].v_pointer) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = NULL;
+#line 1671 "VideoSupport.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = value->data[0].v_pointer;
+#line 1675 "VideoSupport.c"
+ } else {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = video_import_params_ref (value->data[0].v_pointer);
+#line 1679 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 1683 "VideoSupport.c"
+}
+
+
+GParamSpec* param_spec_video_import_params (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecVideoImportParams* spec;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_VIDEO_IMPORT_PARAMS), NULL);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return G_PARAM_SPEC (spec);
+#line 1697 "VideoSupport.c"
+}
+
+
+gpointer value_get_video_import_params (const GValue* value) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_IMPORT_PARAMS), NULL);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 1706 "VideoSupport.c"
+}
+
+
+void value_set_video_import_params (GValue* value, gpointer v_object) {
+ VideoImportParams* old;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_IMPORT_PARAMS));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIDEO_IMPORT_PARAMS));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_import_params_ref (value->data[0].v_pointer);
+#line 1726 "VideoSupport.c"
+ } else {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 1730 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_import_params_unref (old);
+#line 1736 "VideoSupport.c"
+ }
+}
+
+
+void value_take_video_import_params (GValue* value, gpointer v_object) {
+ VideoImportParams* old;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_IMPORT_PARAMS));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIDEO_IMPORT_PARAMS));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 1755 "VideoSupport.c"
+ } else {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 1759 "VideoSupport.c"
+ }
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_import_params_unref (old);
+#line 1765 "VideoSupport.c"
+ }
+}
+
+
+static void video_import_params_class_init (VideoImportParamsClass * klass) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_import_params_parent_class = g_type_class_peek_parent (klass);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((VideoImportParamsClass *) klass)->finalize = video_import_params_finalize;
+#line 1775 "VideoSupport.c"
+}
+
+
+static void video_import_params_instance_init (VideoImportParams * self) {
+ VideoRow* _tmp0_ = NULL;
+#line 18 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ import_id_init (&self->import_id, IMPORT_ID_INVALID);
+#line 26 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_row_new ();
+#line 26 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->row = _tmp0_;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->ref_count = 1;
+#line 1789 "VideoSupport.c"
+}
+
+
+static void video_import_params_finalize (VideoImportParams* obj) {
+ VideoImportParams * self;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO_IMPORT_PARAMS, VideoImportParams);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_handlers_destroy (self);
+#line 17 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->file);
+#line 19 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (self->md5);
+#line 23 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _thumbnails_unref0 (self->thumbnails);
+#line 26 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_row_unref0 (self->row);
+#line 1807 "VideoSupport.c"
+}
+
+
+GType video_import_params_get_type (void) {
+ static volatile gsize video_import_params_type_id__volatile = 0;
+ if (g_once_init_enter (&video_import_params_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_video_import_params_init, value_video_import_params_free_value, value_video_import_params_copy_value, value_video_import_params_peek_pointer, "p", value_video_import_params_collect_value, "p", value_video_import_params_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (VideoImportParamsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_import_params_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoImportParams), 0, (GInstanceInitFunc) video_import_params_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 video_import_params_type_id;
+ video_import_params_type_id = g_type_register_fundamental (g_type_fundamental_next (), "VideoImportParams", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&video_import_params_type_id__volatile, video_import_params_type_id);
+ }
+ return video_import_params_type_id__volatile;
+}
+
+
+gpointer video_import_params_ref (gpointer instance) {
+ VideoImportParams* self;
+ self = instance;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return instance;
+#line 1832 "VideoSupport.c"
+}
+
+
+void video_import_params_unref (gpointer instance) {
+ VideoImportParams* self;
+ self = instance;
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ VIDEO_IMPORT_PARAMS_GET_CLASS (self)->finalize (self);
+#line 15 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 1845 "VideoSupport.c"
+ }
+}
+
+
+VideoReader* video_reader_construct (GType object_type, GFile* file) {
+ VideoReader* self = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+#line 51 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 51 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = (VideoReader*) g_type_create_instance (object_type);
+#line 52 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 52 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 52 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->file);
+#line 52 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->file = _tmp1_;
+#line 51 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self;
+#line 1868 "VideoSupport.c"
+}
+
+
+VideoReader* video_reader_new (GFile* file) {
+#line 51 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return video_reader_construct (TYPE_VIDEO_READER, file);
+#line 1875 "VideoSupport.c"
+}
+
+
+gboolean video_reader_is_supported_video_file (GFile* file) {
+ gboolean result = FALSE;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+#line 55 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = g_file_get_basename (_tmp0_);
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_reader_is_supported_video_filename (_tmp2_);
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp2_);
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp4_;
+#line 56 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 1904 "VideoSupport.c"
+}
+
+
+static gchar* string_slice (const gchar* self, glong start, glong end) {
+ gchar* result = NULL;
+ glong string_length = 0L;
+ gint _tmp0_ = 0;
+ gint _tmp1_ = 0;
+ glong _tmp2_ = 0L;
+ glong _tmp5_ = 0L;
+ gboolean _tmp8_ = FALSE;
+ glong _tmp9_ = 0L;
+ gboolean _tmp12_ = FALSE;
+ glong _tmp13_ = 0L;
+ glong _tmp16_ = 0L;
+ glong _tmp17_ = 0L;
+ glong _tmp18_ = 0L;
+ glong _tmp19_ = 0L;
+ glong _tmp20_ = 0L;
+ gchar* _tmp21_ = NULL;
+#line 1328 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (self != NULL, NULL);
+#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp0_ = strlen (self);
+#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp1_ = _tmp0_;
+#line 1329 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ string_length = (glong) _tmp1_;
+#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp2_ = start;
+#line 1330 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp2_ < ((glong) 0)) {
+#line 1937 "VideoSupport.c"
+ glong _tmp3_ = 0L;
+ glong _tmp4_ = 0L;
+#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp3_ = string_length;
+#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp4_ = start;
+#line 1331 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ start = _tmp3_ + _tmp4_;
+#line 1946 "VideoSupport.c"
+ }
+#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp5_ = end;
+#line 1333 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp5_ < ((glong) 0)) {
+#line 1952 "VideoSupport.c"
+ glong _tmp6_ = 0L;
+ glong _tmp7_ = 0L;
+#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp6_ = string_length;
+#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp7_ = end;
+#line 1334 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ end = _tmp6_ + _tmp7_;
+#line 1961 "VideoSupport.c"
+ }
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp9_ = start;
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp9_ >= ((glong) 0)) {
+#line 1967 "VideoSupport.c"
+ glong _tmp10_ = 0L;
+ glong _tmp11_ = 0L;
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp10_ = start;
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp11_ = string_length;
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp8_ = _tmp10_ <= _tmp11_;
+#line 1976 "VideoSupport.c"
+ } else {
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp8_ = FALSE;
+#line 1980 "VideoSupport.c"
+ }
+#line 1336 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp8_, NULL);
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp13_ = end;
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ if (_tmp13_ >= ((glong) 0)) {
+#line 1988 "VideoSupport.c"
+ glong _tmp14_ = 0L;
+ glong _tmp15_ = 0L;
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp14_ = end;
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp15_ = string_length;
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp12_ = _tmp14_ <= _tmp15_;
+#line 1997 "VideoSupport.c"
+ } else {
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp12_ = FALSE;
+#line 2001 "VideoSupport.c"
+ }
+#line 1337 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp12_, NULL);
+#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp16_ = start;
+#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp17_ = end;
+#line 1338 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp18_ = start;
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp19_ = end;
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp20_ = start;
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ _tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ result = _tmp21_;
+#line 1339 "/usr/share/vala-0.32/vapi/glib-2.0.vapi"
+ return result;
+#line 2023 "VideoSupport.c"
+}
+
+
+gboolean video_reader_is_supported_video_filename (const gchar* filename) {
+ gboolean result = FALSE;
+ gchar* mime_type = NULL;
+ const gchar* _tmp0_ = NULL;
+ guchar* _tmp1_ = NULL;
+ guchar* _tmp2_ = NULL;
+ gint _tmp2__length1 = 0;
+ gchar* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ const gchar* _tmp5_ = NULL;
+ gint _tmp6_ = 0;
+ gint _tmp7_ = 0;
+#line 59 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (filename != NULL, FALSE);
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = filename;
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = g_new0 (guchar, 0);
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2__length1 = 0;
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_content_type_guess (_tmp0_, _tmp2_, (gsize) 0, NULL);
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ mime_type = _tmp3_;
+#line 61 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = (g_free (_tmp2_), NULL);
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = mime_type;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = strlen (_tmp5_);
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp7_ >= 6) {
+#line 2065 "VideoSupport.c"
+ const gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = mime_type;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = string_slice (_tmp8_, (glong) 0, (glong) 6);
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = g_strcmp0 (_tmp10_, "video/") == 0;
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp10_);
+#line 2079 "VideoSupport.c"
+ } else {
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = FALSE;
+#line 2083 "VideoSupport.c"
+ }
+#line 62 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp4_) {
+#line 2087 "VideoSupport.c"
+ gchar* extension = NULL;
+ gchar* name = NULL;
+ const gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+#line 63 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ extension = NULL;
+#line 64 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ name = NULL;
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = filename;
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ disassemble_filename (_tmp11_, &_tmp12_, &_tmp13_);
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (name);
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ name = _tmp12_;
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (extension);
+#line 65 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ extension = _tmp13_;
+#line 67 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = extension;
+#line 67 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp14_ == NULL) {
+#line 68 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = TRUE;
+#line 68 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (name);
+#line 68 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (extension);
+#line 68 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 68 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2124 "VideoSupport.c"
+ }
+ {
+ const gchar** s_collection = NULL;
+ gint s_collection_length1 = 0;
+ gint _s_collection_size_ = 0;
+ gint s_it = 0;
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ s_collection = VIDEO_READER_METADATA_ONLY_FILE_EXTENSIONS;
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ s_collection_length1 = G_N_ELEMENTS (VIDEO_READER_METADATA_ONLY_FILE_EXTENSIONS);
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ for (s_it = 0; s_it < G_N_ELEMENTS (VIDEO_READER_METADATA_ONLY_FILE_EXTENSIONS); s_it = s_it + 1) {
+#line 2137 "VideoSupport.c"
+ gchar* _tmp15_ = NULL;
+ gchar* s = NULL;
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = g_strdup (s_collection[s_it]);
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ s = _tmp15_;
+#line 2144 "VideoSupport.c"
+ {
+ const gchar* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ gint _tmp18_ = 0;
+#line 71 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = s;
+#line 71 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = extension;
+#line 71 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = utf8_ci_compare (_tmp16_, _tmp17_);
+#line 71 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp18_ == 0) {
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = FALSE;
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (s);
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (name);
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (extension);
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 72 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2169 "VideoSupport.c"
+ }
+#line 70 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (s);
+#line 2173 "VideoSupport.c"
+ }
+ }
+ }
+#line 75 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = TRUE;
+#line 75 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (name);
+#line 75 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (extension);
+#line 75 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 75 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2187 "VideoSupport.c"
+ } else {
+#line 77 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = FALSE;
+#line 77 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 77 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2195 "VideoSupport.c"
+ }
+#line 59 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (mime_type);
+#line 2199 "VideoSupport.c"
+}
+
+
+ImportResult video_reader_prepare_for_import (VideoImportParams* params) {
+ ImportResult result = 0;
+ GFile* file = NULL;
+ VideoImportParams* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GFileInfo* info = NULL;
+ GFileInfo* _tmp7_ = NULL;
+ GFileType _tmp8_ = 0;
+ GFile* _tmp9_ = NULL;
+ gboolean _tmp10_ = FALSE;
+ GTimeVal timestamp = {0};
+ GFileInfo* _tmp14_ = NULL;
+ GTimeVal _tmp15_ = {0};
+ VideoImportParams* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ time_t exposure_time = 0;
+ VideoImportParams* _tmp18_ = NULL;
+ time_t _tmp19_ = 0;
+ gchar* title = NULL;
+ gchar* _tmp20_ = NULL;
+ gchar* comment = NULL;
+ gchar* _tmp21_ = NULL;
+ VideoReader* reader = NULL;
+ GFile* _tmp22_ = NULL;
+ VideoReader* _tmp23_ = NULL;
+ gboolean is_interpretable = FALSE;
+ gdouble clip_duration = 0.0;
+ GdkPixbuf* preview_frame = NULL;
+ VideoReader* _tmp24_ = NULL;
+ GdkPixbuf* _tmp25_ = NULL;
+ time_t _tmp53_ = 0;
+ VideoImportParams* _tmp60_ = NULL;
+ VideoRow* _tmp61_ = NULL;
+ VideoImportParams* _tmp62_ = NULL;
+ VideoRow* _tmp63_ = NULL;
+ GFile* _tmp64_ = NULL;
+ gchar* _tmp65_ = NULL;
+ VideoImportParams* _tmp66_ = NULL;
+ VideoRow* _tmp67_ = NULL;
+ GFileInfo* _tmp68_ = NULL;
+ gint64 _tmp69_ = 0LL;
+ VideoImportParams* _tmp70_ = NULL;
+ VideoRow* _tmp71_ = NULL;
+ GTimeVal _tmp72_ = {0};
+ glong _tmp73_ = 0L;
+ VideoImportParams* _tmp74_ = NULL;
+ VideoRow* _tmp75_ = NULL;
+ GdkPixbuf* _tmp76_ = NULL;
+ gint _tmp77_ = 0;
+ gint _tmp78_ = 0;
+ VideoImportParams* _tmp79_ = NULL;
+ VideoRow* _tmp80_ = NULL;
+ GdkPixbuf* _tmp81_ = NULL;
+ gint _tmp82_ = 0;
+ gint _tmp83_ = 0;
+ VideoImportParams* _tmp84_ = NULL;
+ VideoRow* _tmp85_ = NULL;
+ gdouble _tmp86_ = 0.0;
+ VideoImportParams* _tmp87_ = NULL;
+ VideoRow* _tmp88_ = NULL;
+ gboolean _tmp89_ = FALSE;
+ VideoImportParams* _tmp90_ = NULL;
+ VideoRow* _tmp91_ = NULL;
+ time_t _tmp92_ = 0;
+ VideoImportParams* _tmp93_ = NULL;
+ VideoRow* _tmp94_ = NULL;
+ VideoImportParams* _tmp95_ = NULL;
+ ImportID _tmp96_ = {0};
+ VideoImportParams* _tmp97_ = NULL;
+ VideoRow* _tmp98_ = NULL;
+ VideoImportParams* _tmp99_ = NULL;
+ VideoRow* _tmp100_ = NULL;
+ VideoImportParams* _tmp101_ = NULL;
+ const gchar* _tmp102_ = NULL;
+ gchar* _tmp103_ = NULL;
+ VideoImportParams* _tmp104_ = NULL;
+ VideoRow* _tmp105_ = NULL;
+ VideoImportParams* _tmp106_ = NULL;
+ VideoRow* _tmp107_ = NULL;
+ const gchar* _tmp108_ = NULL;
+ gchar* _tmp109_ = NULL;
+ VideoImportParams* _tmp110_ = NULL;
+ VideoRow* _tmp111_ = NULL;
+ const gchar* _tmp112_ = NULL;
+ gchar* _tmp113_ = NULL;
+ VideoImportParams* _tmp114_ = NULL;
+ VideoRow* _tmp115_ = NULL;
+ gchar* _tmp116_ = NULL;
+ VideoImportParams* _tmp117_ = NULL;
+ VideoRow* _tmp118_ = NULL;
+ VideoImportParams* _tmp119_ = NULL;
+ VideoRow* _tmp120_ = NULL;
+ VideoImportParams* _tmp121_ = NULL;
+ Thumbnails* _tmp122_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 81 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_IMPORT_PARAMS (params), 0);
+#line 85 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = params;
+#line 85 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_->file;
+#line 85 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _g_object_ref0 (_tmp1_);
+#line 85 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ file = _tmp2_;
+#line 87 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ info = NULL;
+#line 2311 "VideoSupport.c"
+ {
+ GFileInfo* _tmp3_ = NULL;
+ GFile* _tmp4_ = NULL;
+ GFileInfo* _tmp5_ = NULL;
+ GFileInfo* _tmp6_ = NULL;
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = file;
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = g_file_query_info (_tmp4_, DIRECTORY_MONITOR_SUPPLIED_ATTRIBUTES, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL, &_inner_error_);
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp5_;
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 2325 "VideoSupport.c"
+ goto __catch482_g_error;
+ }
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp3_;
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = NULL;
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 89 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ info = _tmp6_;
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp3_);
+#line 2338 "VideoSupport.c"
+ }
+ goto __finally482;
+ __catch482_g_error:
+ {
+ GError* err = NULL;
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 92 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_FILE_ERROR;
+#line 92 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 92 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 92 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 92 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2358 "VideoSupport.c"
+ }
+ __finally482:
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.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 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 88 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 2373 "VideoSupport.c"
+ }
+#line 95 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = info;
+#line 95 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = g_file_info_get_file_type (_tmp7_);
+#line 95 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp8_ != G_FILE_TYPE_REGULAR) {
+#line 96 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_NOT_A_FILE;
+#line 96 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 96 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 96 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2389 "VideoSupport.c"
+ }
+#line 98 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = file;
+#line 98 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video_reader_is_supported_video_file (_tmp9_);
+#line 98 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp10_) {
+#line 2397 "VideoSupport.c"
+ GFile* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+#line 99 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = file;
+#line 99 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = g_file_get_path (_tmp11_);
+#line 99 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_;
+#line 99 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("Not importing %s: file is marked as a video file but doesn't have a" "supported extension", _tmp13_);
+#line 99 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp13_);
+#line 102 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_UNSUPPORTED_FORMAT;
+#line 102 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 102 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 102 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2419 "VideoSupport.c"
+ }
+#line 105 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = info;
+#line 105 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_file_info_get_modification_time (_tmp14_, &_tmp15_);
+#line 105 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ timestamp = _tmp15_;
+#line 108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = params;
+#line 108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = _tmp16_->md5;
+#line 108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_assert (_tmp17_ != NULL, "params.md5 != null");
+#line 110 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = params;
+#line 110 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = _tmp18_->exposure_time_override;
+#line 110 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exposure_time = _tmp19_;
+#line 111 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = g_strdup ("");
+#line 111 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ title = _tmp20_;
+#line 112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = g_strdup ("");
+#line 112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ comment = _tmp21_;
+#line 114 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = file;
+#line 114 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = video_reader_new (_tmp22_);
+#line 114 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ reader = _tmp23_;
+#line 115 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ is_interpretable = TRUE;
+#line 116 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ clip_duration = 0.0;
+#line 117 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = reader;
+#line 117 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = video_reader_read_preview_frame (_tmp24_);
+#line 117 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ preview_frame = _tmp25_;
+#line 2463 "VideoSupport.c"
+ {
+ gdouble _tmp26_ = 0.0;
+ VideoReader* _tmp27_ = NULL;
+ gdouble _tmp28_ = 0.0;
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = reader;
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp28_ = video_reader_read_clip_duration (_tmp27_, &_inner_error_);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = _tmp28_;
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == VIDEO_ERROR) {
+#line 2478 "VideoSupport.c"
+ goto __catch483_video_error;
+ }
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 2499 "VideoSupport.c"
+ }
+#line 119 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ clip_duration = _tmp26_;
+#line 2503 "VideoSupport.c"
+ }
+ goto __finally483;
+ __catch483_video_error:
+ {
+ GError* err = NULL;
+ GError* _tmp29_ = NULL;
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 121 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp29_ = err;
+#line 121 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_error_matches (_tmp29_, VIDEO_ERROR, VIDEO_ERROR_FILE)) {
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_FILE_ERROR;
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 122 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2536 "VideoSupport.c"
+ } else {
+ GError* _tmp30_ = NULL;
+#line 123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp30_ = err;
+#line 123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_error_matches (_tmp30_, VIDEO_ERROR, VIDEO_ERROR_CONTENTS)) {
+#line 124 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ is_interpretable = FALSE;
+#line 125 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ clip_duration = 0.0;
+#line 2547 "VideoSupport.c"
+ } else {
+#line 127 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_error ("VideoSupport.vala:127: can't prepare video for import: an unknown kind" \
+" of video error occurred");
+#line 2551 "VideoSupport.c"
+ }
+ }
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 2556 "VideoSupport.c"
+ }
+ __finally483:
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.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 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 2579 "VideoSupport.c"
+ }
+ {
+ VideoMetadata* metadata = NULL;
+ VideoReader* _tmp31_ = NULL;
+ VideoMetadata* _tmp32_ = NULL;
+ MetadataDateTime* creation_date_time = NULL;
+ VideoMetadata* _tmp33_ = NULL;
+ MetadataDateTime* _tmp34_ = NULL;
+ gboolean _tmp35_ = FALSE;
+ MetadataDateTime* _tmp36_ = NULL;
+ gchar* video_title = NULL;
+ VideoMetadata* _tmp41_ = NULL;
+ gchar* _tmp42_ = NULL;
+ gchar* video_comment = NULL;
+ VideoMetadata* _tmp43_ = NULL;
+ gchar* _tmp44_ = NULL;
+ const gchar* _tmp45_ = NULL;
+ const gchar* _tmp48_ = NULL;
+#line 132 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp31_ = reader;
+#line 132 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp32_ = video_reader_read_metadata (_tmp31_, &_inner_error_);
+#line 132 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ metadata = _tmp32_;
+#line 132 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 2606 "VideoSupport.c"
+ goto __catch484_g_error;
+ }
+#line 133 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp33_ = metadata;
+#line 133 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp34_ = media_metadata_get_creation_date_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, TYPE_MEDIA_METADATA, MediaMetadata));
+#line 133 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ creation_date_time = _tmp34_;
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp36_ = creation_date_time;
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp36_ != NULL) {
+#line 2619 "VideoSupport.c"
+ MetadataDateTime* _tmp37_ = NULL;
+ time_t _tmp38_ = 0;
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp37_ = creation_date_time;
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp38_ = metadata_date_time_get_timestamp (_tmp37_);
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = _tmp38_ != ((time_t) 0);
+#line 2628 "VideoSupport.c"
+ } else {
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = FALSE;
+#line 2632 "VideoSupport.c"
+ }
+#line 135 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp35_) {
+#line 2636 "VideoSupport.c"
+ MetadataDateTime* _tmp39_ = NULL;
+ time_t _tmp40_ = 0;
+#line 136 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp39_ = creation_date_time;
+#line 136 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp40_ = metadata_date_time_get_timestamp (_tmp39_);
+#line 136 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exposure_time = _tmp40_;
+#line 2645 "VideoSupport.c"
+ }
+#line 138 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp41_ = metadata;
+#line 138 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp42_ = media_metadata_get_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_MEDIA_METADATA, MediaMetadata));
+#line 138 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_title = _tmp42_;
+#line 139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp43_ = metadata;
+#line 139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp44_ = media_metadata_get_comment (G_TYPE_CHECK_INSTANCE_CAST (_tmp43_, TYPE_MEDIA_METADATA, MediaMetadata));
+#line 139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_comment = _tmp44_;
+#line 140 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp45_ = video_title;
+#line 140 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp45_ != NULL) {
+#line 2663 "VideoSupport.c"
+ const gchar* _tmp46_ = NULL;
+ gchar* _tmp47_ = NULL;
+#line 141 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp46_ = video_title;
+#line 141 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp47_ = g_strdup (_tmp46_);
+#line 141 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 141 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ title = _tmp47_;
+#line 2674 "VideoSupport.c"
+ }
+#line 142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp48_ = video_comment;
+#line 142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp48_ != NULL) {
+#line 2680 "VideoSupport.c"
+ const gchar* _tmp49_ = NULL;
+ gchar* _tmp50_ = NULL;
+#line 143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp49_ = video_comment;
+#line 143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp50_ = g_strdup (_tmp49_);
+#line 143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ comment = _tmp50_;
+#line 2691 "VideoSupport.c"
+ }
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (video_comment);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (video_title);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _metadata_date_time_unref0 (creation_date_time);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _media_metadata_unref0 (metadata);
+#line 2701 "VideoSupport.c"
+ }
+ goto __finally484;
+ __catch484_g_error:
+ {
+ GError* err = NULL;
+ GError* _tmp51_ = NULL;
+ const gchar* _tmp52_ = NULL;
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 145 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp51_ = err;
+#line 145 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp52_ = _tmp51_->message;
+#line 145 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_warning ("VideoSupport.vala:145: Unable to read video metadata: %s", _tmp52_);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 2721 "VideoSupport.c"
+ }
+ __finally484:
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.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 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 2744 "VideoSupport.c"
+ }
+#line 148 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp53_ = exposure_time;
+#line 148 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp53_ == ((time_t) 0)) {
+#line 2750 "VideoSupport.c"
+ gint64 _tmp54_ = 0LL;
+ VideoReader* _tmp55_ = NULL;
+ GDateTime* _tmp56_ = NULL;
+#line 150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp55_ = reader;
+#line 150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp56_ = _tmp55_->priv->_timestamp;
+#line 150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp56_ != NULL) {
+#line 2760 "VideoSupport.c"
+ VideoReader* _tmp57_ = NULL;
+ GDateTime* _tmp58_ = NULL;
+ gint64 _tmp59_ = 0LL;
+#line 151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp57_ = reader;
+#line 151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp58_ = _tmp57_->priv->_timestamp;
+#line 151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp59_ = g_date_time_to_unix (_tmp58_);
+#line 151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp54_ = _tmp59_;
+#line 2772 "VideoSupport.c"
+ } else {
+#line 151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp54_ = (gint64) 0;
+#line 2776 "VideoSupport.c"
+ }
+#line 150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exposure_time = (time_t) _tmp54_;
+#line 2780 "VideoSupport.c"
+ }
+#line 154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp60_ = params;
+#line 154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp61_ = _tmp60_->row;
+#line 154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_id_init (&_tmp61_->video_id, VIDEO_ID_INVALID);
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp62_ = params;
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp63_ = _tmp62_->row;
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp64_ = file;
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp65_ = g_file_get_path (_tmp64_);
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp63_->filepath);
+#line 155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp63_->filepath = _tmp65_;
+#line 156 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp66_ = params;
+#line 156 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp67_ = _tmp66_->row;
+#line 156 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp68_ = info;
+#line 156 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp69_ = g_file_info_get_size (_tmp68_);
+#line 156 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp67_->filesize = _tmp69_;
+#line 157 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp70_ = params;
+#line 157 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp71_ = _tmp70_->row;
+#line 157 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp72_ = timestamp;
+#line 157 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp73_ = _tmp72_.tv_sec;
+#line 157 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp71_->timestamp = (time_t) _tmp73_;
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp74_ = params;
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp75_ = _tmp74_->row;
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp76_ = preview_frame;
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp77_ = gdk_pixbuf_get_width (_tmp76_);
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp78_ = _tmp77_;
+#line 158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp75_->width = _tmp78_;
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp79_ = params;
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp80_ = _tmp79_->row;
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp81_ = preview_frame;
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp82_ = gdk_pixbuf_get_height (_tmp81_);
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp83_ = _tmp82_;
+#line 159 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp80_->height = _tmp83_;
+#line 160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp84_ = params;
+#line 160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp85_ = _tmp84_->row;
+#line 160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp86_ = clip_duration;
+#line 160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp85_->clip_duration = _tmp86_;
+#line 161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp87_ = params;
+#line 161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp88_ = _tmp87_->row;
+#line 161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp89_ = is_interpretable;
+#line 161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp88_->is_interpretable = _tmp89_;
+#line 162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp90_ = params;
+#line 162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp91_ = _tmp90_->row;
+#line 162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp92_ = exposure_time;
+#line 162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp91_->exposure_time = _tmp92_;
+#line 163 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp93_ = params;
+#line 163 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp94_ = _tmp93_->row;
+#line 163 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp95_ = params;
+#line 163 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp96_ = _tmp95_->import_id;
+#line 163 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp94_->import_id = _tmp96_;
+#line 164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp97_ = params;
+#line 164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp98_ = _tmp97_->row;
+#line 164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ event_id_init (&_tmp98_->event_id, EVENT_ID_INVALID);
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp99_ = params;
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp100_ = _tmp99_->row;
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp101_ = params;
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp102_ = _tmp101_->md5;
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp103_ = g_strdup (_tmp102_);
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp100_->md5);
+#line 165 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp100_->md5 = _tmp103_;
+#line 166 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp104_ = params;
+#line 166 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp105_ = _tmp104_->row;
+#line 166 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp105_->time_created = (time_t) 0;
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp106_ = params;
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp107_ = _tmp106_->row;
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp108_ = title;
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp109_ = g_strdup (_tmp108_);
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp107_->title);
+#line 167 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp107_->title = _tmp109_;
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp110_ = params;
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp111_ = _tmp110_->row;
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp112_ = comment;
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp113_ = g_strdup (_tmp112_);
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp111_->comment);
+#line 168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp111_->comment = _tmp113_;
+#line 169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp114_ = params;
+#line 169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp115_ = _tmp114_->row;
+#line 169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp116_ = g_strdup ("");
+#line 169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp115_->backlinks);
+#line 169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp115_->backlinks = _tmp116_;
+#line 170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp117_ = params;
+#line 170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp118_ = _tmp117_->row;
+#line 170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp118_->time_reimported = (time_t) 0;
+#line 171 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp119_ = params;
+#line 171 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp120_ = _tmp119_->row;
+#line 171 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp120_->flags = (guint64) 0;
+#line 173 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp121_ = params;
+#line 173 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp122_ = _tmp121_->thumbnails;
+#line 173 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp122_ != NULL) {
+#line 2956 "VideoSupport.c"
+ VideoImportParams* _tmp123_ = NULL;
+ Thumbnails* _tmp124_ = NULL;
+ VideoImportParams* _tmp125_ = NULL;
+ Thumbnails* _tmp126_ = NULL;
+ GdkPixbuf* _tmp127_ = NULL;
+#line 174 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp123_ = params;
+#line 174 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp124_ = thumbnails_new ();
+#line 174 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _thumbnails_unref0 (_tmp123_->thumbnails);
+#line 174 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp123_->thumbnails = _tmp124_;
+#line 175 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp125_ = params;
+#line 175 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp126_ = _tmp125_->thumbnails;
+#line 175 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp127_ = preview_frame;
+#line 175 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ thumbnail_cache_generate_for_video_frame (_tmp126_, _tmp127_);
+#line 2978 "VideoSupport.c"
+ }
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_SUCCESS;
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (comment);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (title);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (file);
+#line 181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 2996 "VideoSupport.c"
+}
+
+
+static GDate* _g_date_dup (GDate* self) {
+ GDate* dup;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dup = g_new0 (GDate, 1);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ memcpy (dup, self, sizeof (GDate));
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return dup;
+#line 3008 "VideoSupport.c"
+}
+
+
+static gpointer __g_date_dup0 (gpointer self) {
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self ? _g_date_dup (self) : NULL;
+#line 3015 "VideoSupport.c"
+}
+
+
+static void video_reader_read_internal (VideoReader* self, GError** error) {
+ gboolean _tmp0_ = FALSE;
+ GError * _inner_error_ = NULL;
+#line 184 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_READER (self));
+#line 185 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_reader_does_file_exist (self);
+#line 185 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp0_) {
+#line 3028 "VideoSupport.c"
+ GFile* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ GError* _tmp6_ = NULL;
+ GError* _tmp7_ = NULL;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->file;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = g_file_get_path (_tmp1_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = g_strdup_printf ("video file '%s' does not exist or is inaccessible", _tmp3_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = g_error_new_literal (VIDEO_ERROR, VIDEO_ERROR_FILE, _tmp5_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp5_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp3_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = _tmp7_;
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == VIDEO_ERROR) {
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 3062 "VideoSupport.c"
+ } else {
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.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 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 186 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 3070 "VideoSupport.c"
+ }
+ }
+ {
+ GstDiscoverer* d = NULL;
+ GstDiscoverer* _tmp8_ = NULL;
+ GstDiscovererInfo* info = NULL;
+ GstDiscoverer* _tmp9_ = NULL;
+ GFile* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ gchar* _tmp12_ = NULL;
+ GstDiscovererInfo* _tmp13_ = NULL;
+ GstDiscovererInfo* _tmp14_ = NULL;
+ GstDiscovererInfo* _tmp15_ = NULL;
+ GstClockTime _tmp16_ = 0ULL;
+ GDate* video_date = NULL;
+ gboolean _tmp17_ = FALSE;
+ GstDiscovererInfo* _tmp18_ = NULL;
+ GstTagList* _tmp19_ = NULL;
+#line 190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = gst_discoverer_new ((GstClockTime) (GST_SECOND * 5), &_inner_error_);
+#line 190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ d = _tmp8_;
+#line 190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 3095 "VideoSupport.c"
+ goto __catch485_g_error;
+ }
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = d;
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->file;
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = g_file_get_uri (_tmp10_);
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_;
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = gst_discoverer_discover_uri (_tmp9_, _tmp12_, &_inner_error_);
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = _tmp13_;
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp12_);
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ info = _tmp14_;
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 191 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (d);
+#line 3118 "VideoSupport.c"
+ goto __catch485_g_error;
+ }
+#line 193 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = info;
+#line 193 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = gst_discoverer_info_get_duration (_tmp15_);
+#line 193 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->clip_duration = ((gdouble) _tmp16_) / 1000000000.0;
+#line 198 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_date = NULL;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = info;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = gst_discoverer_info_get_tags (_tmp18_);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp19_ != NULL) {
+#line 3135 "VideoSupport.c"
+ GstDiscovererInfo* _tmp20_ = NULL;
+ GstTagList* _tmp21_ = NULL;
+ GDate _tmp22_ = {0};
+ gboolean _tmp23_ = FALSE;
+ GDate _tmp24_ = {0};
+ GDate* _tmp25_ = NULL;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = info;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = gst_discoverer_info_get_tags (_tmp20_);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = gst_tag_list_get_date (_tmp21_, GST_TAG_DATE, &_tmp22_);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (video_date);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = _tmp22_;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = __g_date_dup0 (&_tmp24_);
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_date = _tmp25_;
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = _tmp23_;
+#line 3158 "VideoSupport.c"
+ } else {
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = FALSE;
+#line 3162 "VideoSupport.c"
+ }
+#line 199 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp17_) {
+#line 3166 "VideoSupport.c"
+ GDate* _tmp26_ = NULL;
+#line 201 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = video_date;
+#line 201 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp26_ != NULL) {
+#line 3172 "VideoSupport.c"
+ GDate* _tmp27_ = NULL;
+ GDateYear _tmp28_ = 0U;
+ GDate* _tmp29_ = NULL;
+ GDateMonth _tmp30_ = 0;
+ GDate* _tmp31_ = NULL;
+ GDateDay _tmp32_ = '\0';
+ GDateTime* _tmp33_ = NULL;
+ GDateTime* _tmp34_ = NULL;
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = video_date;
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp28_ = g_date_get_year (_tmp27_);
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp29_ = video_date;
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp30_ = g_date_get_month (_tmp29_);
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp31_ = video_date;
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp32_ = g_date_get_day (_tmp31_);
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp33_ = g_date_time_new_local ((gint) _tmp28_, (gint) _tmp30_, (gint) _tmp32_, 0, 0, (gdouble) 0);
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp34_ = _tmp33_;
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_set_timestamp (self, _tmp34_);
+#line 202 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_date_time_unref0 (_tmp34_);
+#line 3201 "VideoSupport.c"
+ }
+ }
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (video_date);
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (info);
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (d);
+#line 3210 "VideoSupport.c"
+ }
+ goto __finally485;
+ __catch485_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp35_ = NULL;
+ const gchar* _tmp36_ = NULL;
+ GError* _tmp37_ = NULL;
+ const gchar* _tmp38_ = NULL;
+ gchar* _tmp39_ = NULL;
+ gchar* _tmp40_ = NULL;
+ GError* _tmp41_ = NULL;
+ GError* _tmp42_ = NULL;
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 207 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = e;
+#line 207 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp36_ = _tmp35_->message;
+#line 207 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:207: Video read error: %s", _tmp36_);
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp37_ = e;
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp38_ = _tmp37_->message;
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp39_ = g_strdup_printf ("GStreamer couldn't extract clip information: %s", _tmp38_);
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp40_ = _tmp39_;
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp41_ = g_error_new_literal (VIDEO_ERROR, VIDEO_ERROR_CONTENTS, _tmp40_);
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp42_ = _tmp41_;
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp40_);
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = _tmp42_;
+#line 208 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 3252 "VideoSupport.c"
+ goto __finally485;
+ }
+ __finally485:
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == VIDEO_ERROR) {
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 3264 "VideoSupport.c"
+ } else {
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.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 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 3272 "VideoSupport.c"
+ }
+ }
+}
+
+
+static gboolean video_reader_on_thumbnailer_timer (VideoReader* self) {
+ gboolean result = FALSE;
+ GPid _tmp0_ = 0;
+#line 214 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), FALSE);
+#line 215 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:215: Thumbnailer timer called");
+#line 216 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->thumbnailer_pid;
+#line 216 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_ != ((GPid) 0)) {
+#line 3289 "VideoSupport.c"
+ GPid _tmp1_ = 0;
+ GPid _tmp2_ = 0;
+#line 217 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->thumbnailer_pid;
+#line 217 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:217: Killing thumbnailer process: %d", (gint) _tmp1_);
+#line 218 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->thumbnailer_pid;
+#line 218 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ kill ((pid_t) _tmp2_, SIGKILL);
+#line 3300 "VideoSupport.c"
+ }
+#line 220 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = FALSE;
+#line 220 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3306 "VideoSupport.c"
+}
+
+
+static gboolean _video_reader_on_thumbnailer_timer_gsource_func (gpointer self) {
+ gboolean result;
+ result = video_reader_on_thumbnailer_timer ((VideoReader*) self);
+#line 243 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3315 "VideoSupport.c"
+}
+
+
+static GdkPixbuf* video_reader_thumbnailer (VideoReader* self, const gchar* video_file) {
+ GdkPixbuf* result = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ gchar** argv = NULL;
+ GFile* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar** _tmp9_ = NULL;
+ gchar** _tmp10_ = NULL;
+ gint _tmp10__length1 = 0;
+ gint argv_length1 = 0;
+ gint _argv_size_ = 0;
+ gint child_stdout = 0;
+ GdkPixbuf* buf = NULL;
+ gint child_status = 0;
+ gint ret_waitpid = 0;
+ GPid _tmp27_ = 0;
+ gint _tmp28_ = 0;
+ pid_t _tmp29_ = 0;
+ gint _tmp30_ = 0;
+ gint _tmp36_ = 0;
+ GPid _tmp37_ = 0;
+ GError * _inner_error_ = NULL;
+#line 225 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), NULL);
+#line 225 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (video_file != NULL, NULL);
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = app_dirs_get_thumbnailer_bin ();
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = g_file_get_path (_tmp1_);
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:227: Launching thumbnailer process: %s", _tmp3_);
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp3_);
+#line 227 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp1_);
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = app_dirs_get_thumbnailer_bin ();
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = g_file_get_path (_tmp5_);
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_file;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = g_strdup (_tmp7_);
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = g_new0 (gchar*, 2 + 1);
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_[0] = _tmp6_;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_[1] = _tmp8_;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10__length1 = 2;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp5_);
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv = _tmp10_;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv_length1 = _tmp10__length1;
+#line 228 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _argv_size_ = argv_length1;
+#line 3393 "VideoSupport.c"
+ {
+ gchar** _tmp11_ = NULL;
+ gint _tmp11__length1 = 0;
+ GPid _tmp12_ = 0;
+ gint _tmp13_ = 0;
+ GPid _tmp14_ = 0;
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = argv;
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11__length1 = argv_length1;
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_spawn_async_with_pipes (NULL, _tmp11_, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &_tmp12_, NULL, &_tmp13_, NULL, &_inner_error_);
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->thumbnailer_pid = _tmp12_;
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ child_stdout = _tmp13_;
+#line 231 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 3412 "VideoSupport.c"
+ goto __catch486_g_error;
+ }
+#line 234 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = self->priv->thumbnailer_pid;
+#line 234 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:234: Spawned thumbnailer, child pid: %d", (gint) _tmp14_);
+#line 3419 "VideoSupport.c"
+ }
+ goto __finally486;
+ __catch486_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ GPid _tmp17_ = 0;
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 236 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = e;
+#line 236 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = _tmp15_->message;
+#line 236 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:236: Error spawning process: %s", _tmp16_);
+#line 237 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = self->priv->thumbnailer_pid;
+#line 237 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp17_ != ((GPid) 0)) {
+#line 3442 "VideoSupport.c"
+ GPid _tmp18_ = 0;
+#line 238 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = self->priv->thumbnailer_pid;
+#line 238 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_spawn_close_pid (_tmp18_);
+#line 3448 "VideoSupport.c"
+ }
+#line 239 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 239 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 239 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
+#line 239 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3458 "VideoSupport.c"
+ }
+ __finally486:
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.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 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 230 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 3471 "VideoSupport.c"
+ }
+#line 243 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_timeout_add_full (G_PRIORITY_DEFAULT, VIDEO_READER_THUMBNAILER_TIMEOUT, _video_reader_on_thumbnailer_timer_gsource_func, video_reader_ref (self), video_reader_unref);
+#line 246 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ buf = NULL;
+#line 3477 "VideoSupport.c"
+ {
+ GUnixInputStream* unix_input = NULL;
+ gint _tmp19_ = 0;
+ GUnixInputStream* _tmp20_ = NULL;
+ GdkPixbuf* _tmp21_ = NULL;
+ GUnixInputStream* _tmp22_ = NULL;
+ GdkPixbuf* _tmp23_ = NULL;
+ GdkPixbuf* _tmp24_ = NULL;
+#line 248 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = child_stdout;
+#line 248 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = (GUnixInputStream*) g_unix_input_stream_new (_tmp19_, TRUE);
+#line 248 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ unix_input = _tmp20_;
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = unix_input;
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = gdk_pixbuf_new_from_stream (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, G_TYPE_INPUT_STREAM, GInputStream), NULL, &_inner_error_);
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = _tmp23_;
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (unix_input);
+#line 3502 "VideoSupport.c"
+ goto __catch487_g_error;
+ }
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = _tmp21_;
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = NULL;
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (buf);
+#line 249 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ buf = _tmp24_;
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp21_);
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (unix_input);
+#line 3517 "VideoSupport.c"
+ }
+ goto __finally487;
+ __catch487_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp25_ = NULL;
+ const gchar* _tmp26_ = NULL;
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 251 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = e;
+#line 251 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = _tmp25_->message;
+#line 251 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:251: Error creating pixbuf: %s", _tmp26_);
+#line 252 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (buf);
+#line 252 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ buf = NULL;
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 3541 "VideoSupport.c"
+ }
+ __finally487:
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (buf);
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.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 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 247 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 3556 "VideoSupport.c"
+ }
+#line 256 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ child_status = 0;
+#line 257 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = self->priv->thumbnailer_pid;
+#line 257 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp29_ = waitpid ((pid_t) _tmp27_, &_tmp28_, 0);
+#line 257 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ child_status = _tmp28_;
+#line 257 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ret_waitpid = (gint) _tmp29_;
+#line 258 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp30_ = ret_waitpid;
+#line 258 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp30_ < 0) {
+#line 3572 "VideoSupport.c"
+ gint _tmp31_ = 0;
+#line 259 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp31_ = ret_waitpid;
+#line 259 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:259: waitpid returned error code: %d", _tmp31_);
+#line 260 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (buf);
+#line 260 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ buf = NULL;
+#line 3582 "VideoSupport.c"
+ } else {
+ gint _tmp32_ = 0;
+ gint _tmp33_ = 0;
+#line 261 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp32_ = child_status;
+#line 261 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp33_ = WEXITSTATUS (_tmp32_);
+#line 261 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (0 != _tmp33_) {
+#line 3592 "VideoSupport.c"
+ gint _tmp34_ = 0;
+ gint _tmp35_ = 0;
+#line 262 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp34_ = child_status;
+#line 262 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = WEXITSTATUS (_tmp34_);
+#line 262 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:262: Thumbnailer exited with error code: %d", _tmp35_);
+#line 264 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (buf);
+#line 264 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ buf = NULL;
+#line 3605 "VideoSupport.c"
+ }
+ }
+#line 267 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp36_ = child_stdout;
+#line 267 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ close (_tmp36_);
+#line 268 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp37_ = self->priv->thumbnailer_pid;
+#line 268 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_spawn_close_pid (_tmp37_);
+#line 269 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->thumbnailer_pid = (GPid) 0;
+#line 270 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = buf;
+#line 270 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ argv = (_vala_array_free (argv, argv_length1, (GDestroyNotify) g_free), NULL);
+#line 270 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3624 "VideoSupport.c"
+}
+
+
+static gboolean video_reader_does_file_exist (VideoReader* self) {
+ gboolean result = FALSE;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ gboolean _tmp4_ = FALSE;
+#line 273 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), FALSE);
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->file;
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = g_file_get_path (_tmp0_);
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_file_test (_tmp2_, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_REGULAR);
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp2_);
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp4_;
+#line 274 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3653 "VideoSupport.c"
+}
+
+
+GdkPixbuf* video_reader_read_preview_frame (VideoReader* self) {
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ gboolean _tmp3_ = FALSE;
+ GFile* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gchar* _tmp6_ = NULL;
+ GdkPixbuf* _tmp7_ = NULL;
+ GdkPixbuf* _tmp8_ = NULL;
+ GdkPixbuf* _tmp10_ = NULL;
+ GdkPixbuf* _tmp11_ = NULL;
+#line 277 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), NULL);
+#line 278 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->preview_frame;
+#line 278 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_ != NULL) {
+#line 3674 "VideoSupport.c"
+ GdkPixbuf* _tmp1_ = NULL;
+ GdkPixbuf* _tmp2_ = NULL;
+#line 279 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->preview_frame;
+#line 279 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _g_object_ref0 (_tmp1_);
+#line 279 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 279 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3685 "VideoSupport.c"
+ }
+#line 281 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_reader_does_file_exist (self);
+#line 281 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp3_) {
+#line 282 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 282 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3695 "VideoSupport.c"
+ }
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->file;
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = g_file_get_path (_tmp4_);
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_;
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_reader_thumbnailer (self, _tmp6_);
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->preview_frame);
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->preview_frame = _tmp7_;
+#line 285 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp6_);
+#line 286 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->preview_frame;
+#line 286 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (NULL == _tmp8_) {
+#line 3715 "VideoSupport.c"
+ GdkPixbuf* _tmp9_ = NULL;
+#line 287 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = resources_get_noninterpretable_badge_pixbuf ();
+#line 287 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->preview_frame);
+#line 287 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->preview_frame = _tmp9_;
+#line 3723 "VideoSupport.c"
+ }
+#line 289 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->preview_frame;
+#line 289 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = _g_object_ref0 (_tmp10_);
+#line 289 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp11_;
+#line 289 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3733 "VideoSupport.c"
+}
+
+
+gdouble video_reader_read_clip_duration (VideoReader* self, GError** error) {
+ gdouble result = 0.0;
+ gdouble _tmp0_ = 0.0;
+ gdouble _tmp1_ = 0.0;
+ GError * _inner_error_ = NULL;
+#line 292 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), 0.0);
+#line 293 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->clip_duration;
+#line 293 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_ == VIDEO_READER_UNKNOWN_CLIP_DURATION) {
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_read_internal (self, &_inner_error_);
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == VIDEO_ERROR) {
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0.0;
+#line 3758 "VideoSupport.c"
+ } else {
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.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 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 294 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0.0;
+#line 3766 "VideoSupport.c"
+ }
+ }
+ }
+#line 296 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->clip_duration;
+#line 296 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 296 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3776 "VideoSupport.c"
+}
+
+
+VideoMetadata* video_reader_read_metadata (VideoReader* self, GError** error) {
+ VideoMetadata* result = NULL;
+ VideoMetadata* metadata = NULL;
+ VideoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+ GFile* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 299 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), NULL);
+#line 300 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_metadata_new ();
+#line 300 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ metadata = _tmp0_;
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->file;
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = g_file_get_path (_tmp1_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = g_file_new_for_path (_tmp3_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (metadata, TYPE_MEDIA_METADATA, MediaMetadata), _tmp5_, &_inner_error_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp5_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp3_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _media_metadata_unref0 (metadata);
+#line 301 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 3820 "VideoSupport.c"
+ }
+#line 303 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = metadata;
+#line 303 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3826 "VideoSupport.c"
+}
+
+
+GDateTime* video_reader_get_timestamp (VideoReader* self) {
+ GDateTime* result;
+ GDateTime* _tmp0_ = NULL;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_READER (self), NULL);
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->_timestamp;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 3841 "VideoSupport.c"
+}
+
+
+static gpointer _g_date_time_ref0 (gpointer self) {
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self ? g_date_time_ref (self) : NULL;
+#line 3848 "VideoSupport.c"
+}
+
+
+static void video_reader_set_timestamp (VideoReader* self, GDateTime* value) {
+ GDateTime* _tmp0_ = NULL;
+ GDateTime* _tmp1_ = NULL;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_READER (self));
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = value;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _g_date_time_ref0 (_tmp0_);
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_date_time_unref0 (self->priv->_timestamp);
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->_timestamp = _tmp1_;
+#line 3865 "VideoSupport.c"
+}
+
+
+static void value_video_reader_init (GValue* value) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 3872 "VideoSupport.c"
+}
+
+
+static void value_video_reader_free_value (GValue* value) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (value->data[0].v_pointer) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_unref (value->data[0].v_pointer);
+#line 3881 "VideoSupport.c"
+ }
+}
+
+
+static void value_video_reader_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (src_value->data[0].v_pointer) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = video_reader_ref (src_value->data[0].v_pointer);
+#line 3891 "VideoSupport.c"
+ } else {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 3895 "VideoSupport.c"
+ }
+}
+
+
+static gpointer value_video_reader_peek_pointer (const GValue* value) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 3903 "VideoSupport.c"
+}
+
+
+static gchar* value_video_reader_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (collect_values[0].v_pointer) {
+#line 3910 "VideoSupport.c"
+ VideoReader* object;
+ object = collect_values[0].v_pointer;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 3917 "VideoSupport.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.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 3921 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = video_reader_ref (object);
+#line 3925 "VideoSupport.c"
+ } else {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 3929 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 3933 "VideoSupport.c"
+}
+
+
+static gchar* value_video_reader_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ VideoReader** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!object_p) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 3944 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!value->data[0].v_pointer) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = NULL;
+#line 3950 "VideoSupport.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = value->data[0].v_pointer;
+#line 3954 "VideoSupport.c"
+ } else {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = video_reader_ref (value->data[0].v_pointer);
+#line 3958 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 3962 "VideoSupport.c"
+}
+
+
+GParamSpec* param_spec_video_reader (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ ParamSpecVideoReader* spec;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, TYPE_VIDEO_READER), NULL);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return G_PARAM_SPEC (spec);
+#line 3976 "VideoSupport.c"
+}
+
+
+gpointer value_get_video_reader (const GValue* value) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_READER), NULL);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 3985 "VideoSupport.c"
+}
+
+
+void value_set_video_reader (GValue* value, gpointer v_object) {
+ VideoReader* old;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_READER));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIDEO_READER));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_ref (value->data[0].v_pointer);
+#line 4005 "VideoSupport.c"
+ } else {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 4009 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_unref (old);
+#line 4015 "VideoSupport.c"
+ }
+}
+
+
+void value_take_video_reader (GValue* value, gpointer v_object) {
+ VideoReader* old;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_VIDEO_READER));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_VIDEO_READER));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 4034 "VideoSupport.c"
+ } else {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 4038 "VideoSupport.c"
+ }
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_unref (old);
+#line 4044 "VideoSupport.c"
+ }
+}
+
+
+static void video_reader_class_init (VideoReaderClass * klass) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_reader_parent_class = g_type_class_peek_parent (klass);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((VideoReaderClass *) klass)->finalize = video_reader_finalize;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_class_add_private (klass, sizeof (VideoReaderPrivate));
+#line 4056 "VideoSupport.c"
+}
+
+
+static void video_reader_instance_init (VideoReader * self) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv = VIDEO_READER_GET_PRIVATE (self);
+#line 45 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->clip_duration = VIDEO_READER_UNKNOWN_CLIP_DURATION;
+#line 46 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->preview_frame = NULL;
+#line 47 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->file = NULL;
+#line 48 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->thumbnailer_pid = (GPid) 0;
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->_timestamp = NULL;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->ref_count = 1;
+#line 4075 "VideoSupport.c"
+}
+
+
+static void video_reader_finalize (VideoReader* obj) {
+ VideoReader * self;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO_READER, VideoReader);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_handlers_destroy (self);
+#line 46 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->preview_frame);
+#line 47 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->file);
+#line 49 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_date_time_unref0 (self->priv->_timestamp);
+#line 4091 "VideoSupport.c"
+}
+
+
+GType video_reader_get_type (void) {
+ static volatile gsize video_reader_type_id__volatile = 0;
+ if (g_once_init_enter (&video_reader_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { value_video_reader_init, value_video_reader_free_value, value_video_reader_copy_value, value_video_reader_peek_pointer, "p", value_video_reader_collect_value, "p", value_video_reader_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (VideoReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoReader), 0, (GInstanceInitFunc) video_reader_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 video_reader_type_id;
+ video_reader_type_id = g_type_register_fundamental (g_type_fundamental_next (), "VideoReader", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&video_reader_type_id__volatile, video_reader_type_id);
+ }
+ return video_reader_type_id__volatile;
+}
+
+
+gpointer video_reader_ref (gpointer instance) {
+ VideoReader* self;
+ self = instance;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return instance;
+#line 4116 "VideoSupport.c"
+}
+
+
+void video_reader_unref (gpointer instance) {
+ VideoReader* self;
+ self = instance;
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ VIDEO_READER_GET_CLASS (self)->finalize (self);
+#line 38 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 4129 "VideoSupport.c"
+ }
+}
+
+
+static gpointer _video_row_ref0 (gpointer self) {
+#line 351 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self ? video_row_ref (self) : NULL;
+#line 4137 "VideoSupport.c"
+}
+
+
+Video* video_construct (GType object_type, VideoRow* row) {
+ Video * self = NULL;
+ VideoRow* _tmp0_ = NULL;
+ VideoRow* _tmp1_ = NULL;
+ VideoRow* _tmp2_ = NULL;
+ VideoRow* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+ VideoRow* _tmp7_ = NULL;
+ guint64 _tmp8_ = 0ULL;
+#line 350 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_ROW (row), NULL);
+#line 350 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = (Video*) video_source_construct (object_type);
+#line 351 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = row;
+#line 351 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _video_row_ref0 (_tmp0_);
+#line 351 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_row_unref0 (self->priv->backing_row);
+#line 351 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->backing_row = _tmp1_;
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->title;
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = media_source_prep_title (_tmp4_);
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp2_->title);
+#line 354 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_->title = _tmp5_;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = row;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_->flags;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if ((_tmp8_ & VIDEO_FLAG_TRASH) != ((guint64) 0)) {
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = TRUE;
+#line 4184 "VideoSupport.c"
+ } else {
+ VideoRow* _tmp9_ = NULL;
+ guint64 _tmp10_ = 0ULL;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = row;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_->flags;
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = (_tmp10_ & VIDEO_FLAG_OFFLINE) != ((guint64) 0);
+#line 4194 "VideoSupport.c"
+ }
+#line 356 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp6_) {
+#line 4198 "VideoSupport.c"
+ VideoSourceCollection* _tmp11_ = NULL;
+ VideoRow* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+#line 357 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = video_global;
+#line 357 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = row;
+#line 357 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_->backlinks;
+#line 357 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_source_rehydrate_backlinks (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_SOURCE, DataSource), G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp13_);
+#line 4210 "VideoSupport.c"
+ }
+#line 350 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self;
+#line 4214 "VideoSupport.c"
+}
+
+
+Video* video_new (VideoRow* row) {
+#line 350 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return video_construct (TYPE_VIDEO, row);
+#line 4221 "VideoSupport.c"
+}
+
+
+void video_init (ProgressMonitor monitor, void* monitor_target) {
+ gchar** fake_args = NULL;
+ gchar** _tmp0_ = NULL;
+ gint fake_args_length1 = 0;
+ gint _fake_args_size_ = 0;
+ gchar** fake_unowned_args = NULL;
+ gchar** _tmp1_ = NULL;
+ gint _tmp1__length1 = 0;
+ gint fake_unowned_args_length1 = 0;
+ gint _fake_unowned_args_size_ = 0;
+ gint saved_state = 0;
+ ConfigFacade* _tmp2_ = NULL;
+ ConfigFacade* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ gint _tmp5_ = 0;
+ GstRegistry* _tmp6_ = NULL;
+ guint32 _tmp7_ = 0U;
+ gint _tmp8_ = 0;
+ VideoSourceCollection* _tmp11_ = NULL;
+ GeeArrayList* all = NULL;
+ VideoTable* _tmp12_ = NULL;
+ VideoTable* _tmp13_ = NULL;
+ GeeArrayList* _tmp14_ = NULL;
+ GeeArrayList* _tmp15_ = NULL;
+ GeeArrayList* all_videos = NULL;
+ GeeArrayList* _tmp16_ = NULL;
+ GeeArrayList* trashed_videos = NULL;
+ GeeArrayList* _tmp17_ = NULL;
+ GeeArrayList* offline_videos = NULL;
+ GeeArrayList* _tmp18_ = NULL;
+ gint count = 0;
+ GeeArrayList* _tmp19_ = NULL;
+ gint _tmp20_ = 0;
+ gint _tmp21_ = 0;
+ VideoSourceCollection* _tmp48_ = NULL;
+ GeeArrayList* _tmp49_ = NULL;
+ VideoSourceCollection* _tmp50_ = NULL;
+ GeeArrayList* _tmp51_ = NULL;
+ VideoSourceCollection* _tmp52_ = NULL;
+ GeeArrayList* _tmp53_ = NULL;
+ GeeCollection* _tmp54_ = NULL;
+ GeeCollection* _tmp55_ = NULL;
+#line 364 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpreter_state_changed = FALSE;
+#line 365 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_current_state = -1;
+#line 366 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_normal_regen_complete = FALSE;
+#line 367 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_offline_regen_complete = FALSE;
+#line 371 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = g_new0 (gchar*, 0 + 1);
+#line 371 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ fake_args = _tmp0_;
+#line 371 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ fake_args_length1 = 0;
+#line 371 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _fake_args_size_ = fake_args_length1;
+#line 372 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = fake_args;
+#line 372 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1__length1 = fake_args_length1;
+#line 372 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ fake_unowned_args = _tmp1_;
+#line 372 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ fake_unowned_args_length1 = _tmp1__length1;
+#line 372 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _fake_unowned_args_size_ = fake_unowned_args_length1;
+#line 373 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gst_init (&fake_unowned_args_length1, &fake_unowned_args);
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = config_facade_get_instance ();
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = configuration_facade_get_video_interpreter_state_cookie (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade));
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp3_);
+#line 375 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ saved_state = _tmp5_;
+#line 376 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = gst_registry_get ();
+#line 376 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = gst_registry_get_feature_list_cookie (_tmp6_);
+#line 376 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_current_state = (gint) _tmp7_;
+#line 377 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = saved_state;
+#line 377 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp8_ == CONFIG_FACADE_NO_VIDEO_INTERPRETER_STATE) {
+#line 378 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:378: interpreter state cookie not found; assuming al" \
+"l video thumbnails are out of date");
+#line 379 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpreter_state_changed = TRUE;
+#line 4321 "VideoSupport.c"
+ } else {
+ gint _tmp9_ = 0;
+ gint _tmp10_ = 0;
+#line 380 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = saved_state;
+#line 380 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video_current_state;
+#line 380 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp9_ != _tmp10_) {
+#line 381 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:381: interpreter state has changed; video thumbnails" \
+" may be out of date");
+#line 382 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpreter_state_changed = TRUE;
+#line 4335 "VideoSupport.c"
+ }
+ }
+#line 385 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = video_source_collection_new ();
+#line 385 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _data_collection_unref0 (video_global);
+#line 385 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_global = _tmp11_;
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = video_table_get_instance ();
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_;
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = video_table_get_all (_tmp13_);
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = _tmp14_;
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp13_);
+#line 387 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ all = _tmp15_;
+#line 388 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
+#line 388 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ all_videos = _tmp16_;
+#line 389 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
+#line 389 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ trashed_videos = _tmp17_;
+#line 390 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = gee_array_list_new (TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
+#line 390 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ offline_videos = _tmp18_;
+#line 391 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = all;
+#line 391 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 391 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = _tmp20_;
+#line 391 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ count = _tmp21_;
+#line 4376 "VideoSupport.c"
+ {
+ gint ctr = 0;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ctr = 0;
+#line 4381 "VideoSupport.c"
+ {
+ gboolean _tmp22_ = FALSE;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = TRUE;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 4388 "VideoSupport.c"
+ gint _tmp24_ = 0;
+ gint _tmp25_ = 0;
+ Video* video = NULL;
+ GeeArrayList* _tmp26_ = NULL;
+ gint _tmp27_ = 0;
+ gpointer _tmp28_ = NULL;
+ VideoRow* _tmp29_ = NULL;
+ Video* _tmp30_ = NULL;
+ Video* _tmp31_ = NULL;
+ gboolean _tmp32_ = FALSE;
+ Video* _tmp34_ = NULL;
+ gboolean _tmp35_ = FALSE;
+ ProgressMonitor _tmp44_ = NULL;
+ void* _tmp44__target = NULL;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp22_) {
+#line 4405 "VideoSupport.c"
+ gint _tmp23_ = 0;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = ctr;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ctr = _tmp23_ + 1;
+#line 4411 "VideoSupport.c"
+ }
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = FALSE;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = ctr;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = count;
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!(_tmp24_ < _tmp25_)) {
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 4423 "VideoSupport.c"
+ }
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = all;
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = ctr;
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp28_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp27_);
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp29_ = (VideoRow*) _tmp28_;
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp30_ = video_new (_tmp29_);
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp31_ = _tmp30_;
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_row_unref0 (_tmp29_);
+#line 393 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = _tmp31_;
+#line 395 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp32_ = video_interpreter_state_changed;
+#line 395 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp32_) {
+#line 4445 "VideoSupport.c"
+ Video* _tmp33_ = NULL;
+#line 396 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp33_ = video;
+#line 396 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_set_is_interpretable (_tmp33_, FALSE);
+#line 4451 "VideoSupport.c"
+ }
+#line 398 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp34_ = video;
+#line 398 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = media_source_is_trashed (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 398 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp35_) {
+#line 4459 "VideoSupport.c"
+ GeeArrayList* _tmp36_ = NULL;
+ Video* _tmp37_ = NULL;
+#line 399 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp36_ = trashed_videos;
+#line 399 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp37_ = video;
+#line 399 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp37_);
+#line 4468 "VideoSupport.c"
+ } else {
+ Video* _tmp38_ = NULL;
+ gboolean _tmp39_ = FALSE;
+#line 400 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp38_ = video;
+#line 400 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp39_ = media_source_is_offline (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 400 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp39_) {
+#line 4478 "VideoSupport.c"
+ GeeArrayList* _tmp40_ = NULL;
+ Video* _tmp41_ = NULL;
+#line 401 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp40_ = offline_videos;
+#line 401 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp41_ = video;
+#line 401 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp40_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp41_);
+#line 4487 "VideoSupport.c"
+ } else {
+ GeeArrayList* _tmp42_ = NULL;
+ Video* _tmp43_ = NULL;
+#line 403 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp42_ = all_videos;
+#line 403 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp43_ = video;
+#line 403 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp42_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp43_);
+#line 4497 "VideoSupport.c"
+ }
+ }
+#line 405 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp44_ = monitor;
+#line 405 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp44__target = monitor_target;
+#line 405 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp44_ != NULL) {
+#line 4506 "VideoSupport.c"
+ ProgressMonitor _tmp45_ = NULL;
+ void* _tmp45__target = NULL;
+ gint _tmp46_ = 0;
+ gint _tmp47_ = 0;
+#line 406 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp45_ = monitor;
+#line 406 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp45__target = monitor_target;
+#line 406 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp46_ = ctr;
+#line 406 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp47_ = count;
+#line 406 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp45_ ((guint64) _tmp46_, (guint64) _tmp47_, TRUE, _tmp45__target);
+#line 4521 "VideoSupport.c"
+ }
+#line 392 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 4525 "VideoSupport.c"
+ }
+ }
+ }
+#line 409 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp48_ = video_global;
+#line 409 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp49_ = trashed_videos;
+#line 409 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_source_collection_add_many_to_trash (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp49_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 410 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp50_ = video_global;
+#line 410 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp51_ = offline_videos;
+#line 410 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_source_collection_add_many_to_offline (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp51_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 411 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp52_ = video_global;
+#line 411 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp53_ = all_videos;
+#line 411 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp54_ = data_collection_add_many (G_TYPE_CHECK_INSTANCE_CAST (_tmp52_, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp53_, GEE_TYPE_COLLECTION, GeeCollection), NULL, NULL);
+#line 411 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp55_ = _tmp54_;
+#line 411 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp55_);
+#line 360 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (offline_videos);
+#line 360 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (trashed_videos);
+#line 360 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (all_videos);
+#line 360 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (all);
+#line 360 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ fake_args = (_vala_array_free (fake_args, fake_args_length1, (GDestroyNotify) g_free), NULL);
+#line 4561 "VideoSupport.c"
+}
+
+
+gboolean video_has_interpreter_state_changed (void) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 415 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_interpreter_state_changed;
+#line 415 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 415 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4574 "VideoSupport.c"
+}
+
+
+void video_notify_normal_thumbs_regenerated (void) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 419 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_normal_regen_complete;
+#line 419 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_) {
+#line 420 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 4588 "VideoSupport.c"
+ }
+#line 422 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:422: normal video thumbnail regeneration completed");
+#line 424 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_normal_regen_complete = TRUE;
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video_normal_regen_complete;
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_) {
+#line 4598 "VideoSupport.c"
+ gboolean _tmp3_ = FALSE;
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_offline_regen_complete;
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp3_;
+#line 4604 "VideoSupport.c"
+ } else {
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = FALSE;
+#line 4608 "VideoSupport.c"
+ }
+#line 425 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_) {
+#line 426 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_save_interpreter_state ();
+#line 4614 "VideoSupport.c"
+ }
+}
+
+
+void video_notify_offline_thumbs_regenerated (void) {
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+#line 430 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_offline_regen_complete;
+#line 430 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_) {
+#line 431 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 4629 "VideoSupport.c"
+ }
+#line 433 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:433: offline video thumbnail regeneration completed");
+#line 435 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_offline_regen_complete = TRUE;
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video_normal_regen_complete;
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_) {
+#line 4639 "VideoSupport.c"
+ gboolean _tmp3_ = FALSE;
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_offline_regen_complete;
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp3_;
+#line 4645 "VideoSupport.c"
+ } else {
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = FALSE;
+#line 4649 "VideoSupport.c"
+ }
+#line 436 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_) {
+#line 437 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_save_interpreter_state ();
+#line 4655 "VideoSupport.c"
+ }
+}
+
+
+static void video_save_interpreter_state (void) {
+ gboolean _tmp0_ = FALSE;
+#line 441 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_interpreter_state_changed;
+#line 441 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_) {
+#line 4666 "VideoSupport.c"
+ ConfigFacade* _tmp1_ = NULL;
+ ConfigFacade* _tmp2_ = NULL;
+ gint _tmp3_ = 0;
+#line 442 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:442: saving video interpreter state to configuration" \
+" system");
+#line 444 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = config_facade_get_instance ();
+#line 444 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 444 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_current_state;
+#line 444 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ configuration_facade_set_video_interpreter_state_cookie (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_CONFIGURATION_FACADE, ConfigurationFacade), _tmp3_);
+#line 444 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 445 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpreter_state_changed = FALSE;
+#line 4684 "VideoSupport.c"
+ }
+}
+
+
+void video_terminate (void) {
+}
+
+
+ExporterUI* video_export_many (GeeCollection* videos, ExporterCompletionCallback done, void* done_target, gboolean export_in_place) {
+ ExporterUI* result = NULL;
+ GeeCollection* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ gint _tmp2_ = 0;
+ gboolean _tmp3_ = FALSE;
+ GeeCollection* _tmp13_ = NULL;
+ gint _tmp14_ = 0;
+ gint _tmp15_ = 0;
+ GFile* export_dir = NULL;
+ const gchar* _tmp39_ = NULL;
+ GFile* _tmp40_ = NULL;
+ GFile* _tmp41_ = NULL;
+ ExporterUI* exporter = NULL;
+ GeeCollection* _tmp42_ = NULL;
+ GFile* _tmp43_ = NULL;
+ Scaling _tmp44_ = {0};
+ ExportFormatParameters _tmp45_ = {0};
+ Exporter* _tmp46_ = NULL;
+ Exporter* _tmp47_ = NULL;
+ ExporterUI* _tmp48_ = NULL;
+ ExporterUI* _tmp49_ = NULL;
+ ExporterUI* _tmp50_ = NULL;
+ ExporterCompletionCallback _tmp51_ = NULL;
+ void* _tmp51__target = NULL;
+ GError * _inner_error_ = NULL;
+#line 452 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (GEE_IS_COLLECTION (videos), NULL);
+#line 454 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = videos;
+#line 454 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = gee_collection_get_size (_tmp0_);
+#line 454 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 454 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_ == 0) {
+#line 455 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 455 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4733 "VideoSupport.c"
+ }
+#line 458 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = export_in_place;
+#line 458 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp3_) {
+#line 4739 "VideoSupport.c"
+ ExporterUI* temp_exporter = NULL;
+ GeeCollection* _tmp4_ = NULL;
+ Scaling _tmp5_ = {0};
+ ExportFormatParameters _tmp6_ = {0};
+ Exporter* _tmp7_ = NULL;
+ Exporter* _tmp8_ = NULL;
+ ExporterUI* _tmp9_ = NULL;
+ ExporterUI* _tmp10_ = NULL;
+ ExporterUI* _tmp11_ = NULL;
+ ExporterCompletionCallback _tmp12_ = NULL;
+ void* _tmp12__target = NULL;
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = videos;
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ scaling_for_original (&_tmp5_);
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ export_format_parameters_unmodified (&_tmp6_);
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = exporter_new_for_temp_file (_tmp4_, &_tmp5_, &_tmp6_);
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = exporter_ui_new (_tmp8_);
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_;
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp8_);
+#line 459 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ temp_exporter = _tmp10_;
+#line 461 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = temp_exporter;
+#line 461 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = done;
+#line 461 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12__target = done_target;
+#line 461 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exporter_ui_export (_tmp11_, _tmp12_, _tmp12__target);
+#line 462 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = temp_exporter;
+#line 462 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4781 "VideoSupport.c"
+ }
+#line 466 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = videos;
+#line 466 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = gee_collection_get_size (_tmp13_);
+#line 466 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = _tmp14_;
+#line 466 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp15_ == 1) {
+#line 4791 "VideoSupport.c"
+ Video* video = NULL;
+ GFile* save_as = NULL;
+ Video* _tmp24_ = NULL;
+ gchar* _tmp25_ = NULL;
+ gchar* _tmp26_ = NULL;
+ GFile* _tmp27_ = NULL;
+ GFile* _tmp28_ = NULL;
+ GFile* _tmp29_ = NULL;
+#line 467 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = NULL;
+#line 4802 "VideoSupport.c"
+ {
+ GeeIterator* _v_it = NULL;
+ GeeCollection* _tmp16_ = NULL;
+ GeeIterator* _tmp17_ = NULL;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = videos;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _v_it = _tmp17_;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 4815 "VideoSupport.c"
+ GeeIterator* _tmp18_ = NULL;
+ gboolean _tmp19_ = FALSE;
+ Video* v = NULL;
+ GeeIterator* _tmp20_ = NULL;
+ gpointer _tmp21_ = NULL;
+ Video* _tmp22_ = NULL;
+ Video* _tmp23_ = NULL;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = _v_it;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = gee_iterator_next (_tmp18_);
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp19_) {
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 4831 "VideoSupport.c"
+ }
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = _v_it;
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = gee_iterator_get (_tmp20_);
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ v = (Video*) _tmp21_;
+#line 469 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = v;
+#line 469 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = _g_object_ref0 (_tmp22_);
+#line 469 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 469 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = _tmp23_;
+#line 470 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (v);
+#line 470 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 4851 "VideoSupport.c"
+ }
+#line 468 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_v_it);
+#line 4855 "VideoSupport.c"
+ }
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = video;
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = media_source_get_basename (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = _tmp25_;
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = export_ui_choose_file (_tmp26_);
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp28_ = _tmp27_;
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp26_);
+#line 473 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ save_as = _tmp28_;
+#line 474 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp29_ = save_as;
+#line 474 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp29_ == NULL) {
+#line 475 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 475 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (save_as);
+#line 475 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 475 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4883 "VideoSupport.c"
+ }
+ {
+ AppWindow* _tmp30_ = NULL;
+ AppWindow* _tmp31_ = NULL;
+ Video* _tmp32_ = NULL;
+ GFile* _tmp33_ = NULL;
+ AppWindow* _tmp34_ = NULL;
+ AppWindow* _tmp35_ = NULL;
+#line 478 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp30_ = app_window_get_instance ();
+#line 478 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp31_ = _tmp30_;
+#line 478 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ page_window_set_busy_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, TYPE_PAGE_WINDOW, PageWindow));
+#line 478 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp31_);
+#line 479 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp32_ = video;
+#line 479 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp33_ = save_as;
+#line 479 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_export (_tmp32_, _tmp33_, &_inner_error_);
+#line 479 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 4908 "VideoSupport.c"
+ goto __catch488_g_error;
+ }
+#line 480 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp34_ = app_window_get_instance ();
+#line 480 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp35_ = _tmp34_;
+#line 480 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_PAGE_WINDOW, PageWindow));
+#line 480 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp35_);
+#line 4919 "VideoSupport.c"
+ }
+ goto __finally488;
+ __catch488_g_error:
+ {
+ GError* err = NULL;
+ AppWindow* _tmp36_ = NULL;
+ AppWindow* _tmp37_ = NULL;
+ GFile* _tmp38_ = NULL;
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 482 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp36_ = app_window_get_instance ();
+#line 482 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp37_ = _tmp36_;
+#line 482 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ page_window_set_normal_cursor (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, TYPE_PAGE_WINDOW, PageWindow));
+#line 482 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp37_);
+#line 483 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp38_ = save_as;
+#line 483 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ export_error_dialog (_tmp38_, FALSE);
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 4946 "VideoSupport.c"
+ }
+ __finally488:
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (save_as);
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.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 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 477 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 4961 "VideoSupport.c"
+ }
+#line 486 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 486 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (save_as);
+#line 486 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 486 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4971 "VideoSupport.c"
+ }
+#line 490 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp39_ = _ ("Export Videos");
+#line 490 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp40_ = export_ui_choose_dir (_tmp39_);
+#line 490 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ export_dir = _tmp40_;
+#line 491 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp41_ = export_dir;
+#line 491 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp41_ == NULL) {
+#line 492 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 492 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (export_dir);
+#line 492 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 4989 "VideoSupport.c"
+ }
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp42_ = videos;
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp43_ = export_dir;
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ scaling_for_original (&_tmp44_);
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ export_format_parameters_unmodified (&_tmp45_);
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp46_ = exporter_new (_tmp42_, _tmp43_, &_tmp44_, &_tmp45_, FALSE);
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp47_ = _tmp46_;
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp48_ = exporter_ui_new (_tmp47_);
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp49_ = _tmp48_;
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp47_);
+#line 494 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exporter = _tmp49_;
+#line 496 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp50_ = exporter;
+#line 496 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp51_ = done;
+#line 496 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp51__target = done_target;
+#line 496 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ exporter_ui_export (_tmp50_, _tmp51_, _tmp51__target);
+#line 498 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = exporter;
+#line 498 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (export_dir);
+#line 498 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5025 "VideoSupport.c"
+}
+
+
+static void video_real_commit_backlinks (DataSource* base, SourceCollection* sources, const gchar* backlinks) {
+ Video * self;
+ GError * _inner_error_ = NULL;
+#line 501 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 501 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((sources == NULL) || IS_SOURCE_COLLECTION (sources));
+#line 5036 "VideoSupport.c"
+ {
+ VideoTable* _tmp0_ = NULL;
+ VideoTable* _tmp1_ = NULL;
+ VideoID _tmp2_ = {0};
+ const gchar* _tmp3_ = NULL;
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_table_get_instance ();
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp2_);
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = backlinks;
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_update_backlinks (_tmp1_, &_tmp2_, _tmp3_, &_inner_error_);
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp1_);
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 5058 "VideoSupport.c"
+ goto __catch489_database_error;
+ }
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 503 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5067 "VideoSupport.c"
+ }
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5075 "VideoSupport.c"
+ {
+ VideoRow* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ gchar* _tmp7_ = NULL;
+#line 505 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 505 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = backlinks;
+#line 505 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = g_strdup (_tmp6_);
+#line 505 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp5_->backlinks);
+#line 505 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_->backlinks = _tmp7_;
+#line 5090 "VideoSupport.c"
+ }
+ __finally490:
+ {
+ VideoRow* _tmp8_ = NULL;
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->backing_row;
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5099 "VideoSupport.c"
+ }
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 5105 "VideoSupport.c"
+ goto __catch489_database_error;
+ }
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 504 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5114 "VideoSupport.c"
+ }
+ }
+ }
+ goto __finally489;
+ __catch489_database_error:
+ {
+ GError* err = NULL;
+ gchar* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ GError* _tmp11_ = NULL;
+ const gchar* _tmp12_ = NULL;
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_;
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = err;
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_->message;
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_warning ("VideoSupport.vala:508: Unable to update link state for %s: %s", _tmp10_, _tmp12_);
+#line 508 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp10_);
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 5144 "VideoSupport.c"
+ }
+ __finally489:
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.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 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 502 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5155 "VideoSupport.c"
+ }
+}
+
+
+static gboolean video_real_set_event_id (MediaSource* base, EventID* event_id) {
+ Video * self;
+ gboolean result = FALSE;
+ GError * _inner_error_ = NULL;
+#line 512 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 512 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (event_id != NULL, FALSE);
+#line 5168 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5175 "VideoSupport.c"
+ {
+ gboolean committed = FALSE;
+ VideoTable* _tmp1_ = NULL;
+ VideoTable* _tmp2_ = NULL;
+ VideoRow* _tmp3_ = NULL;
+ VideoID _tmp4_ = {0};
+ EventID _tmp5_ = {0};
+ gboolean _tmp6_ = FALSE;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_table_get_instance ();
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->video_id;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = *event_id;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = video_table_set_event (_tmp2_, &_tmp4_, &_tmp5_);
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_;
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp2_);
+#line 514 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ committed = _tmp7_;
+#line 516 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = committed;
+#line 516 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp8_) {
+#line 5208 "VideoSupport.c"
+ VideoRow* _tmp9_ = NULL;
+ EventID _tmp10_ = {0};
+#line 517 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->priv->backing_row;
+#line 517 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = *event_id;
+#line 517 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_->event_id = _tmp10_;
+#line 5217 "VideoSupport.c"
+ }
+#line 519 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = committed;
+#line 5221 "VideoSupport.c"
+ {
+ VideoRow* _tmp11_ = NULL;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = self->priv->backing_row;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5228 "VideoSupport.c"
+ }
+#line 519 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5232 "VideoSupport.c"
+ }
+ __finally491:
+ {
+ VideoRow* _tmp12_ = NULL;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5241 "VideoSupport.c"
+ }
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.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 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 513 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 5249 "VideoSupport.c"
+ }
+}
+
+
+gboolean video_is_duplicate (GFile* file, const gchar* full_md5) {
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+ GFile* _tmp1_ = NULL;
+ VideoTable* _tmp3_ = NULL;
+ VideoTable* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ const gchar* _tmp6_ = NULL;
+ gboolean _tmp7_ = FALSE;
+ gboolean _tmp8_ = FALSE;
+#line 523 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail ((file == NULL) || G_IS_FILE (file), FALSE);
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = file;
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_ != NULL) {
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = TRUE;
+#line 5272 "VideoSupport.c"
+ } else {
+ const gchar* _tmp2_ = NULL;
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = full_md5;
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = _tmp2_ != NULL;
+#line 5279 "VideoSupport.c"
+ }
+#line 524 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_assert (_tmp0_, "file != null || full_md5 != null");
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_table_get_instance ();
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = file;
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = full_md5;
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_table_has_duplicate (_tmp4_, _tmp5_, _tmp6_);
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp4_);
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp8_;
+#line 526 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5301 "VideoSupport.c"
+}
+
+
+ImportResult video_import_create (VideoImportParams* params, Video** video) {
+ Video* _vala_video = NULL;
+ ImportResult result = 0;
+ VideoImportParams* _tmp8_ = NULL;
+ VideoRow* _tmp9_ = NULL;
+ Video* _tmp10_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 532 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_IMPORT_PARAMS (params), 0);
+#line 533 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_vala_video);
+#line 533 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_video = NULL;
+#line 5318 "VideoSupport.c"
+ {
+ VideoID _tmp0_ = {0};
+ VideoTable* _tmp1_ = NULL;
+ VideoTable* _tmp2_ = NULL;
+ VideoImportParams* _tmp3_ = NULL;
+ VideoRow* _tmp4_ = NULL;
+ VideoID _tmp5_ = {0};
+ VideoID _tmp6_ = {0};
+ gboolean _tmp7_ = FALSE;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_table_get_instance ();
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = params;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->row;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_add (_tmp2_, _tmp4_, &_tmp5_, &_inner_error_);
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp2_);
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = _tmp6_;
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 5348 "VideoSupport.c"
+ goto __catch492_database_error;
+ }
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 5357 "VideoSupport.c"
+ }
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_id_is_invalid (&_tmp0_);
+#line 537 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp7_) {
+#line 538 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_DATABASE_ERROR;
+#line 538 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (video) {
+#line 538 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *video = _vala_video;
+#line 5369 "VideoSupport.c"
+ } else {
+#line 538 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_vala_video);
+#line 5373 "VideoSupport.c"
+ }
+#line 538 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5377 "VideoSupport.c"
+ }
+ }
+ goto __finally492;
+ __catch492_database_error:
+ {
+ GError* err = NULL;
+#line 536 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 536 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_DATABASE_ERROR;
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (video) {
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *video = _vala_video;
+#line 5396 "VideoSupport.c"
+ } else {
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_vala_video);
+#line 5400 "VideoSupport.c"
+ }
+#line 540 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5404 "VideoSupport.c"
+ }
+ __finally492:
+#line 536 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 536 "/home/jens/Source/shotwell/src/VideoSupport.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 536 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 536 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 5415 "VideoSupport.c"
+ }
+#line 544 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = params;
+#line 544 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_->row;
+#line 544 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video_new (_tmp9_);
+#line 544 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_vala_video);
+#line 544 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_video = _tmp10_;
+#line 546 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = IMPORT_RESULT_SUCCESS;
+#line 546 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (video) {
+#line 546 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *video = _vala_video;
+#line 5433 "VideoSupport.c"
+ } else {
+#line 546 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_vala_video);
+#line 5437 "VideoSupport.c"
+ }
+#line 546 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5441 "VideoSupport.c"
+}
+
+
+void video_import_failed (Video* video) {
+ GError * _inner_error_ = NULL;
+#line 549 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (video));
+#line 5449 "VideoSupport.c"
+ {
+ VideoTable* _tmp0_ = NULL;
+ VideoTable* _tmp1_ = NULL;
+ Video* _tmp2_ = NULL;
+ VideoID _tmp3_ = {0};
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_table_get_instance ();
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video;
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (_tmp2_, &_tmp3_);
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_remove (_tmp1_, &_tmp3_, &_inner_error_);
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp1_);
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 5471 "VideoSupport.c"
+ goto __catch493_database_error;
+ }
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 551 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5480 "VideoSupport.c"
+ }
+ }
+ goto __finally493;
+ __catch493_database_error:
+ {
+ GError* err = NULL;
+ GError* _tmp4_ = NULL;
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 553 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = err;
+#line 553 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp4_);
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 5498 "VideoSupport.c"
+ }
+ __finally493:
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.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 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 550 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5509 "VideoSupport.c"
+ }
+}
+
+
+static BackingFileState** video_real_get_backing_files_state (MediaSource* base, int* result_length1) {
+ Video * self;
+ BackingFileState** result = NULL;
+ BackingFileState** backing = NULL;
+ BackingFileState** _tmp0_ = NULL;
+ gint backing_length1 = 0;
+ gint _backing_size_ = 0;
+ BackingFileState** _tmp13_ = NULL;
+ gint _tmp13__length1 = 0;
+ GError * _inner_error_ = NULL;
+#line 557 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 558 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = g_new0 (BackingFileState*, 1 + 1);
+#line 558 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ backing = _tmp0_;
+#line 558 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ backing_length1 = 1;
+#line 558 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _backing_size_ = backing_length1;
+#line 5534 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5541 "VideoSupport.c"
+ {
+ VideoRow* _tmp2_ = NULL;
+ const gchar* _tmp3_ = NULL;
+ VideoRow* _tmp4_ = NULL;
+ gint64 _tmp5_ = 0LL;
+ VideoRow* _tmp6_ = NULL;
+ time_t _tmp7_ = 0;
+ VideoRow* _tmp8_ = NULL;
+ const gchar* _tmp9_ = NULL;
+ BackingFileState* _tmp10_ = NULL;
+ BackingFileState* _tmp11_ = NULL;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_->filepath;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_->filesize;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_->timestamp;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->backing_row;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_->md5;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = backing_file_state_new (_tmp3_, _tmp5_, _tmp7_, _tmp9_);
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _backing_file_state_unref0 (backing[0]);
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ backing[0] = _tmp10_;
+#line 560 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = backing[0];
+#line 5577 "VideoSupport.c"
+ }
+ __finally494:
+ {
+ VideoRow* _tmp12_ = NULL;
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5586 "VideoSupport.c"
+ }
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ backing = (_vala_array_free (backing, backing_length1, (GDestroyNotify) backing_file_state_unref), NULL);
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.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 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 559 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 5598 "VideoSupport.c"
+ }
+ }
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = backing;
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13__length1 = backing_length1;
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (result_length1) {
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result_length1 = _tmp13__length1;
+#line 5609 "VideoSupport.c"
+ }
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp13_;
+#line 564 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5615 "VideoSupport.c"
+}
+
+
+static GdkPixbuf* video_real_get_thumbnail (ThumbnailSource* base, gint scale, GError** error) {
+ Video * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ gint _tmp1_ = 0;
+ GdkPixbuf* _tmp2_ = NULL;
+ GdkPixbuf* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 567 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = scale;
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = thumbnail_cache_fetch (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), _tmp1_, &_inner_error_);
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 5641 "VideoSupport.c"
+ }
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp0_;
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = NULL;
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp0_);
+#line 568 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5653 "VideoSupport.c"
+}
+
+
+static gchar* video_real_get_master_md5 (MediaSource* base) {
+ Video * self;
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 571 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 5663 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5670 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 573 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 573 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->md5;
+#line 573 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 573 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 5683 "VideoSupport.c"
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5690 "VideoSupport.c"
+ }
+#line 573 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5694 "VideoSupport.c"
+ }
+ __finally495:
+ {
+ VideoRow* _tmp5_ = NULL;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5703 "VideoSupport.c"
+ }
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.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 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 572 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 5711 "VideoSupport.c"
+ }
+}
+
+
+static GdkPixbuf* video_real_get_preview_pixbuf (MediaSource* base, Scaling* scaling, GError** error) {
+ Video * self;
+ GdkPixbuf* result = NULL;
+ GdkPixbuf* pixbuf = NULL;
+ GdkPixbuf* _tmp0_ = NULL;
+ GdkPixbuf* _tmp1_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 577 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 577 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (scaling != NULL, NULL);
+#line 578 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = thumbnail_source_get_thumbnail (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), (gint) THUMBNAIL_CACHE_SIZE_BIG, &_inner_error_);
+#line 578 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ pixbuf = _tmp0_;
+#line 578 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 578 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 578 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 5737 "VideoSupport.c"
+ }
+#line 580 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = scaling_perform_on_pixbuf (scaling, pixbuf, GDK_INTERP_NEAREST, TRUE);
+#line 580 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 580 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (pixbuf);
+#line 580 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5747 "VideoSupport.c"
+}
+
+
+static GdkPixbuf* video_real_create_thumbnail (ThumbnailSource* base, gint scale, GError** error) {
+ Video * self;
+ GdkPixbuf* result = NULL;
+ VideoReader* reader = NULL;
+ GFile* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ VideoReader* _tmp2_ = NULL;
+ VideoReader* _tmp3_ = NULL;
+ GdkPixbuf* frame = NULL;
+ VideoReader* _tmp4_ = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ GdkPixbuf* _tmp6_ = NULL;
+ GdkPixbuf* _tmp7_ = NULL;
+#line 583 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video_reader_new (_tmp1_);
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp1_);
+#line 584 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ reader = _tmp3_;
+#line 585 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = reader;
+#line 585 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = video_reader_read_preview_frame (_tmp4_);
+#line 585 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ frame = _tmp5_;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = frame;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp7_ != NULL) {
+#line 5788 "VideoSupport.c"
+ GdkPixbuf* _tmp8_ = NULL;
+ GdkPixbuf* _tmp9_ = NULL;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = frame;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _g_object_ref0 (_tmp8_);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp6_);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp9_;
+#line 5799 "VideoSupport.c"
+ } else {
+ GdkPixbuf* _tmp10_ = NULL;
+ GdkPixbuf* _tmp11_ = NULL;
+ GdkPixbuf* _tmp12_ = NULL;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = resources_get_noninterpretable_badge_pixbuf ();
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = _tmp10_;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = gdk_pixbuf_copy (_tmp11_);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp6_);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp12_;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp11_);
+#line 5816 "VideoSupport.c"
+ }
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp6_;
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (frame);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (reader);
+#line 587 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5826 "VideoSupport.c"
+}
+
+
+static gchar* video_real_get_typename (DataSource* base) {
+ Video * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 590 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 591 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = g_strdup (VIDEO_TYPENAME);
+#line 591 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 591 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5842 "VideoSupport.c"
+}
+
+
+static gint64 video_real_get_instance_id (DataSource* base) {
+ Video * self;
+ gint64 result = 0LL;
+ VideoID _tmp0_ = {0};
+ gint64 _tmp1_ = 0LL;
+#line 594 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 595 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp0_);
+#line 595 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_.id;
+#line 595 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 595 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5861 "VideoSupport.c"
+}
+
+
+static void video_real_get_import_id (MediaSource* base, ImportID* result) {
+ Video * self;
+ GError * _inner_error_ = NULL;
+#line 598 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 5870 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5877 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ ImportID _tmp2_ = {0};
+#line 600 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 600 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->import_id;
+#line 600 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp2_;
+#line 5887 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5894 "VideoSupport.c"
+ }
+#line 600 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5898 "VideoSupport.c"
+ }
+ __finally496:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5907 "VideoSupport.c"
+ }
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.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 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 599 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 5915 "VideoSupport.c"
+ }
+}
+
+
+static PhotoFileFormat video_real_get_preferred_thumbnail_format (ThumbnailSource* base) {
+ Video * self;
+ PhotoFileFormat result = 0;
+ PhotoFileFormat _tmp0_ = 0;
+#line 604 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 605 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = photo_file_format_get_system_default_format ();
+#line 605 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 605 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5932 "VideoSupport.c"
+}
+
+
+static gchar* video_real_get_title (MediaSource* base) {
+ Video * self;
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 608 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 5942 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 5949 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 610 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 610 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->title;
+#line 610 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 610 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 5962 "VideoSupport.c"
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5969 "VideoSupport.c"
+ }
+#line 610 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 5973 "VideoSupport.c"
+ }
+ __finally497:
+ {
+ VideoRow* _tmp5_ = NULL;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 5982 "VideoSupport.c"
+ }
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.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 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 609 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 5990 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_set_title (MediaSource* base, const gchar* title) {
+ Video * self;
+ gchar* new_title = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ Alteration* _tmp20_ = NULL;
+ Alteration* _tmp21_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 614 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 615 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = title;
+#line 615 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_prep_title (_tmp0_);
+#line 615 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ new_title = _tmp1_;
+#line 6011 "VideoSupport.c"
+ {
+ VideoRow* _tmp2_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6018 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ VideoRow* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+#line 618 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 618 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->title;
+#line 618 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = new_title;
+#line 618 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
+#line 6034 "VideoSupport.c"
+ {
+ VideoRow* _tmp6_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6041 "VideoSupport.c"
+ }
+#line 619 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 619 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6047 "VideoSupport.c"
+ }
+ {
+ VideoTable* _tmp7_ = NULL;
+ VideoTable* _tmp8_ = NULL;
+ VideoRow* _tmp9_ = NULL;
+ VideoID _tmp10_ = {0};
+ const gchar* _tmp11_ = NULL;
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_table_get_instance ();
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->priv->backing_row;
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_->video_id;
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = new_title;
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_title (_tmp8_, &_tmp10_, _tmp11_, &_inner_error_);
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp8_);
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 6073 "VideoSupport.c"
+ goto __catch499_database_error;
+ }
+ {
+ VideoRow* _tmp12_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6082 "VideoSupport.c"
+ }
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 622 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6092 "VideoSupport.c"
+ }
+ }
+ goto __finally499;
+ __catch499_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp13_ = NULL;
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 624 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = e;
+#line 624 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp13_);
+#line 625 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 6110 "VideoSupport.c"
+ {
+ VideoRow* _tmp14_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6117 "VideoSupport.c"
+ }
+#line 625 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 625 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6123 "VideoSupport.c"
+ }
+ __finally499:
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 6128 "VideoSupport.c"
+ {
+ VideoRow* _tmp15_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6135 "VideoSupport.c"
+ }
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 621 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6145 "VideoSupport.c"
+ }
+#line 629 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = self->priv->backing_row;
+#line 629 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = new_title;
+#line 629 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = g_strdup (_tmp17_);
+#line 629 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp16_->title);
+#line 629 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_->title = _tmp18_;
+#line 6157 "VideoSupport.c"
+ }
+ __finally498:
+ {
+ VideoRow* _tmp19_ = NULL;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = self->priv->backing_row;
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6166 "VideoSupport.c"
+ }
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.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 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 617 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6178 "VideoSupport.c"
+ }
+ }
+#line 632 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = alteration_new ("metadata", "name");
+#line 632 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = _tmp20_;
+#line 632 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp21_);
+#line 632 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp21_);
+#line 614 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_title);
+#line 6191 "VideoSupport.c"
+}
+
+
+static gchar* video_real_get_comment (MediaSource* base) {
+ Video * self;
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 635 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6201 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6208 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 637 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 637 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->comment;
+#line 637 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 637 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 6221 "VideoSupport.c"
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6228 "VideoSupport.c"
+ }
+#line 637 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6232 "VideoSupport.c"
+ }
+ __finally500:
+ {
+ VideoRow* _tmp5_ = NULL;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6241 "VideoSupport.c"
+ }
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.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 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 636 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 6249 "VideoSupport.c"
+ }
+}
+
+
+static gboolean video_real_set_comment (MediaSource* base, const gchar* comment) {
+ Video * self;
+ gboolean result = FALSE;
+ gchar* new_comment = NULL;
+ const gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ Alteration* _tmp20_ = NULL;
+ Alteration* _tmp21_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 641 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 642 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = comment;
+#line 642 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_prep_title (_tmp0_);
+#line 642 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ new_comment = _tmp1_;
+#line 6271 "VideoSupport.c"
+ {
+ VideoRow* _tmp2_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6278 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ VideoRow* _tmp16_ = NULL;
+ const gchar* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+#line 645 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 645 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->comment;
+#line 645 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = new_comment;
+#line 645 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
+#line 646 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = TRUE;
+#line 6296 "VideoSupport.c"
+ {
+ VideoRow* _tmp6_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6303 "VideoSupport.c"
+ }
+#line 646 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 646 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6309 "VideoSupport.c"
+ }
+ {
+ VideoTable* _tmp7_ = NULL;
+ VideoTable* _tmp8_ = NULL;
+ VideoRow* _tmp9_ = NULL;
+ VideoID _tmp10_ = {0};
+ const gchar* _tmp11_ = NULL;
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_table_get_instance ();
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_;
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->priv->backing_row;
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = _tmp9_->video_id;
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = new_comment;
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_comment (_tmp8_, &_tmp10_, _tmp11_, &_inner_error_);
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp8_);
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 6335 "VideoSupport.c"
+ goto __catch502_database_error;
+ }
+ {
+ VideoRow* _tmp12_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6344 "VideoSupport.c"
+ }
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 649 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 6354 "VideoSupport.c"
+ }
+ }
+ goto __finally502;
+ __catch502_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp13_ = NULL;
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 651 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = e;
+#line 651 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp13_);
+#line 652 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = FALSE;
+#line 652 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 6374 "VideoSupport.c"
+ {
+ VideoRow* _tmp14_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6381 "VideoSupport.c"
+ }
+#line 652 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 652 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6387 "VideoSupport.c"
+ }
+ __finally502:
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 6392 "VideoSupport.c"
+ {
+ VideoRow* _tmp15_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6399 "VideoSupport.c"
+ }
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 648 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 6409 "VideoSupport.c"
+ }
+#line 656 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = self->priv->backing_row;
+#line 656 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = new_comment;
+#line 656 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = g_strdup (_tmp17_);
+#line 656 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp16_->comment);
+#line 656 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_->comment = _tmp18_;
+#line 6421 "VideoSupport.c"
+ }
+ __finally501:
+ {
+ VideoRow* _tmp19_ = NULL;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = self->priv->backing_row;
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6430 "VideoSupport.c"
+ }
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.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 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 644 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 6442 "VideoSupport.c"
+ }
+ }
+#line 659 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = alteration_new ("metadata", "comment");
+#line 659 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = _tmp20_;
+#line 659 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp21_);
+#line 659 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp21_);
+#line 661 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = TRUE;
+#line 661 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_comment);
+#line 661 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6459 "VideoSupport.c"
+}
+
+
+static Rating video_real_get_rating (MediaSource* base) {
+ Video * self;
+ Rating result = 0;
+ GError * _inner_error_ = NULL;
+#line 665 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6469 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6476 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ Rating _tmp2_ = 0;
+#line 667 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 667 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->rating;
+#line 667 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 6486 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6493 "VideoSupport.c"
+ }
+#line 667 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6497 "VideoSupport.c"
+ }
+ __finally503:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6506 "VideoSupport.c"
+ }
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.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 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 666 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 6514 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_set_rating (MediaSource* base, Rating rating) {
+ Video * self;
+ Alteration* _tmp19_ = NULL;
+ Alteration* _tmp20_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 671 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6526 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6533 "VideoSupport.c"
+ {
+ gboolean _tmp1_ = FALSE;
+ Rating _tmp2_ = 0;
+ gboolean _tmp3_ = FALSE;
+ VideoRow* _tmp16_ = NULL;
+ Rating _tmp17_ = 0;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = rating;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = rating_is_valid (_tmp2_);
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp3_) {
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = TRUE;
+#line 6548 "VideoSupport.c"
+ } else {
+ Rating _tmp4_ = 0;
+ VideoRow* _tmp5_ = NULL;
+ Rating _tmp6_ = 0;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = rating;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_->rating;
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp4_ == _tmp6_;
+#line 6561 "VideoSupport.c"
+ }
+#line 673 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_) {
+#line 6565 "VideoSupport.c"
+ {
+ VideoRow* _tmp7_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6572 "VideoSupport.c"
+ }
+#line 674 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6576 "VideoSupport.c"
+ }
+ {
+ VideoTable* _tmp8_ = NULL;
+ VideoTable* _tmp9_ = NULL;
+ VideoID _tmp10_ = {0};
+ Rating _tmp11_ = 0;
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = video_table_get_instance ();
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_;
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp10_);
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = rating;
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_rating (_tmp9_, &_tmp10_, _tmp11_, &_inner_error_);
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp9_);
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 6599 "VideoSupport.c"
+ goto __catch505_database_error;
+ }
+ {
+ VideoRow* _tmp12_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6608 "VideoSupport.c"
+ }
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 677 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6616 "VideoSupport.c"
+ }
+ }
+ goto __finally505;
+ __catch505_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp13_ = NULL;
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 679 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = e;
+#line 679 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp13_);
+#line 680 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 6634 "VideoSupport.c"
+ {
+ VideoRow* _tmp14_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6641 "VideoSupport.c"
+ }
+#line 680 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6645 "VideoSupport.c"
+ }
+ __finally505:
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 6650 "VideoSupport.c"
+ {
+ VideoRow* _tmp15_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6657 "VideoSupport.c"
+ }
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 676 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6665 "VideoSupport.c"
+ }
+#line 684 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = self->priv->backing_row;
+#line 684 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = rating;
+#line 684 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_->rating = _tmp17_;
+#line 6673 "VideoSupport.c"
+ }
+ __finally504:
+ {
+ VideoRow* _tmp18_ = NULL;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = self->priv->backing_row;
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6682 "VideoSupport.c"
+ }
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.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 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 672 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6692 "VideoSupport.c"
+ }
+ }
+#line 687 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = alteration_new ("metadata", "rating");
+#line 687 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = _tmp19_;
+#line 687 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp20_);
+#line 687 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp20_);
+#line 6703 "VideoSupport.c"
+}
+
+
+static void video_real_increase_rating (MediaSource* base) {
+ Video * self;
+ GError * _inner_error_ = NULL;
+#line 690 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6712 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6719 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ Rating _tmp2_ = 0;
+ Rating _tmp3_ = 0;
+#line 692 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 692 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->rating;
+#line 692 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = rating_increase (_tmp2_);
+#line 692 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource), _tmp3_);
+#line 6732 "VideoSupport.c"
+ }
+ __finally506:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6741 "VideoSupport.c"
+ }
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.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 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 691 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6751 "VideoSupport.c"
+ }
+ }
+}
+
+
+static void video_real_decrease_rating (MediaSource* base) {
+ Video * self;
+ GError * _inner_error_ = NULL;
+#line 696 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6762 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6769 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ Rating _tmp2_ = 0;
+ Rating _tmp3_ = 0;
+#line 698 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 698 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->rating;
+#line 698 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = rating_decrease (_tmp2_);
+#line 698 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource), _tmp3_);
+#line 6782 "VideoSupport.c"
+ }
+ __finally507:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6791 "VideoSupport.c"
+ }
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.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 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 697 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6801 "VideoSupport.c"
+ }
+ }
+}
+
+
+static gboolean video_real_is_trashed (MediaSource* base) {
+ Video * self;
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 702 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 703 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_is_flag_set (self, VIDEO_FLAG_TRASH);
+#line 703 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 703 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6819 "VideoSupport.c"
+}
+
+
+static gboolean video_real_is_offline (Monitorable* base) {
+ Video * self;
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 706 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 707 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_is_flag_set (self, VIDEO_FLAG_OFFLINE);
+#line 707 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 707 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6835 "VideoSupport.c"
+}
+
+
+static void video_real_mark_offline (Monitorable* base) {
+ Video * self;
+#line 710 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 711 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_add_flags (self, VIDEO_FLAG_OFFLINE, NULL);
+#line 6845 "VideoSupport.c"
+}
+
+
+static void video_real_mark_online (Monitorable* base) {
+ Video * self;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+#line 714 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 715 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_remove_flags (self, VIDEO_FLAG_OFFLINE, NULL);
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_get_is_interpretable (self);
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp1_) {
+#line 6861 "VideoSupport.c"
+ gboolean _tmp2_ = FALSE;
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video_has_interpreter_state_changed ();
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = _tmp2_;
+#line 6867 "VideoSupport.c"
+ } else {
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = FALSE;
+#line 6871 "VideoSupport.c"
+ }
+#line 717 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_) {
+#line 6875 "VideoSupport.c"
+ VideoInterpretableResults* _tmp3_ = NULL;
+ VideoInterpretableResults* _tmp4_ = NULL;
+#line 718 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_check_is_interpretable (self);
+#line 718 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 718 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_foreground_finish (_tmp4_);
+#line 718 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_interpretable_results_unref0 (_tmp4_);
+#line 6886 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_trash (MediaSource* base) {
+ Video * self;
+#line 721 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 722 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_add_flags (self, VIDEO_FLAG_TRASH, NULL);
+#line 6897 "VideoSupport.c"
+}
+
+
+static void video_real_untrash (MediaSource* base) {
+ Video * self;
+#line 725 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 726 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_remove_flags (self, VIDEO_FLAG_TRASH, NULL);
+#line 6907 "VideoSupport.c"
+}
+
+
+static gboolean video_real_is_flagged (Flaggable* base) {
+ Video * self;
+ gboolean result = FALSE;
+ gboolean _tmp0_ = FALSE;
+#line 729 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 730 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_is_flag_set (self, VIDEO_FLAG_FLAGGED);
+#line 730 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 730 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 6923 "VideoSupport.c"
+}
+
+
+static void video_real_mark_flagged (Flaggable* base) {
+ Video * self;
+ Alteration* _tmp0_ = NULL;
+ Alteration* _tmp1_ = NULL;
+#line 733 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 734 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = alteration_new ("metadata", "flagged");
+#line 734 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 734 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_add_flags (self, VIDEO_FLAG_FLAGGED, _tmp1_);
+#line 734 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp1_);
+#line 6941 "VideoSupport.c"
+}
+
+
+static void video_real_mark_unflagged (Flaggable* base) {
+ Video * self;
+ Alteration* _tmp0_ = NULL;
+ Alteration* _tmp1_ = NULL;
+#line 737 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 738 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = alteration_new ("metadata", "flagged");
+#line 738 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 738 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_remove_flags (self, VIDEO_FLAG_FLAGGED, _tmp1_);
+#line 738 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp1_);
+#line 6959 "VideoSupport.c"
+}
+
+
+static void video_real_get_event_id (MediaSource* base, EventID* result) {
+ Video * self;
+ GError * _inner_error_ = NULL;
+#line 741 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 6968 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 6975 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ EventID _tmp2_ = {0};
+#line 743 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 743 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->event_id;
+#line 743 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp2_;
+#line 6985 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 6992 "VideoSupport.c"
+ }
+#line 743 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 6996 "VideoSupport.c"
+ }
+ __finally508:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7005 "VideoSupport.c"
+ }
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.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 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 742 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7013 "VideoSupport.c"
+ }
+}
+
+
+static gchar* video_real_to_string (DataObject* base) {
+ Video * self;
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 747 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 7024 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7031 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ VideoID _tmp2_ = {0};
+ gint64 _tmp3_ = 0LL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+ VideoRow* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+ gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->video_id;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_.id;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp3_);
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_->filepath;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = g_strdup_printf ("[%s] %s", _tmp5_, _tmp7_);
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_;
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp5_);
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp9_;
+#line 7064 "VideoSupport.c"
+ {
+ VideoRow* _tmp10_ = NULL;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->backing_row;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7071 "VideoSupport.c"
+ }
+#line 749 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7075 "VideoSupport.c"
+ }
+ __finally509:
+ {
+ VideoRow* _tmp11_ = NULL;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = self->priv->backing_row;
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7084 "VideoSupport.c"
+ }
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.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 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 748 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 7092 "VideoSupport.c"
+ }
+}
+
+
+void video_get_video_id (Video* self, VideoID* result) {
+ GError * _inner_error_ = NULL;
+#line 753 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (self));
+#line 7101 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7108 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ VideoID _tmp2_ = {0};
+#line 755 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 755 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->video_id;
+#line 755 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp2_;
+#line 7118 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7125 "VideoSupport.c"
+ }
+#line 755 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7129 "VideoSupport.c"
+ }
+ __finally510:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7138 "VideoSupport.c"
+ }
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.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 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 754 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7146 "VideoSupport.c"
+ }
+}
+
+
+static time_t video_real_get_exposure_time (Dateable* base) {
+ Video * self;
+ time_t result = 0;
+ GError * _inner_error_ = NULL;
+#line 759 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 7157 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7164 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ time_t _tmp2_ = 0;
+#line 761 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 761 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->exposure_time;
+#line 761 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 7174 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7181 "VideoSupport.c"
+ }
+#line 761 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7185 "VideoSupport.c"
+ }
+ __finally511:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7194 "VideoSupport.c"
+ }
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.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 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 760 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 7202 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_set_exposure_time (Dateable* base, time_t time) {
+ Video * self;
+ Alteration* _tmp12_ = NULL;
+ Alteration* _tmp13_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 765 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 7214 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7221 "VideoSupport.c"
+ {
+ VideoRow* _tmp9_ = NULL;
+ time_t _tmp10_ = 0;
+ {
+ VideoTable* _tmp1_ = NULL;
+ VideoTable* _tmp2_ = NULL;
+ VideoRow* _tmp3_ = NULL;
+ VideoID _tmp4_ = {0};
+ time_t _tmp5_ = 0;
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_table_get_instance ();
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->video_id;
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = time;
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_exposure_time (_tmp2_, &_tmp4_, _tmp5_, &_inner_error_);
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp2_);
+#line 768 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 7247 "VideoSupport.c"
+ goto __catch513_g_error;
+ }
+ }
+ goto __finally513;
+ __catch513_g_error:
+ {
+ GError* e = NULL;
+ GError* _tmp6_ = NULL;
+ const gchar* _tmp7_ = NULL;
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 770 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = e;
+#line 770 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp6_->message;
+#line 770 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:770: Warning - %s", _tmp7_);
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 7269 "VideoSupport.c"
+ }
+ __finally513:
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 7274 "VideoSupport.c"
+ {
+ VideoRow* _tmp8_ = NULL;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->backing_row;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7281 "VideoSupport.c"
+ }
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 767 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7289 "VideoSupport.c"
+ }
+#line 772 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->priv->backing_row;
+#line 772 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = time;
+#line 772 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_->exposure_time = _tmp10_;
+#line 7297 "VideoSupport.c"
+ }
+ __finally512:
+ {
+ VideoRow* _tmp11_ = NULL;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = self->priv->backing_row;
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7306 "VideoSupport.c"
+ }
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.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 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 766 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7316 "VideoSupport.c"
+ }
+ }
+#line 775 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = alteration_new ("metadata", "exposure-time");
+#line 775 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_;
+#line 775 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp13_);
+#line 775 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp13_);
+#line 7327 "VideoSupport.c"
+}
+
+
+void video_get_frame_dimensions (Video* self, Dimensions* result) {
+ GError * _inner_error_ = NULL;
+#line 778 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (self));
+#line 7335 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7342 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ gint _tmp2_ = 0;
+ VideoRow* _tmp3_ = NULL;
+ gint _tmp4_ = 0;
+ Dimensions _tmp5_ = {0};
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->width;
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->height;
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dimensions_init (&_tmp5_, _tmp2_, _tmp4_);
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp5_;
+#line 7361 "VideoSupport.c"
+ {
+ VideoRow* _tmp6_ = NULL;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7368 "VideoSupport.c"
+ }
+#line 780 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7372 "VideoSupport.c"
+ }
+ __finally514:
+ {
+ VideoRow* _tmp7_ = NULL;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->priv->backing_row;
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7381 "VideoSupport.c"
+ }
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.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 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 779 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7389 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_get_dimensions (MediaSource* base, PhotoException disallowed_steps, Dimensions* result) {
+ Video * self;
+ Dimensions _tmp0_ = {0};
+#line 784 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 785 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_frame_dimensions (self, &_tmp0_);
+#line 785 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp0_;
+#line 785 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7405 "VideoSupport.c"
+}
+
+
+static guint64 video_real_get_filesize (MediaSource* base) {
+ Video * self;
+ guint64 result = 0ULL;
+ guint64 _tmp0_ = 0ULL;
+#line 788 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 789 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_get_master_filesize (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 789 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 789 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7421 "VideoSupport.c"
+}
+
+
+static guint64 video_real_get_master_filesize (MediaSource* base) {
+ Video * self;
+ guint64 result = 0ULL;
+ GError * _inner_error_ = NULL;
+#line 792 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 7431 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7438 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ gint64 _tmp2_ = 0LL;
+#line 794 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 794 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->filesize;
+#line 794 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = (guint64) _tmp2_;
+#line 7448 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7455 "VideoSupport.c"
+ }
+#line 794 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7459 "VideoSupport.c"
+ }
+ __finally515:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7468 "VideoSupport.c"
+ }
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.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 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 793 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 7476 "VideoSupport.c"
+ }
+}
+
+
+static time_t video_real_get_timestamp (MediaSource* base) {
+ Video * self;
+ time_t result = 0;
+ GError * _inner_error_ = NULL;
+#line 798 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 7487 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7494 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ time_t _tmp2_ = 0;
+#line 800 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 800 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->timestamp;
+#line 800 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 7504 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7511 "VideoSupport.c"
+ }
+#line 800 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7515 "VideoSupport.c"
+ }
+ __finally516:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7524 "VideoSupport.c"
+ }
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.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 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 799 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0;
+#line 7532 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_set_master_timestamp (Monitorable* base, GFileInfo* info) {
+ Video * self;
+ GTimeVal time_val = {0};
+ GFileInfo* _tmp0_ = NULL;
+ GTimeVal _tmp1_ = {0};
+ Alteration* _tmp19_ = NULL;
+ Alteration* _tmp20_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 804 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 804 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_IS_FILE_INFO (info));
+#line 805 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = info;
+#line 805 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_file_info_get_modification_time (_tmp0_, &_tmp1_);
+#line 805 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ time_val = _tmp1_;
+#line 7555 "VideoSupport.c"
+ {
+ {
+ VideoRow* _tmp2_ = NULL;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7563 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+ time_t _tmp4_ = 0;
+ GTimeVal _tmp5_ = {0};
+ glong _tmp6_ = 0L;
+ VideoTable* _tmp8_ = NULL;
+ VideoTable* _tmp9_ = NULL;
+ VideoRow* _tmp10_ = NULL;
+ VideoID _tmp11_ = {0};
+ GTimeVal _tmp12_ = {0};
+ glong _tmp13_ = 0L;
+ VideoRow* _tmp14_ = NULL;
+ GTimeVal _tmp15_ = {0};
+ glong _tmp16_ = 0L;
+#line 809 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 809 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->timestamp;
+#line 809 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = time_val;
+#line 809 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_.tv_sec;
+#line 809 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp4_ == ((time_t) _tmp6_)) {
+#line 7588 "VideoSupport.c"
+ {
+ VideoRow* _tmp7_ = NULL;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->priv->backing_row;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7595 "VideoSupport.c"
+ }
+#line 810 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7599 "VideoSupport.c"
+ }
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = video_table_get_instance ();
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_;
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->backing_row;
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = _tmp10_->video_id;
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = time_val;
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_.tv_sec;
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_timestamp (_tmp9_, &_tmp11_, (time_t) _tmp13_, &_inner_error_);
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp9_);
+#line 812 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 7619 "VideoSupport.c"
+ goto __finally518;
+ }
+#line 813 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = self->priv->backing_row;
+#line 813 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = time_val;
+#line 813 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = _tmp15_.tv_sec;
+#line 813 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_->timestamp = (time_t) _tmp16_;
+#line 7630 "VideoSupport.c"
+ }
+ __finally518:
+ {
+ VideoRow* _tmp17_ = NULL;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = self->priv->backing_row;
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7639 "VideoSupport.c"
+ }
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 7645 "VideoSupport.c"
+ goto __catch517_database_error;
+ }
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 808 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7654 "VideoSupport.c"
+ }
+ }
+ }
+ goto __finally517;
+ __catch517_database_error:
+ {
+ GError* err = NULL;
+ GError* _tmp18_ = NULL;
+#line 807 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 807 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 816 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = err;
+#line 816 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp18_);
+#line 818 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 818 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7675 "VideoSupport.c"
+ }
+ __finally517:
+#line 807 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 807 "/home/jens/Source/shotwell/src/VideoSupport.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 807 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 807 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7686 "VideoSupport.c"
+ }
+#line 821 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = alteration_new ("metadata", "master-timestamp");
+#line 821 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = _tmp19_;
+#line 821 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp20_);
+#line 821 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp20_);
+#line 7696 "VideoSupport.c"
+}
+
+
+gchar* video_get_filename (Video* self) {
+ gchar* result = NULL;
+ GError * _inner_error_ = NULL;
+#line 824 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), NULL);
+#line 7705 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7712 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ const gchar* _tmp2_ = NULL;
+ gchar* _tmp3_ = NULL;
+#line 826 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 826 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->filepath;
+#line 826 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_strdup (_tmp2_);
+#line 826 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 7725 "VideoSupport.c"
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7732 "VideoSupport.c"
+ }
+#line 826 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7736 "VideoSupport.c"
+ }
+ __finally519:
+ {
+ VideoRow* _tmp5_ = NULL;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7745 "VideoSupport.c"
+ }
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.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 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 825 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 7753 "VideoSupport.c"
+ }
+}
+
+
+static GFile* video_real_get_file (MediaSource* base) {
+ Video * self;
+ GFile* result = NULL;
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GFile* _tmp3_ = NULL;
+#line 830 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_get_filename (self);
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = g_file_new_for_path (_tmp1_);
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp1_);
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 831 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7781 "VideoSupport.c"
+}
+
+
+static GFile* video_real_get_master_file (MediaSource* base) {
+ Video * self;
+ GFile* result = NULL;
+ GFile* _tmp0_ = NULL;
+#line 834 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 835 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 835 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 835 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7797 "VideoSupport.c"
+}
+
+
+void video_export (Video* self, GFile* dest_file, GError** error) {
+ GFile* source_file = NULL;
+ gchar* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ GFile* _tmp3_ = NULL;
+ GFile* _tmp4_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 838 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (self));
+#line 838 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_IS_FILE (dest_file));
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_get_filename (self);
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = g_file_new_for_path (_tmp1_);
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp1_);
+#line 839 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ source_file = _tmp3_;
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = dest_file;
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_file_copy (source_file, _tmp4_, G_FILE_COPY_OVERWRITE | G_FILE_COPY_TARGET_DEFAULT_PERMS, NULL, NULL, NULL, &_inner_error_);
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (source_file);
+#line 840 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7837 "VideoSupport.c"
+ }
+#line 838 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (source_file);
+#line 7841 "VideoSupport.c"
+}
+
+
+gdouble video_get_clip_duration (Video* self) {
+ gdouble result = 0.0;
+ GError * _inner_error_ = NULL;
+#line 844 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), 0.0);
+#line 7850 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7857 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ gdouble _tmp2_ = 0.0;
+#line 846 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 846 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->clip_duration;
+#line 846 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 7867 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7874 "VideoSupport.c"
+ }
+#line 846 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7878 "VideoSupport.c"
+ }
+ __finally520:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7887 "VideoSupport.c"
+ }
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.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 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 845 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0.0;
+#line 7895 "VideoSupport.c"
+ }
+}
+
+
+gboolean video_get_is_interpretable (Video* self) {
+ gboolean result = FALSE;
+ GError * _inner_error_ = NULL;
+#line 850 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), FALSE);
+#line 7905 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7912 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 852 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 852 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->is_interpretable;
+#line 852 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 7922 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7929 "VideoSupport.c"
+ }
+#line 852 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 7933 "VideoSupport.c"
+ }
+ __finally521:
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7942 "VideoSupport.c"
+ }
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.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 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 851 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 7950 "VideoSupport.c"
+ }
+}
+
+
+static void video_set_is_interpretable (Video* self, gboolean is_interpretable) {
+ GError * _inner_error_ = NULL;
+#line 856 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (self));
+#line 7959 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 7966 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ VideoRow* _tmp5_ = NULL;
+ gboolean _tmp6_ = FALSE;
+#line 858 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 858 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->is_interpretable;
+#line 858 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = is_interpretable;
+#line 858 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_ == _tmp3_) {
+#line 7981 "VideoSupport.c"
+ {
+ VideoRow* _tmp4_ = NULL;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->priv->backing_row;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 7988 "VideoSupport.c"
+ }
+#line 859 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 7992 "VideoSupport.c"
+ }
+#line 861 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 861 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = is_interpretable;
+#line 861 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_->is_interpretable = _tmp6_;
+#line 8000 "VideoSupport.c"
+ }
+ __finally522:
+ {
+ VideoRow* _tmp7_ = NULL;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->priv->backing_row;
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8009 "VideoSupport.c"
+ }
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.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 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 857 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 8019 "VideoSupport.c"
+ }
+ }
+ {
+ VideoTable* _tmp8_ = NULL;
+ VideoTable* _tmp9_ = NULL;
+ VideoID _tmp10_ = {0};
+ gboolean _tmp11_ = FALSE;
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = video_table_get_instance ();
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_;
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp10_);
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = is_interpretable;
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_update_is_interpretable (_tmp9_, &_tmp10_, _tmp11_, &_inner_error_);
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp9_);
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 8043 "VideoSupport.c"
+ goto __catch523_database_error;
+ }
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 865 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 8052 "VideoSupport.c"
+ }
+ }
+ goto __finally523;
+ __catch523_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp12_ = NULL;
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 867 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = e;
+#line 867 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp12_);
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 8070 "VideoSupport.c"
+ }
+ __finally523:
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.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 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 864 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 8081 "VideoSupport.c"
+ }
+}
+
+
+VideoInterpretableResults* video_check_is_interpretable (Video* self) {
+ VideoInterpretableResults* result = NULL;
+ VideoInterpretableResults* results = NULL;
+ VideoInterpretableResults* _tmp0_ = NULL;
+ gdouble clip_duration = 0.0;
+ GdkPixbuf* preview_frame = NULL;
+ VideoReader* backing_file_reader = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ VideoReader* _tmp3_ = NULL;
+ VideoReader* _tmp4_ = NULL;
+ gboolean _tmp13_ = FALSE;
+ GFile* _tmp16_ = NULL;
+ GFile* _tmp17_ = NULL;
+ gchar* _tmp18_ = NULL;
+ gchar* _tmp19_ = NULL;
+ VideoInterpretableResults* _tmp24_ = NULL;
+ VideoInterpretableResults* _tmp25_ = NULL;
+ VideoInterpretableResults* _tmp26_ = NULL;
+ GdkPixbuf* _tmp27_ = NULL;
+ GdkPixbuf* _tmp28_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 874 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), NULL);
+#line 875 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_interpretable_results_new (self);
+#line 875 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ results = _tmp0_;
+#line 877 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ clip_duration = -1.0;
+#line 878 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ preview_frame = NULL;
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_reader_new (_tmp2_);
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 880 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ backing_file_reader = _tmp4_;
+#line 8130 "VideoSupport.c"
+ {
+ gdouble _tmp5_ = 0.0;
+ VideoReader* _tmp6_ = NULL;
+ gdouble _tmp7_ = 0.0;
+ VideoReader* _tmp8_ = NULL;
+ GdkPixbuf* _tmp9_ = NULL;
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = backing_file_reader;
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video_reader_read_clip_duration (_tmp6_, &_inner_error_);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp7_;
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == VIDEO_ERROR) {
+#line 8147 "VideoSupport.c"
+ goto __catch524_video_error;
+ }
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_interpretable_results_unref0 (results);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 8162 "VideoSupport.c"
+ }
+#line 882 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ clip_duration = _tmp5_;
+#line 883 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = backing_file_reader;
+#line 883 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = video_reader_read_preview_frame (_tmp8_);
+#line 883 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 883 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ preview_frame = _tmp9_;
+#line 8174 "VideoSupport.c"
+ }
+ goto __finally524;
+ __catch524_video_error:
+ {
+ GError* e = NULL;
+ VideoInterpretableResults* _tmp10_ = NULL;
+ gboolean _tmp11_ = FALSE;
+ VideoInterpretableResults* _tmp12_ = NULL;
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 887 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = results;
+#line 887 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = video_get_is_interpretable (self);
+#line 887 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_->update_interpretable = _tmp11_;
+#line 888 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = results;
+#line 888 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_->is_interpretable = FALSE;
+#line 890 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = results;
+#line 890 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 890 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 890 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 890 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8207 "VideoSupport.c"
+ }
+ __finally524:
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_interpretable_results_unref0 (results);
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.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 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 881 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 8224 "VideoSupport.c"
+ }
+#line 894 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = video_get_is_interpretable (self);
+#line 894 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp13_) {
+#line 8230 "VideoSupport.c"
+ VideoInterpretableResults* _tmp14_ = NULL;
+ VideoInterpretableResults* _tmp15_ = NULL;
+#line 895 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = results;
+#line 895 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_->update_interpretable = FALSE;
+#line 896 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = results;
+#line 896 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_->is_interpretable = TRUE;
+#line 898 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = results;
+#line 898 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 898 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 898 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8249 "VideoSupport.c"
+ }
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = _tmp16_;
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = g_file_get_basename (_tmp17_);
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = _tmp18_;
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_debug ("VideoSupport.vala:901: video %s has become interpretable", _tmp19_);
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp19_);
+#line 901 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp17_);
+#line 8265 "VideoSupport.c"
+ {
+ VideoRow* _tmp20_ = NULL;
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = self->priv->backing_row;
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 8272 "VideoSupport.c"
+ {
+ VideoRow* _tmp21_ = NULL;
+ gdouble _tmp22_ = 0.0;
+#line 905 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = self->priv->backing_row;
+#line 905 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = clip_duration;
+#line 905 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_->clip_duration = _tmp22_;
+#line 8282 "VideoSupport.c"
+ }
+ __finally525:
+ {
+ VideoRow* _tmp23_ = NULL;
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = self->priv->backing_row;
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8291 "VideoSupport.c"
+ }
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_interpretable_results_unref0 (results);
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.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 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 904 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 8307 "VideoSupport.c"
+ }
+ }
+#line 908 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = results;
+#line 908 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_->update_interpretable = TRUE;
+#line 909 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = results;
+#line 909 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_->is_interpretable = TRUE;
+#line 910 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = results;
+#line 910 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = preview_frame;
+#line 910 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp28_ = _g_object_ref0 (_tmp27_);
+#line 910 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp26_->new_thumbnail);
+#line 910 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_->new_thumbnail = _tmp28_;
+#line 912 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = results;
+#line 912 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (backing_file_reader);
+#line 912 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (preview_frame);
+#line 912 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8336 "VideoSupport.c"
+}
+
+
+static void video_real_destroy (DataSource* base) {
+ Video * self;
+ VideoID video_id = {0};
+ VideoID _tmp0_ = {0};
+ GError * _inner_error_ = NULL;
+#line 915 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 916 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp0_);
+#line 916 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_id = _tmp0_;
+#line 918 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ thumbnail_cache_remove (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_THUMBNAIL_SOURCE, ThumbnailSource));
+#line 8353 "VideoSupport.c"
+ {
+ VideoTable* _tmp1_ = NULL;
+ VideoTable* _tmp2_ = NULL;
+ VideoID _tmp3_ = {0};
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_table_get_instance ();
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_id;
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_remove (_tmp2_, &_tmp3_, &_inner_error_);
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp2_);
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 8372 "VideoSupport.c"
+ goto __catch526_database_error;
+ }
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 921 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 8381 "VideoSupport.c"
+ }
+ }
+ goto __finally526;
+ __catch526_database_error:
+ {
+ GError* err = NULL;
+ gchar* _tmp4_ = NULL;
+ gchar* _tmp5_ = NULL;
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 923 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject));
+#line 923 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 923 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_error ("VideoSupport.vala:923: failed to remove video %s from video table", _tmp5_);
+#line 923 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp5_);
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 8404 "VideoSupport.c"
+ }
+ __finally526:
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.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 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 920 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 8415 "VideoSupport.c"
+ }
+#line 926 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ DATA_SOURCE_CLASS (video_parent_class)->destroy (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_VIDEO_SOURCE, VideoSource), TYPE_DATA_SOURCE, DataSource));
+#line 8419 "VideoSupport.c"
+}
+
+
+static gboolean video_real_internal_delete_backing (DataSource* base, GError** error) {
+ Video * self;
+ gboolean result = FALSE;
+ gboolean ret = FALSE;
+ gboolean _tmp0_ = FALSE;
+ gboolean _tmp1_ = FALSE;
+ gboolean _tmp2_ = FALSE;
+ gboolean _tmp3_ = FALSE;
+ GError * _inner_error_ = NULL;
+#line 929 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 930 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_delete_original_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 930 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ret = _tmp0_;
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = DATA_SOURCE_CLASS (video_parent_class)->internal_delete_backing (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_VIDEO_SOURCE, VideoSource), TYPE_DATA_SOURCE, DataSource), &_inner_error_);
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp3_;
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 8448 "VideoSupport.c"
+ }
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_) {
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = ret;
+#line 8454 "VideoSupport.c"
+ } else {
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = FALSE;
+#line 8458 "VideoSupport.c"
+ }
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 933 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8464 "VideoSupport.c"
+}
+
+
+static void video_notify_flags_altered (Video* self, Alteration* additional_alteration) {
+ Alteration* alteration = NULL;
+ Alteration* _tmp0_ = NULL;
+ Alteration* _tmp1_ = NULL;
+ Alteration* _tmp5_ = NULL;
+#line 936 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (self));
+#line 936 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((additional_alteration == NULL) || IS_ALTERATION (additional_alteration));
+#line 937 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = alteration_new ("metadata", "flags");
+#line 937 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ alteration = _tmp0_;
+#line 938 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = additional_alteration;
+#line 938 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_ != NULL) {
+#line 8485 "VideoSupport.c"
+ Alteration* _tmp2_ = NULL;
+ Alteration* _tmp3_ = NULL;
+ Alteration* _tmp4_ = NULL;
+#line 939 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = alteration;
+#line 939 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = additional_alteration;
+#line 939 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = alteration_compress (_tmp2_, _tmp3_);
+#line 939 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (alteration);
+#line 939 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ alteration = _tmp4_;
+#line 8499 "VideoSupport.c"
+ }
+#line 941 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = alteration;
+#line 941 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp5_);
+#line 936 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (alteration);
+#line 8507 "VideoSupport.c"
+}
+
+
+guint64 video_add_flags (Video* self, guint64 flags_to_add, Alteration* additional_alteration) {
+ guint64 result = 0ULL;
+ guint64 new_flags = 0ULL;
+ Alteration* _tmp24_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 944 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), 0ULL);
+#line 944 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail ((additional_alteration == NULL) || IS_ALTERATION (additional_alteration), 0ULL);
+#line 8520 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 8527 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ guint64 _tmp2_ = 0ULL;
+ guint64 _tmp3_ = 0ULL;
+ guint64 _tmp4_ = 0ULL;
+ VideoRow* _tmp5_ = NULL;
+ guint64 _tmp6_ = 0ULL;
+ guint64 _tmp7_ = 0ULL;
+ VideoRow* _tmp21_ = NULL;
+ guint64 _tmp22_ = 0ULL;
+#line 947 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 947 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->flags;
+#line 947 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = flags_to_add;
+#line 947 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = media_source_internal_add_flags (_tmp2_, _tmp3_);
+#line 947 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ new_flags = _tmp4_;
+#line 948 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 948 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_->flags;
+#line 948 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = new_flags;
+#line 948 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp6_ == _tmp7_) {
+#line 8556 "VideoSupport.c"
+ VideoRow* _tmp8_ = NULL;
+ guint64 _tmp9_ = 0ULL;
+#line 949 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->backing_row;
+#line 949 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_->flags;
+#line 949 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp9_;
+#line 8565 "VideoSupport.c"
+ {
+ VideoRow* _tmp10_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8572 "VideoSupport.c"
+ }
+#line 949 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8576 "VideoSupport.c"
+ }
+ {
+ VideoTable* _tmp11_ = NULL;
+ VideoTable* _tmp12_ = NULL;
+ VideoID _tmp13_ = {0};
+ guint64 _tmp14_ = 0ULL;
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = video_table_get_instance ();
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_;
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp13_);
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = new_flags;
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_flags (_tmp12_, &_tmp13_, _tmp14_, &_inner_error_);
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp12_);
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 8599 "VideoSupport.c"
+ goto __catch528_database_error;
+ }
+ {
+ VideoRow* _tmp15_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8608 "VideoSupport.c"
+ }
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 952 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8616 "VideoSupport.c"
+ }
+ }
+ goto __finally528;
+ __catch528_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp16_ = NULL;
+ VideoRow* _tmp17_ = NULL;
+ guint64 _tmp18_ = 0ULL;
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 954 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = e;
+#line 954 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp16_);
+#line 955 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = self->priv->backing_row;
+#line 955 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = _tmp17_->flags;
+#line 955 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp18_;
+#line 955 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 8642 "VideoSupport.c"
+ {
+ VideoRow* _tmp19_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8649 "VideoSupport.c"
+ }
+#line 955 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8653 "VideoSupport.c"
+ }
+ __finally528:
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 8658 "VideoSupport.c"
+ {
+ VideoRow* _tmp20_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8665 "VideoSupport.c"
+ }
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 951 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8673 "VideoSupport.c"
+ }
+#line 958 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = self->priv->backing_row;
+#line 958 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = new_flags;
+#line 958 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_->flags = _tmp22_;
+#line 8681 "VideoSupport.c"
+ }
+ __finally527:
+ {
+ VideoRow* _tmp23_ = NULL;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = self->priv->backing_row;
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8690 "VideoSupport.c"
+ }
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.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 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 946 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8700 "VideoSupport.c"
+ }
+ }
+#line 961 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = additional_alteration;
+#line 961 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_notify_flags_altered (self, _tmp24_);
+#line 963 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = new_flags;
+#line 963 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8711 "VideoSupport.c"
+}
+
+
+guint64 video_remove_flags (Video* self, guint64 flags_to_remove, Alteration* additional_alteration) {
+ guint64 result = 0ULL;
+ guint64 new_flags = 0ULL;
+ Alteration* _tmp24_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 966 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), 0ULL);
+#line 966 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail ((additional_alteration == NULL) || IS_ALTERATION (additional_alteration), 0ULL);
+#line 8724 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 8731 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ guint64 _tmp2_ = 0ULL;
+ guint64 _tmp3_ = 0ULL;
+ guint64 _tmp4_ = 0ULL;
+ VideoRow* _tmp5_ = NULL;
+ guint64 _tmp6_ = 0ULL;
+ guint64 _tmp7_ = 0ULL;
+ VideoRow* _tmp21_ = NULL;
+ guint64 _tmp22_ = 0ULL;
+#line 969 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 969 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->flags;
+#line 969 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = flags_to_remove;
+#line 969 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = media_source_internal_remove_flags (_tmp2_, _tmp3_);
+#line 969 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ new_flags = _tmp4_;
+#line 970 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 970 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_->flags;
+#line 970 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = new_flags;
+#line 970 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp6_ == _tmp7_) {
+#line 8760 "VideoSupport.c"
+ VideoRow* _tmp8_ = NULL;
+ guint64 _tmp9_ = 0ULL;
+#line 971 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->priv->backing_row;
+#line 971 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_->flags;
+#line 971 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp9_;
+#line 8769 "VideoSupport.c"
+ {
+ VideoRow* _tmp10_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8776 "VideoSupport.c"
+ }
+#line 971 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8780 "VideoSupport.c"
+ }
+ {
+ VideoTable* _tmp11_ = NULL;
+ VideoTable* _tmp12_ = NULL;
+ VideoID _tmp13_ = {0};
+ guint64 _tmp14_ = 0ULL;
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = video_table_get_instance ();
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_;
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (self, &_tmp13_);
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = new_flags;
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_flags (_tmp12_, &_tmp13_, _tmp14_, &_inner_error_);
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp12_);
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 8803 "VideoSupport.c"
+ goto __catch530_database_error;
+ }
+ {
+ VideoRow* _tmp15_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8812 "VideoSupport.c"
+ }
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 974 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8820 "VideoSupport.c"
+ }
+ }
+ goto __finally530;
+ __catch530_database_error:
+ {
+ GError* e = NULL;
+ GError* _tmp16_ = NULL;
+ VideoRow* _tmp17_ = NULL;
+ guint64 _tmp18_ = 0ULL;
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ e = _inner_error_;
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 976 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = e;
+#line 976 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp16_);
+#line 977 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = self->priv->backing_row;
+#line 977 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = _tmp17_->flags;
+#line 977 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp18_;
+#line 977 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (e);
+#line 8846 "VideoSupport.c"
+ {
+ VideoRow* _tmp19_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8853 "VideoSupport.c"
+ }
+#line 977 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8857 "VideoSupport.c"
+ }
+ __finally530:
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 8862 "VideoSupport.c"
+ {
+ VideoRow* _tmp20_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8869 "VideoSupport.c"
+ }
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 973 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8877 "VideoSupport.c"
+ }
+#line 980 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = self->priv->backing_row;
+#line 980 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = new_flags;
+#line 980 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_->flags = _tmp22_;
+#line 8885 "VideoSupport.c"
+ }
+ __finally529:
+ {
+ VideoRow* _tmp23_ = NULL;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = self->priv->backing_row;
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8894 "VideoSupport.c"
+ }
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.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 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 968 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return 0ULL;
+#line 8904 "VideoSupport.c"
+ }
+ }
+#line 983 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = additional_alteration;
+#line 983 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_notify_flags_altered (self, _tmp24_);
+#line 985 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = new_flags;
+#line 985 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8915 "VideoSupport.c"
+}
+
+
+gboolean video_is_flag_set (Video* self, guint64 flag) {
+ gboolean result = FALSE;
+ GError * _inner_error_ = NULL;
+#line 988 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), FALSE);
+#line 8924 "VideoSupport.c"
+ {
+ VideoRow* _tmp0_ = NULL;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->backing_row;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 8931 "VideoSupport.c"
+ {
+ VideoRow* _tmp1_ = NULL;
+ guint64 _tmp2_ = 0ULL;
+ guint64 _tmp3_ = 0ULL;
+ gboolean _tmp4_ = FALSE;
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->priv->backing_row;
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_->flags;
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = flag;
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = media_source_internal_is_flag_set (_tmp2_, _tmp3_);
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp4_;
+#line 8947 "VideoSupport.c"
+ {
+ VideoRow* _tmp5_ = NULL;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->priv->backing_row;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8954 "VideoSupport.c"
+ }
+#line 990 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 8958 "VideoSupport.c"
+ }
+ __finally531:
+ {
+ VideoRow* _tmp6_ = NULL;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 8967 "VideoSupport.c"
+ }
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.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 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 989 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return FALSE;
+#line 8975 "VideoSupport.c"
+ }
+}
+
+
+static void video_real_set_master_file (Monitorable* base, GFile* file) {
+ Video * self;
+ gchar* new_filepath = NULL;
+ GFile* _tmp0_ = NULL;
+ gchar* _tmp1_ = NULL;
+ gchar* old_filepath = NULL;
+ const gchar* _tmp20_ = NULL;
+ const gchar* _tmp21_ = NULL;
+ GFile* _tmp22_ = NULL;
+ GFile* _tmp23_ = NULL;
+ GFile* _tmp24_ = NULL;
+ Alteration* _tmp25_ = NULL;
+ Alteration* _tmp26_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 994 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO, Video);
+#line 994 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_IS_FILE (file));
+#line 995 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 995 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = g_file_get_path (_tmp0_);
+#line 995 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ new_filepath = _tmp1_;
+#line 996 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old_filepath = NULL;
+#line 9006 "VideoSupport.c"
+ {
+ {
+ VideoRow* _tmp2_ = NULL;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->backing_row;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_lock (&self->priv->__lock_backing_row);
+#line 9014 "VideoSupport.c"
+ {
+ VideoRow* _tmp3_ = NULL;
+ const gchar* _tmp4_ = NULL;
+ const gchar* _tmp5_ = NULL;
+ VideoRow* _tmp7_ = NULL;
+ const gchar* _tmp8_ = NULL;
+ gchar* _tmp9_ = NULL;
+ VideoTable* _tmp10_ = NULL;
+ VideoTable* _tmp11_ = NULL;
+ VideoRow* _tmp12_ = NULL;
+ VideoID _tmp13_ = {0};
+ const gchar* _tmp14_ = NULL;
+ VideoRow* _tmp15_ = NULL;
+ const gchar* _tmp16_ = NULL;
+ gchar* _tmp17_ = NULL;
+#line 999 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->priv->backing_row;
+#line 999 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_->filepath;
+#line 999 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = new_filepath;
+#line 999 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_strcmp0 (_tmp4_, _tmp5_) == 0) {
+#line 9038 "VideoSupport.c"
+ {
+ VideoRow* _tmp6_ = NULL;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->priv->backing_row;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 9045 "VideoSupport.c"
+ }
+#line 1000 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 1000 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_filepath);
+#line 1000 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 9053 "VideoSupport.c"
+ }
+#line 1002 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->priv->backing_row;
+#line 1002 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_->filepath;
+#line 1002 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = g_strdup (_tmp8_);
+#line 1002 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 1002 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old_filepath = _tmp9_;
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video_table_get_instance ();
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = _tmp10_;
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = self->priv->backing_row;
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_->video_id;
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = new_filepath;
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_table_set_filepath (_tmp11_, &_tmp13_, _tmp14_, &_inner_error_);
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp11_);
+#line 1004 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 9081 "VideoSupport.c"
+ goto __finally533;
+ }
+#line 1005 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = self->priv->backing_row;
+#line 1005 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = new_filepath;
+#line 1005 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = g_strdup (_tmp16_);
+#line 1005 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp15_->filepath);
+#line 1005 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_->filepath = _tmp17_;
+#line 9094 "VideoSupport.c"
+ }
+ __finally533:
+ {
+ VideoRow* _tmp18_ = NULL;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = self->priv->backing_row;
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_unlock (&self->priv->__lock_backing_row);
+#line 9103 "VideoSupport.c"
+ }
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_inner_error_->domain == DATABASE_ERROR) {
+#line 9109 "VideoSupport.c"
+ goto __catch532_database_error;
+ }
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_filepath);
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 998 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 9122 "VideoSupport.c"
+ }
+ }
+ }
+ goto __finally532;
+ __catch532_database_error:
+ {
+ GError* err = NULL;
+ GError* _tmp19_ = NULL;
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 1008 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = err;
+#line 1008 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ app_window_database_error (_tmp19_);
+#line 1010 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 1010 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 1010 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_filepath);
+#line 1010 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 9147 "VideoSupport.c"
+ }
+ __finally532:
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_filepath);
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.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 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 997 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 9162 "VideoSupport.c"
+ }
+#line 1013 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = old_filepath;
+#line 1013 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_assert (_tmp20_ != NULL, "old_filepath != null");
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = old_filepath;
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = g_file_new_for_path (_tmp21_);
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = _tmp22_;
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = file;
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media_source_notify_master_replaced (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource), _tmp23_, _tmp24_);
+#line 1014 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp23_);
+#line 1016 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = alteration_new_from_list ("backing:master,metadata:name");
+#line 1016 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = _tmp25_;
+#line 1016 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ data_object_notify_altered (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_OBJECT, DataObject), _tmp26_);
+#line 1016 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _alteration_unref0 (_tmp26_);
+#line 994 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (old_filepath);
+#line 994 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (new_filepath);
+#line 9192 "VideoSupport.c"
+}
+
+
+VideoMetadata* video_read_metadata (Video* self, GError** error) {
+ VideoMetadata* result = NULL;
+ VideoMetadata* _tmp0_ = NULL;
+ GFile* _tmp1_ = NULL;
+ GFile* _tmp2_ = NULL;
+ VideoReader* _tmp3_ = NULL;
+ VideoReader* _tmp4_ = NULL;
+ VideoMetadata* _tmp5_ = NULL;
+ VideoMetadata* _tmp6_ = NULL;
+ VideoMetadata* _tmp7_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 1019 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (self), NULL);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = _tmp1_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_reader_new (_tmp2_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = video_reader_read_metadata (_tmp4_, &_inner_error_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _tmp5_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_reader_unref0 (_tmp4_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp2_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = _tmp6_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_propagate_error (error, _inner_error_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 9233 "VideoSupport.c"
+ }
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = _tmp0_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = NULL;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp7_;
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _media_metadata_unref0 (_tmp0_);
+#line 1020 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9245 "VideoSupport.c"
+}
+
+
+VideoInterpretableResults* video_interpretable_results_construct (GType object_type, Video* video) {
+ VideoInterpretableResults* self = NULL;
+ Video* _tmp0_ = NULL;
+ Video* _tmp1_ = NULL;
+#line 320 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO (video), NULL);
+#line 320 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = (VideoInterpretableResults*) g_type_create_instance (object_type);
+#line 321 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video;
+#line 321 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _g_object_ref0 (_tmp0_);
+#line 321 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->video);
+#line 321 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->video = _tmp1_;
+#line 320 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self;
+#line 9267 "VideoSupport.c"
+}
+
+
+VideoInterpretableResults* video_interpretable_results_new (Video* video) {
+#line 320 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return video_interpretable_results_construct (VIDEO_TYPE_INTERPRETABLE_RESULTS, video);
+#line 9274 "VideoSupport.c"
+}
+
+
+void video_interpretable_results_foreground_finish (VideoInterpretableResults* self) {
+ gboolean _tmp0_ = FALSE;
+ GdkPixbuf* _tmp3_ = NULL;
+ GError * _inner_error_ = NULL;
+#line 324 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (VIDEO_IS_INTERPRETABLE_RESULTS (self));
+#line 325 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->update_interpretable;
+#line 325 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_) {
+#line 9288 "VideoSupport.c"
+ Video* _tmp1_ = NULL;
+ gboolean _tmp2_ = FALSE;
+#line 326 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = self->video;
+#line 326 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->is_interpretable;
+#line 326 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_set_is_interpretable (_tmp1_, _tmp2_);
+#line 9297 "VideoSupport.c"
+ }
+#line 328 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = self->new_thumbnail;
+#line 328 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp3_ != NULL) {
+#line 9303 "VideoSupport.c"
+ {
+ Video* _tmp4_ = NULL;
+ GdkPixbuf* _tmp5_ = NULL;
+ Video* _tmp6_ = NULL;
+ GdkPixbuf* _tmp7_ = NULL;
+ Video* _tmp8_ = NULL;
+#line 330 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = self->video;
+#line 330 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = self->new_thumbnail;
+#line 330 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ thumbnail_cache_replace (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), THUMBNAIL_CACHE_SIZE_BIG, _tmp5_, &_inner_error_);
+#line 330 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 9318 "VideoSupport.c"
+ goto __catch534_g_error;
+ }
+#line 331 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = self->video;
+#line 331 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = self->new_thumbnail;
+#line 331 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ thumbnail_cache_replace (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource), THUMBNAIL_CACHE_SIZE_MEDIUM, _tmp7_, &_inner_error_);
+#line 331 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 9329 "VideoSupport.c"
+ goto __catch534_g_error;
+ }
+#line 333 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = self->video;
+#line 333 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ thumbnail_source_notify_thumbnail_altered (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_THUMBNAIL_SOURCE, ThumbnailSource));
+#line 9336 "VideoSupport.c"
+ }
+ goto __finally534;
+ __catch534_g_error:
+ {
+ GError* err = NULL;
+ Video* _tmp9_ = NULL;
+ gchar* _tmp10_ = NULL;
+ gchar* _tmp11_ = NULL;
+ GError* _tmp12_ = NULL;
+ const gchar* _tmp13_ = NULL;
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ err = _inner_error_;
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _inner_error_ = NULL;
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->video;
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_OBJECT, DataObject));
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = _tmp10_;
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = err;
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = _tmp12_->message;
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_message ("VideoSupport.vala:335: Unable to update video thumbnails for %s: %s", _tmp11_, _tmp13_);
+#line 335 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_free0 (_tmp11_);
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_error_free0 (err);
+#line 9367 "VideoSupport.c"
+ }
+ __finally534:
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (G_UNLIKELY (_inner_error_ != NULL)) {
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.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 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_clear_error (&_inner_error_);
+#line 329 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 9378 "VideoSupport.c"
+ }
+ }
+}
+
+
+static void video_value_interpretable_results_init (GValue* value) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 9387 "VideoSupport.c"
+}
+
+
+static void video_value_interpretable_results_free_value (GValue* value) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (value->data[0].v_pointer) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_unref (value->data[0].v_pointer);
+#line 9396 "VideoSupport.c"
+ }
+}
+
+
+static void video_value_interpretable_results_copy_value (const GValue* src_value, GValue* dest_value) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (src_value->data[0].v_pointer) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = video_interpretable_results_ref (src_value->data[0].v_pointer);
+#line 9406 "VideoSupport.c"
+ } else {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dest_value->data[0].v_pointer = NULL;
+#line 9410 "VideoSupport.c"
+ }
+}
+
+
+static gpointer video_value_interpretable_results_peek_pointer (const GValue* value) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 9418 "VideoSupport.c"
+}
+
+
+static gchar* video_value_interpretable_results_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (collect_values[0].v_pointer) {
+#line 9425 "VideoSupport.c"
+ VideoInterpretableResults* object;
+ object = collect_values[0].v_pointer;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (object->parent_instance.g_class == NULL) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+#line 9432 "VideoSupport.c"
+ } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.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 9436 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = video_interpretable_results_ref (object);
+#line 9440 "VideoSupport.c"
+ } else {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 9444 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 9448 "VideoSupport.c"
+}
+
+
+static gchar* video_value_interpretable_results_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+ VideoInterpretableResults** object_p;
+ object_p = collect_values[0].v_pointer;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!object_p) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+#line 9459 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!value->data[0].v_pointer) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = NULL;
+#line 9465 "VideoSupport.c"
+ } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = value->data[0].v_pointer;
+#line 9469 "VideoSupport.c"
+ } else {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *object_p = video_interpretable_results_ref (value->data[0].v_pointer);
+#line 9473 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return NULL;
+#line 9477 "VideoSupport.c"
+}
+
+
+GParamSpec* video_param_spec_interpretable_results (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+ VideoParamSpecInterpretableResults* spec;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (g_type_is_a (object_type, VIDEO_TYPE_INTERPRETABLE_RESULTS), NULL);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ G_PARAM_SPEC (spec)->value_type = object_type;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return G_PARAM_SPEC (spec);
+#line 9491 "VideoSupport.c"
+}
+
+
+gpointer video_value_get_interpretable_results (const GValue* value) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIDEO_TYPE_INTERPRETABLE_RESULTS), NULL);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return value->data[0].v_pointer;
+#line 9500 "VideoSupport.c"
+}
+
+
+void video_value_set_interpretable_results (GValue* value, gpointer v_object) {
+ VideoInterpretableResults* old;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIDEO_TYPE_INTERPRETABLE_RESULTS));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VIDEO_TYPE_INTERPRETABLE_RESULTS));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_ref (value->data[0].v_pointer);
+#line 9520 "VideoSupport.c"
+ } else {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 9524 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_unref (old);
+#line 9530 "VideoSupport.c"
+ }
+}
+
+
+void video_value_take_interpretable_results (GValue* value, gpointer v_object) {
+ VideoInterpretableResults* old;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, VIDEO_TYPE_INTERPRETABLE_RESULTS));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ old = value->data[0].v_pointer;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (v_object) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, VIDEO_TYPE_INTERPRETABLE_RESULTS));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = v_object;
+#line 9549 "VideoSupport.c"
+ } else {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ value->data[0].v_pointer = NULL;
+#line 9553 "VideoSupport.c"
+ }
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (old) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_unref (old);
+#line 9559 "VideoSupport.c"
+ }
+}
+
+
+static void video_interpretable_results_class_init (VideoInterpretableResultsClass * klass) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_interpretable_results_parent_class = g_type_class_peek_parent (klass);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((VideoInterpretableResultsClass *) klass)->finalize = video_interpretable_results_finalize;
+#line 9569 "VideoSupport.c"
+}
+
+
+static void video_interpretable_results_instance_init (VideoInterpretableResults * self) {
+#line 316 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->update_interpretable = FALSE;
+#line 317 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->is_interpretable = FALSE;
+#line 318 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->new_thumbnail = NULL;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->ref_count = 1;
+#line 9582 "VideoSupport.c"
+}
+
+
+static void video_interpretable_results_finalize (VideoInterpretableResults* obj) {
+ VideoInterpretableResults * self;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, VIDEO_TYPE_INTERPRETABLE_RESULTS, VideoInterpretableResults);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_handlers_destroy (self);
+#line 315 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->video);
+#line 318 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->new_thumbnail);
+#line 9596 "VideoSupport.c"
+}
+
+
+GType video_interpretable_results_get_type (void) {
+ static volatile gsize video_interpretable_results_type_id__volatile = 0;
+ if (g_once_init_enter (&video_interpretable_results_type_id__volatile)) {
+ static const GTypeValueTable g_define_type_value_table = { video_value_interpretable_results_init, video_value_interpretable_results_free_value, video_value_interpretable_results_copy_value, video_value_interpretable_results_peek_pointer, "p", video_value_interpretable_results_collect_value, "p", video_value_interpretable_results_lcopy_value };
+ static const GTypeInfo g_define_type_info = { sizeof (VideoInterpretableResultsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_interpretable_results_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoInterpretableResults), 0, (GInstanceInitFunc) video_interpretable_results_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 video_interpretable_results_type_id;
+ video_interpretable_results_type_id = g_type_register_fundamental (g_type_fundamental_next (), "VideoInterpretableResults", &g_define_type_info, &g_define_type_fundamental_info, 0);
+ g_once_init_leave (&video_interpretable_results_type_id__volatile, video_interpretable_results_type_id);
+ }
+ return video_interpretable_results_type_id__volatile;
+}
+
+
+gpointer video_interpretable_results_ref (gpointer instance) {
+ VideoInterpretableResults* self;
+ self = instance;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_atomic_int_inc (&self->ref_count);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return instance;
+#line 9621 "VideoSupport.c"
+}
+
+
+void video_interpretable_results_unref (gpointer instance) {
+ VideoInterpretableResults* self;
+ self = instance;
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (g_atomic_int_dec_and_test (&self->ref_count)) {
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ VIDEO_INTERPRETABLE_RESULTS_GET_CLASS (self)->finalize (self);
+#line 314 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_free_instance ((GTypeInstance *) self);
+#line 9634 "VideoSupport.c"
+ }
+}
+
+
+static void video_class_init (VideoClass * klass) {
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_parent_class = g_type_class_peek_parent (klass);
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_class_add_private (klass, sizeof (VideoPrivate));
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataSourceClass *) klass)->commit_backlinks = video_real_commit_backlinks;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->set_event_id = video_real_set_event_id;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_backing_files_state = video_real_get_backing_files_state;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((ThumbnailSourceClass *) klass)->get_thumbnail = video_real_get_thumbnail;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_master_md5 = video_real_get_master_md5;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_preview_pixbuf = video_real_get_preview_pixbuf;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((ThumbnailSourceClass *) klass)->create_thumbnail = video_real_create_thumbnail;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataSourceClass *) klass)->get_typename = video_real_get_typename;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataSourceClass *) klass)->get_instance_id = video_real_get_instance_id;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_import_id = video_real_get_import_id;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((ThumbnailSourceClass *) klass)->get_preferred_thumbnail_format = video_real_get_preferred_thumbnail_format;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_title = video_real_get_title;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->set_title = video_real_set_title;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_comment = video_real_get_comment;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->set_comment = video_real_set_comment;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_rating = video_real_get_rating;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->set_rating = video_real_set_rating;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->increase_rating = video_real_increase_rating;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->decrease_rating = video_real_decrease_rating;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->is_trashed = video_real_is_trashed;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->is_offline = video_real_is_offline;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->mark_offline = video_real_mark_offline;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->mark_online = video_real_mark_online;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->trash = video_real_trash;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->untrash = video_real_untrash;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_event_id = video_real_get_event_id;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataObjectClass *) klass)->to_string = video_real_to_string;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_exposure_time = video_real_get_exposure_time;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_dimensions = video_real_get_dimensions;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_filesize = video_real_get_filesize;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_master_filesize = video_real_get_master_filesize;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_timestamp = video_real_get_timestamp;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_file = video_real_get_file;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceClass *) klass)->get_master_file = video_real_get_master_file;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataSourceClass *) klass)->destroy = video_real_destroy;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataSourceClass *) klass)->internal_delete_backing = video_real_internal_delete_backing;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ G_OBJECT_CLASS (klass)->finalize = video_finalize;
+#line 9718 "VideoSupport.c"
+}
+
+
+static void video_flaggable_interface_init (FlaggableIface * iface) {
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_flaggable_parent_iface = g_type_interface_peek_parent (iface);
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->is_flagged = (gboolean (*)(Flaggable*)) video_real_is_flagged;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->mark_flagged = (void (*)(Flaggable*)) video_real_mark_flagged;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->mark_unflagged = (void (*)(Flaggable*)) video_real_mark_unflagged;
+#line 9731 "VideoSupport.c"
+}
+
+
+static void video_monitorable_interface_init (MonitorableIface * iface) {
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_monitorable_parent_iface = g_type_interface_peek_parent (iface);
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->is_offline = (gboolean (*)(Monitorable*)) video_real_is_offline;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->mark_offline = (void (*)(Monitorable*)) video_real_mark_offline;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->mark_online = (void (*)(Monitorable*)) video_real_mark_online;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->set_master_timestamp = (void (*)(Monitorable*, GFileInfo*)) video_real_set_master_timestamp;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->set_master_file = (void (*)(Monitorable*, GFile*)) video_real_set_master_file;
+#line 9748 "VideoSupport.c"
+}
+
+
+static void video_dateable_interface_init (DateableIface * iface) {
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_dateable_parent_iface = g_type_interface_peek_parent (iface);
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->get_exposure_time = (time_t (*)(Dateable*)) video_real_get_exposure_time;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ iface->set_exposure_time = (void (*)(Dateable*, time_t)) video_real_set_exposure_time;
+#line 9759 "VideoSupport.c"
+}
+
+
+static void video_instance_init (Video * self) {
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv = VIDEO_GET_PRIVATE (self);
+#line 348 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_init (&self->priv->__lock_backing_row);
+#line 9768 "VideoSupport.c"
+}
+
+
+static void video_finalize (GObject* obj) {
+ Video * self;
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO, Video);
+#line 348 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_rec_mutex_clear (&self->priv->__lock_backing_row);
+#line 348 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_row_unref0 (self->priv->backing_row);
+#line 307 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ G_OBJECT_CLASS (video_parent_class)->finalize (obj);
+#line 9782 "VideoSupport.c"
+}
+
+
+GType video_get_type (void) {
+ static volatile gsize video_type_id__volatile = 0;
+ if (g_once_init_enter (&video_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (VideoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (Video), 0, (GInstanceInitFunc) video_instance_init, NULL };
+ static const GInterfaceInfo flaggable_info = { (GInterfaceInitFunc) video_flaggable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ static const GInterfaceInfo monitorable_info = { (GInterfaceInitFunc) video_monitorable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ static const GInterfaceInfo dateable_info = { (GInterfaceInitFunc) video_dateable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+ GType video_type_id;
+ video_type_id = g_type_register_static (TYPE_VIDEO_SOURCE, "Video", &g_define_type_info, 0);
+ g_type_add_interface_static (video_type_id, TYPE_FLAGGABLE, &flaggable_info);
+ g_type_add_interface_static (video_type_id, TYPE_MONITORABLE, &monitorable_info);
+ g_type_add_interface_static (video_type_id, TYPE_DATEABLE, &dateable_info);
+ g_once_init_leave (&video_type_id__volatile, video_type_id);
+ }
+ return video_type_id__volatile;
+}
+
+
+GType video_source_collection_state_get_type (void) {
+ static volatile gsize video_source_collection_state_type_id__volatile = 0;
+ if (g_once_init_enter (&video_source_collection_state_type_id__volatile)) {
+ static const GEnumValue values[] = {{VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN, "VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN", "unknown"}, {VIDEO_SOURCE_COLLECTION_STATE_ONLINE, "VIDEO_SOURCE_COLLECTION_STATE_ONLINE", "online"}, {VIDEO_SOURCE_COLLECTION_STATE_OFFLINE, "VIDEO_SOURCE_COLLECTION_STATE_OFFLINE", "offline"}, {VIDEO_SOURCE_COLLECTION_STATE_TRASH, "VIDEO_SOURCE_COLLECTION_STATE_TRASH", "trash"}, {0, NULL, NULL}};
+ GType video_source_collection_state_type_id;
+ video_source_collection_state_type_id = g_enum_register_static ("VideoSourceCollectionState", values);
+ g_once_init_leave (&video_source_collection_state_type_id__volatile, video_source_collection_state_type_id);
+ }
+ return video_source_collection_state_type_id__volatile;
+}
+
+
+static gint _uint64_compare_gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
+ gint result;
+ result = uint64_compare ((guint64*) a, (guint64*) b);
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9821 "VideoSupport.c"
+}
+
+
+static guint64* _uint64_dup (guint64* self) {
+ guint64* dup;
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ dup = g_new0 (guint64, 1);
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ memcpy (dup, self, sizeof (guint64));
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return dup;
+#line 9833 "VideoSupport.c"
+}
+
+
+static gint64 _video_source_collection_get_video_key_get_source_database_key (DataSource* source, gpointer self) {
+ gint64 result;
+ result = video_source_collection_get_video_key (source);
+#line 1046 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9842 "VideoSupport.c"
+}
+
+
+static void _video_source_collection_on_trashcan_contents_altered_source_holding_tank_contents_altered (SourceHoldingTank* _sender, GeeCollection* added, GeeCollection* removed, gpointer self) {
+#line 1048 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_on_trashcan_contents_altered ((VideoSourceCollection*) self, added, removed);
+#line 9849 "VideoSupport.c"
+}
+
+
+static void _video_source_collection_on_offline_contents_altered_source_holding_tank_contents_altered (SourceHoldingTank* _sender, GeeCollection* added, GeeCollection* removed, gpointer self) {
+#line 1049 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_on_offline_contents_altered ((VideoSourceCollection*) self, added, removed);
+#line 9856 "VideoSupport.c"
+}
+
+
+VideoSourceCollection* video_source_collection_construct (GType object_type) {
+ VideoSourceCollection* self = NULL;
+ MediaSourceHoldingTank* _tmp0_ = NULL;
+ MediaSourceHoldingTank* _tmp1_ = NULL;
+ MediaSourceHoldingTank* _tmp2_ = NULL;
+ MediaSourceHoldingTank* _tmp3_ = NULL;
+#line 1046 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = (VideoSourceCollection*) media_source_collection_construct (object_type, "VideoSourceCollection", _video_source_collection_get_video_key_get_source_database_key, NULL);
+#line 1048 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_collection_get_trashcan (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1048 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 1048 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank), "contents-altered", (GCallback) _video_source_collection_on_trashcan_contents_altered_source_holding_tank_contents_altered, self);
+#line 1048 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _source_holding_tank_unref0 (_tmp1_);
+#line 1049 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = media_source_collection_get_offline_bin (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1049 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 1049 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_connect (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, TYPE_SOURCE_HOLDING_TANK, SourceHoldingTank), "contents-altered", (GCallback) _video_source_collection_on_offline_contents_altered_source_holding_tank_contents_altered, self);
+#line 1049 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _source_holding_tank_unref0 (_tmp3_);
+#line 1045 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return self;
+#line 9886 "VideoSupport.c"
+}
+
+
+VideoSourceCollection* video_source_collection_new (void) {
+#line 1045 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return video_source_collection_construct (TYPE_VIDEO_SOURCE_COLLECTION);
+#line 9893 "VideoSupport.c"
+}
+
+
+static gboolean _video_source_collection_is_video_trashed_source_holding_tank_check_to_keep (DataSource* source, Alteration* alteration, gpointer self) {
+ gboolean result;
+ result = video_source_collection_is_video_trashed (source);
+#line 1053 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9902 "VideoSupport.c"
+}
+
+
+static MediaSourceHoldingTank* video_source_collection_real_create_trashcan (MediaSourceCollection* base) {
+ VideoSourceCollection * self;
+ MediaSourceHoldingTank* result = NULL;
+ MediaSourceHoldingTank* _tmp0_ = NULL;
+#line 1052 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1053 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_holding_tank_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), _video_source_collection_is_video_trashed_source_holding_tank_check_to_keep, NULL, _video_source_collection_get_video_key_get_source_database_key, NULL);
+#line 1053 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 1053 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9918 "VideoSupport.c"
+}
+
+
+static gboolean _video_source_collection_is_video_offline_source_holding_tank_check_to_keep (DataSource* source, Alteration* alteration, gpointer self) {
+ gboolean result;
+ result = video_source_collection_is_video_offline (source);
+#line 1057 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9927 "VideoSupport.c"
+}
+
+
+static MediaSourceHoldingTank* video_source_collection_real_create_offline_bin (MediaSourceCollection* base) {
+ VideoSourceCollection * self;
+ MediaSourceHoldingTank* result = NULL;
+ MediaSourceHoldingTank* _tmp0_ = NULL;
+#line 1056 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1057 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = media_source_holding_tank_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), _video_source_collection_is_video_offline_source_holding_tank_check_to_keep, NULL, _video_source_collection_get_video_key_get_source_database_key, NULL);
+#line 1057 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 1057 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9943 "VideoSupport.c"
+}
+
+
+static MediaMonitor* video_source_collection_real_create_media_monitor (MediaSourceCollection* base, Workers* workers, GCancellable* cancellable) {
+ VideoSourceCollection * self;
+ MediaMonitor* result = NULL;
+ GCancellable* _tmp0_ = NULL;
+ VideoMonitor* _tmp1_ = NULL;
+#line 1060 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1060 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_WORKERS (workers), NULL);
+#line 1060 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
+#line 1061 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = cancellable;
+#line 1061 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_monitor_new (_tmp0_);
+#line 1061 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_MEDIA_MONITOR, MediaMonitor);
+#line 1061 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9966 "VideoSupport.c"
+}
+
+
+static gboolean video_source_collection_real_holds_type_of_source (SourceCollection* base, DataSource* source) {
+ VideoSourceCollection * self;
+ gboolean result = FALSE;
+ DataSource* _tmp0_ = NULL;
+#line 1064 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1064 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE);
+#line 1065 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = source;
+#line 1065 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_VIDEO);
+#line 1065 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 9984 "VideoSupport.c"
+}
+
+
+static gchar* video_source_collection_real_get_typename (MediaSourceCollection* base) {
+ VideoSourceCollection * self;
+ gchar* result = NULL;
+ gchar* _tmp0_ = NULL;
+#line 1068 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1069 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = g_strdup (VIDEO_TYPENAME);
+#line 1069 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp0_;
+#line 1069 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10000 "VideoSupport.c"
+}
+
+
+static gboolean video_source_collection_real_is_file_recognized (MediaSourceCollection* base, GFile* file) {
+ VideoSourceCollection * self;
+ gboolean result = FALSE;
+ GFile* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 1072 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1072 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), FALSE);
+#line 1073 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 1073 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = video_reader_is_supported_video_file (_tmp0_);
+#line 1073 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 1073 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10021 "VideoSupport.c"
+}
+
+
+static void video_source_collection_on_trashcan_contents_altered (VideoSourceCollection* self, GeeCollection* added, GeeCollection* removed) {
+ GeeCollection* _tmp0_ = NULL;
+ GeeCollection* _tmp1_ = NULL;
+#line 1076 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_SOURCE_COLLECTION (self));
+#line 1076 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added));
+#line 1076 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed));
+#line 1078 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = added;
+#line 1078 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = removed;
+#line 1078 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), "trashcan-contents-altered", G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 10040 "VideoSupport.c"
+}
+
+
+static void video_source_collection_on_offline_contents_altered (VideoSourceCollection* self, GeeCollection* added, GeeCollection* removed) {
+ GeeCollection* _tmp0_ = NULL;
+ GeeCollection* _tmp1_ = NULL;
+#line 1082 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_SOURCE_COLLECTION (self));
+#line 1082 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added));
+#line 1082 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed));
+#line 1084 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = added;
+#line 1084 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = removed;
+#line 1084 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_signal_emit_by_name (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), "offline-contents-altered", G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_COLLECTION, GeeCollection));
+#line 10059 "VideoSupport.c"
+}
+
+
+static MediaSource* video_source_collection_real_fetch_by_numeric_id (MediaSourceCollection* base, gint64 numeric_id) {
+ VideoSourceCollection * self;
+ MediaSource* result = NULL;
+ gint64 _tmp0_ = 0LL;
+ VideoID _tmp1_ = {0};
+ Video* _tmp2_ = NULL;
+#line 1088 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1089 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = numeric_id;
+#line 1089 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_id_init (&_tmp1_, _tmp0_);
+#line 1089 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video_source_collection_fetch (self, &_tmp1_);
+#line 1089 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_MEDIA_SOURCE, MediaSource);
+#line 1089 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10081 "VideoSupport.c"
+}
+
+
+gint64 video_source_collection_get_video_key (DataSource* source) {
+ gint64 result = 0LL;
+ Video* video = NULL;
+ DataSource* _tmp0_ = NULL;
+ Video* _tmp1_ = NULL;
+ VideoID video_id = {0};
+ VideoID _tmp2_ = {0};
+ VideoID _tmp3_ = {0};
+ gint64 _tmp4_ = 0LL;
+#line 1092 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_DATA_SOURCE (source), 0LL);
+#line 1093 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = source;
+#line 1093 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIDEO, Video));
+#line 1093 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = _tmp1_;
+#line 1094 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (video, &_tmp2_);
+#line 1094 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_id = _tmp2_;
+#line 1096 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_id;
+#line 1096 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_.id;
+#line 1096 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp4_;
+#line 1096 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1096 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10116 "VideoSupport.c"
+}
+
+
+gboolean video_source_collection_is_video_trashed (DataSource* source) {
+ gboolean result = FALSE;
+ DataSource* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 1099 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE);
+#line 1100 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = source;
+#line 1100 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_is_trashed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIDEO, Video), TYPE_MEDIA_SOURCE, MediaSource));
+#line 1100 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 1100 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10134 "VideoSupport.c"
+}
+
+
+gboolean video_source_collection_is_video_offline (DataSource* source) {
+ gboolean result = FALSE;
+ DataSource* _tmp0_ = NULL;
+ gboolean _tmp1_ = FALSE;
+#line 1103 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_DATA_SOURCE (source), FALSE);
+#line 1104 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = source;
+#line 1104 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_is_offline (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_VIDEO, Video), TYPE_MEDIA_SOURCE, MediaSource));
+#line 1104 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp1_;
+#line 1104 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10152 "VideoSupport.c"
+}
+
+
+Video* video_source_collection_fetch (VideoSourceCollection* self, VideoID* video_id) {
+ Video* result = NULL;
+ VideoID _tmp0_ = {0};
+ gint64 _tmp1_ = 0LL;
+ DataSource* _tmp2_ = NULL;
+#line 1107 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_SOURCE_COLLECTION (self), NULL);
+#line 1107 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (video_id != NULL, NULL);
+#line 1108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = *video_id;
+#line 1108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_.id;
+#line 1108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = database_source_collection_fetch_by_key (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), _tmp1_);
+#line 1108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_VIDEO, Video);
+#line 1108 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10175 "VideoSupport.c"
+}
+
+
+static GeeCollection* video_source_collection_real_get_event_source_ids (MediaSourceCollection* base, EventID* event_id) {
+ VideoSourceCollection * self;
+ GeeCollection* result = NULL;
+ VideoTable* _tmp0_ = NULL;
+ VideoTable* _tmp1_ = NULL;
+ EventID _tmp2_ = {0};
+ GeeArrayList* _tmp3_ = NULL;
+ GeeCollection* _tmp4_ = NULL;
+#line 1111 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1111 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (event_id != NULL, NULL);
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video_table_get_instance ();
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = *event_id;
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_table_get_event_source_ids (_tmp1_, &_tmp2_);
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection);
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _database_table_unref0 (_tmp1_);
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp4_;
+#line 1112 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10207 "VideoSupport.c"
+}
+
+
+Video* video_source_collection_get_state_by_file (VideoSourceCollection* self, GFile* file, VideoSourceCollectionState* state) {
+ VideoSourceCollectionState _vala_state = 0;
+ Video* result = NULL;
+ Video* video = NULL;
+ GFile* _tmp0_ = NULL;
+ MediaSource* _tmp1_ = NULL;
+ Video* _tmp2_ = NULL;
+ MediaSourceHoldingTank* _tmp3_ = NULL;
+ MediaSourceHoldingTank* _tmp4_ = NULL;
+ GFile* _tmp5_ = NULL;
+ MediaSource* _tmp6_ = NULL;
+ Video* _tmp7_ = NULL;
+ MediaSourceHoldingTank* _tmp8_ = NULL;
+ MediaSourceHoldingTank* _tmp9_ = NULL;
+ GFile* _tmp10_ = NULL;
+ MediaSource* _tmp11_ = NULL;
+ Video* _tmp12_ = NULL;
+#line 1115 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_SOURCE_COLLECTION (self), NULL);
+#line 1115 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+#line 1116 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = file;
+#line 1116 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_collection_fetch_by_master_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), _tmp0_);
+#line 1116 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_VIDEO, Video);
+#line 1117 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = video;
+#line 1117 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp2_ != NULL) {
+#line 1118 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_state = VIDEO_SOURCE_COLLECTION_STATE_ONLINE;
+#line 1120 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = video;
+#line 1120 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (state) {
+#line 1120 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *state = _vala_state;
+#line 10250 "VideoSupport.c"
+ }
+#line 1120 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10254 "VideoSupport.c"
+ }
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = media_source_collection_get_trashcan (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _tmp3_;
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = file;
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = media_source_holding_tank_fetch_by_master_file (_tmp4_, _tmp5_);
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, TYPE_VIDEO, Video);
+#line 1123 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _source_holding_tank_unref0 (_tmp4_);
+#line 1124 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = video;
+#line 1124 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp7_ != NULL) {
+#line 1125 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_state = VIDEO_SOURCE_COLLECTION_STATE_TRASH;
+#line 1127 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = video;
+#line 1127 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (state) {
+#line 1127 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *state = _vala_state;
+#line 10282 "VideoSupport.c"
+ }
+#line 1127 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10286 "VideoSupport.c"
+ }
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = media_source_collection_get_offline_bin (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = _tmp8_;
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = file;
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = media_source_holding_tank_fetch_by_master_file (_tmp9_, _tmp10_);
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, TYPE_VIDEO, Video);
+#line 1130 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _source_holding_tank_unref0 (_tmp9_);
+#line 1131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = video;
+#line 1131 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp12_ != NULL) {
+#line 1132 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_state = VIDEO_SOURCE_COLLECTION_STATE_OFFLINE;
+#line 1134 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = video;
+#line 1134 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (state) {
+#line 1134 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *state = _vala_state;
+#line 10314 "VideoSupport.c"
+ }
+#line 1134 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10318 "VideoSupport.c"
+ }
+#line 1137 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _vala_state = VIDEO_SOURCE_COLLECTION_STATE_UNKNOWN;
+#line 1139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = NULL;
+#line 1139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (state) {
+#line 1139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *state = _vala_state;
+#line 10330 "VideoSupport.c"
+ }
+#line 1139 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10334 "VideoSupport.c"
+}
+
+
+static void video_source_collection_compare_backing (VideoSourceCollection* self, Video* video, GFileInfo* info, GeeCollection* matching_master) {
+ Video* _tmp0_ = NULL;
+ guint64 _tmp1_ = 0ULL;
+ GFileInfo* _tmp2_ = NULL;
+ gint64 _tmp3_ = 0LL;
+ Video* _tmp4_ = NULL;
+ time_t _tmp5_ = 0;
+ GFileInfo* _tmp6_ = NULL;
+ GTimeVal _tmp7_ = {0};
+ glong _tmp8_ = 0L;
+#line 1142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_SOURCE_COLLECTION (self));
+#line 1142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO (video));
+#line 1142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_IS_FILE_INFO (info));
+#line 1142 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (GEE_IS_COLLECTION (matching_master));
+#line 1143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = video;
+#line 1143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_get_filesize (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = info;
+#line 1143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = g_file_info_get_size (_tmp2_);
+#line 1143 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp1_ != ((guint64) _tmp3_)) {
+#line 1144 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 10368 "VideoSupport.c"
+ }
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = video;
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = media_source_get_timestamp (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = info;
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_file_info_get_modification_time (_tmp6_, &_tmp7_);
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _tmp7_.tv_sec;
+#line 1146 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp5_ == ((time_t) _tmp8_)) {
+#line 10382 "VideoSupport.c"
+ GeeCollection* _tmp9_ = NULL;
+ Video* _tmp10_ = NULL;
+#line 1147 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = matching_master;
+#line 1147 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video;
+#line 1147 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_collection_add (_tmp9_, _tmp10_);
+#line 10391 "VideoSupport.c"
+ }
+}
+
+
+void video_source_collection_fetch_by_matching_backing (VideoSourceCollection* self, GFileInfo* info, GeeCollection* matching_master) {
+#line 1150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_SOURCE_COLLECTION (self));
+#line 1150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (G_IS_FILE_INFO (info));
+#line 1150 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (GEE_IS_COLLECTION (matching_master));
+#line 10403 "VideoSupport.c"
+ {
+ GeeIterator* _object_it = NULL;
+ GeeCollection* _tmp0_ = NULL;
+ GeeCollection* _tmp1_ = NULL;
+ GeeIterator* _tmp2_ = NULL;
+ GeeIterator* _tmp3_ = NULL;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = data_collection_get_all (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection));
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = _tmp0_;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp1_);
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _object_it = _tmp3_;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 10424 "VideoSupport.c"
+ GeeIterator* _tmp4_ = NULL;
+ gboolean _tmp5_ = FALSE;
+ DataObject* object = NULL;
+ GeeIterator* _tmp6_ = NULL;
+ gpointer _tmp7_ = NULL;
+ DataObject* _tmp8_ = NULL;
+ GFileInfo* _tmp9_ = NULL;
+ GeeCollection* _tmp10_ = NULL;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = _object_it;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = gee_iterator_next (_tmp4_);
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp5_) {
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 10441 "VideoSupport.c"
+ }
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _object_it;
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = gee_iterator_get (_tmp6_);
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ object = (DataObject*) _tmp7_;
+#line 1152 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = object;
+#line 1152 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = info;
+#line 1152 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = matching_master;
+#line 1152 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_compare_backing (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, TYPE_VIDEO, Video), _tmp9_, _tmp10_);
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (object);
+#line 10459 "VideoSupport.c"
+ }
+#line 1151 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_object_it);
+#line 10463 "VideoSupport.c"
+ }
+ {
+ GeeIterator* _media_it = NULL;
+ GeeCollection* _tmp11_ = NULL;
+ GeeCollection* _tmp12_ = NULL;
+ GeeIterator* _tmp13_ = NULL;
+ GeeIterator* _tmp14_ = NULL;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = media_source_collection_get_offline_bin_contents (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = _tmp13_;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp12_);
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _media_it = _tmp14_;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 10485 "VideoSupport.c"
+ GeeIterator* _tmp15_ = NULL;
+ gboolean _tmp16_ = FALSE;
+ MediaSource* media = NULL;
+ GeeIterator* _tmp17_ = NULL;
+ gpointer _tmp18_ = NULL;
+ MediaSource* _tmp19_ = NULL;
+ GFileInfo* _tmp20_ = NULL;
+ GeeCollection* _tmp21_ = NULL;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = _media_it;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = gee_iterator_next (_tmp15_);
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp16_) {
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 10502 "VideoSupport.c"
+ }
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = _media_it;
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = gee_iterator_get (_tmp17_);
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ media = (MediaSource*) _tmp18_;
+#line 1155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = media;
+#line 1155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = info;
+#line 1155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = matching_master;
+#line 1155 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_compare_backing (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp19_, TYPE_VIDEO, Video), _tmp20_, _tmp21_);
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (media);
+#line 10520 "VideoSupport.c"
+ }
+#line 1154 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_media_it);
+#line 10524 "VideoSupport.c"
+ }
+}
+
+
+static void video_source_collection_real_notify_contents_altered (DataCollection* base, GeeIterable* added, GeeIterable* removed) {
+ VideoSourceCollection * self;
+ GeeIterable* _tmp0_ = NULL;
+ GeeIterable* _tmp13_ = NULL;
+ GeeIterable* _tmp26_ = NULL;
+ GeeIterable* _tmp27_ = NULL;
+#line 1158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((added == NULL) || GEE_IS_ITERABLE (added));
+#line 1158 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail ((removed == NULL) || GEE_IS_ITERABLE (removed));
+#line 1160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = added;
+#line 1160 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_ != NULL) {
+#line 10545 "VideoSupport.c"
+ {
+ GeeIterator* _object_it = NULL;
+ GeeIterable* _tmp1_ = NULL;
+ GeeIterator* _tmp2_ = NULL;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = added;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = gee_iterable_iterator (_tmp1_);
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _object_it = _tmp2_;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 10558 "VideoSupport.c"
+ GeeIterator* _tmp3_ = NULL;
+ gboolean _tmp4_ = FALSE;
+ DataObject* object = NULL;
+ GeeIterator* _tmp5_ = NULL;
+ gpointer _tmp6_ = NULL;
+ Video* video = NULL;
+ DataObject* _tmp7_ = NULL;
+ Video* _tmp8_ = NULL;
+ GeeMultiMap* _tmp9_ = NULL;
+ Video* _tmp10_ = NULL;
+ guint64 _tmp11_ = 0ULL;
+ Video* _tmp12_ = NULL;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _object_it;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = gee_iterator_next (_tmp3_);
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp4_) {
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 10579 "VideoSupport.c"
+ }
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _object_it;
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = gee_iterator_get (_tmp5_);
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ object = (DataObject*) _tmp6_;
+#line 1162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = object;
+#line 1162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, TYPE_VIDEO, Video));
+#line 1162 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = _tmp8_;
+#line 1164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = self->priv->filesize_to_video;
+#line 1164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video;
+#line 1164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = media_source_get_master_filesize (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = video;
+#line 1164 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_multi_map_set (_tmp9_, &_tmp11_, _tmp12_);
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (object);
+#line 10607 "VideoSupport.c"
+ }
+#line 1161 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_object_it);
+#line 10611 "VideoSupport.c"
+ }
+ }
+#line 1168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = removed;
+#line 1168 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp13_ != NULL) {
+#line 10618 "VideoSupport.c"
+ {
+ GeeIterator* _object_it = NULL;
+ GeeIterable* _tmp14_ = NULL;
+ GeeIterator* _tmp15_ = NULL;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = removed;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = gee_iterable_iterator (_tmp14_);
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _object_it = _tmp15_;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 10631 "VideoSupport.c"
+ GeeIterator* _tmp16_ = NULL;
+ gboolean _tmp17_ = FALSE;
+ DataObject* object = NULL;
+ GeeIterator* _tmp18_ = NULL;
+ gpointer _tmp19_ = NULL;
+ Video* video = NULL;
+ DataObject* _tmp20_ = NULL;
+ Video* _tmp21_ = NULL;
+ GeeMultiMap* _tmp22_ = NULL;
+ Video* _tmp23_ = NULL;
+ guint64 _tmp24_ = 0ULL;
+ Video* _tmp25_ = NULL;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = _object_it;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = gee_iterator_next (_tmp16_);
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp17_) {
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 10652 "VideoSupport.c"
+ }
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp18_ = _object_it;
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp19_ = gee_iterator_get (_tmp18_);
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ object = (DataObject*) _tmp19_;
+#line 1170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp20_ = object;
+#line 1170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp21_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_CAST (_tmp20_, TYPE_VIDEO, Video));
+#line 1170 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = _tmp21_;
+#line 1172 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp22_ = self->priv->filesize_to_video;
+#line 1172 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp23_ = video;
+#line 1172 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp24_ = media_source_get_master_filesize (G_TYPE_CHECK_INSTANCE_CAST (_tmp23_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1172 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp25_ = video;
+#line 1172 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ gee_multi_map_remove (_tmp22_, &_tmp24_, _tmp25_);
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (object);
+#line 10680 "VideoSupport.c"
+ }
+#line 1169 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_object_it);
+#line 10684 "VideoSupport.c"
+ }
+ }
+#line 1176 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp26_ = added;
+#line 1176 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp27_ = removed;
+#line 1176 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ DATA_COLLECTION_CLASS (video_source_collection_parent_class)->notify_contents_altered (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection), TYPE_DATA_COLLECTION, DataCollection), _tmp26_, _tmp27_);
+#line 10693 "VideoSupport.c"
+}
+
+
+void video_source_collection_get_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize, VideoID* result) {
+ VideoID _tmp19_ = {0};
+#line 1179 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (IS_VIDEO_SOURCE_COLLECTION (self));
+#line 1179 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_if_fail (basename != NULL);
+#line 10703 "VideoSupport.c"
+ {
+ GeeIterator* _video_it = NULL;
+ GeeMultiMap* _tmp0_ = NULL;
+ guint64 _tmp1_ = 0ULL;
+ GeeCollection* _tmp2_ = NULL;
+ GeeCollection* _tmp3_ = NULL;
+ GeeIterator* _tmp4_ = NULL;
+ GeeIterator* _tmp5_ = NULL;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->filesize_to_video;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = filesize;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = gee_multi_map_get (_tmp0_, &_tmp1_);
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = _tmp2_;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp5_ = _tmp4_;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp3_);
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _video_it = _tmp5_;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ while (TRUE) {
+#line 10730 "VideoSupport.c"
+ GeeIterator* _tmp6_ = NULL;
+ gboolean _tmp7_ = FALSE;
+ Video* video = NULL;
+ GeeIterator* _tmp8_ = NULL;
+ gpointer _tmp9_ = NULL;
+ Video* _tmp10_ = NULL;
+ GFile* _tmp11_ = NULL;
+ GFile* _tmp12_ = NULL;
+ gchar* _tmp13_ = NULL;
+ const gchar* _tmp14_ = NULL;
+ gint _tmp15_ = 0;
+ gboolean _tmp16_ = FALSE;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp6_ = _video_it;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp7_ = gee_iterator_next (_tmp6_);
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (!_tmp7_) {
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ break;
+#line 10751 "VideoSupport.c"
+ }
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp8_ = _video_it;
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp9_ = gee_iterator_get (_tmp8_);
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video = (Video*) _tmp9_;
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp10_ = video;
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp11_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource));
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp12_ = _tmp11_;
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp13_ = g_file_get_basename (_tmp12_);
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp14_ = basename;
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp15_ = utf8_ci_compare (_tmp13_, _tmp14_);
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp16_ = _tmp15_ == 0;
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_tmp12_);
+#line 1181 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp16_) {
+#line 10777 "VideoSupport.c"
+ Video* _tmp17_ = NULL;
+ VideoID _tmp18_ = {0};
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp17_ = video;
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_get_video_id (_tmp17_, &_tmp18_);
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp18_;
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_video_it);
+#line 1182 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 10792 "VideoSupport.c"
+ }
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (video);
+#line 10796 "VideoSupport.c"
+ }
+#line 1180 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (_video_it);
+#line 10800 "VideoSupport.c"
+ }
+#line 1185 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_id_init (&_tmp19_, VIDEO_ID_INVALID);
+#line 1185 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ *result = _tmp19_;
+#line 1185 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return;
+#line 10808 "VideoSupport.c"
+}
+
+
+gboolean video_source_collection_has_basename_filesize_duplicate (VideoSourceCollection* self, const gchar* basename, guint64 filesize) {
+ gboolean result = FALSE;
+ const gchar* _tmp0_ = NULL;
+ guint64 _tmp1_ = 0ULL;
+ VideoID _tmp2_ = {0};
+ gboolean _tmp3_ = FALSE;
+#line 1189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (IS_VIDEO_SOURCE_COLLECTION (self), FALSE);
+#line 1189 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_return_val_if_fail (basename != NULL, FALSE);
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = basename;
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = filesize;
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_get_basename_filesize_duplicate (self, _tmp0_, _tmp1_, &_tmp2_);
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp3_ = video_id_is_valid (&_tmp2_);
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp3_;
+#line 1190 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10834 "VideoSupport.c"
+}
+
+
+static TransactionController* video_source_collection_real_get_transaction_controller (MediaSourceCollection* base) {
+ TransactionController* result;
+ VideoSourceCollection* self;
+ TransactionController* _tmp0_ = NULL;
+ TransactionController* _tmp2_ = NULL;
+#line 1033 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1034 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = self->priv->_transaction_controller;
+#line 1034 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ if (_tmp0_ == NULL) {
+#line 10849 "VideoSupport.c"
+ MediaSourceTransactionController* _tmp1_ = NULL;
+#line 1035 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp1_ = media_source_transaction_controller_new (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection));
+#line 1035 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _transaction_controller_unref0 (self->priv->_transaction_controller);
+#line 1035 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->_transaction_controller = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_TRANSACTION_CONTROLLER, TransactionController);
+#line 10857 "VideoSupport.c"
+ }
+#line 1037 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp2_ = self->priv->_transaction_controller;
+#line 1037 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ result = _tmp2_;
+#line 1037 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ return result;
+#line 10865 "VideoSupport.c"
+}
+
+
+static void video_source_collection_class_init (VideoSourceCollectionClass * klass) {
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ video_source_collection_parent_class = g_type_class_peek_parent (klass);
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataCollectionClass *) klass)->finalize = video_source_collection_finalize;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ g_type_class_add_private (klass, sizeof (VideoSourceCollectionPrivate));
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->create_trashcan = video_source_collection_real_create_trashcan;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->create_offline_bin = video_source_collection_real_create_offline_bin;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->create_media_monitor = video_source_collection_real_create_media_monitor;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((SourceCollectionClass *) klass)->holds_type_of_source = video_source_collection_real_holds_type_of_source;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->get_typename = video_source_collection_real_get_typename;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->is_file_recognized = video_source_collection_real_is_file_recognized;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->fetch_by_numeric_id = video_source_collection_real_fetch_by_numeric_id;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((MediaSourceCollectionClass *) klass)->get_event_source_ids = video_source_collection_real_get_event_source_ids;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ ((DataCollectionClass *) klass)->notify_contents_altered = video_source_collection_real_notify_contents_altered;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ MEDIA_SOURCE_COLLECTION_CLASS (klass)->get_transaction_controller = video_source_collection_real_get_transaction_controller;
+#line 10896 "VideoSupport.c"
+}
+
+
+static void video_source_collection_instance_init (VideoSourceCollection * self) {
+ GeeTreeMultiMap* _tmp0_ = NULL;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv = VIDEO_SOURCE_COLLECTION_GET_PRIVATE (self);
+#line 1041 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->_transaction_controller = NULL;
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _tmp0_ = gee_tree_multi_map_new (G_TYPE_UINT64, (GBoxedCopyFunc) _uint64_dup, g_free, TYPE_VIDEO, (GBoxedCopyFunc) g_object_ref, g_object_unref, _uint64_compare_gcompare_data_func, NULL, NULL, NULL, NULL, NULL);
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self->priv->filesize_to_video = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MULTI_MAP, GeeMultiMap);
+#line 10910 "VideoSupport.c"
+}
+
+
+static void video_source_collection_finalize (DataCollection* obj) {
+ VideoSourceCollection * self;
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_VIDEO_SOURCE_COLLECTION, VideoSourceCollection);
+#line 1041 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _transaction_controller_unref0 (self->priv->_transaction_controller);
+#line 1042 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ _g_object_unref0 (self->priv->filesize_to_video);
+#line 1024 "/home/jens/Source/shotwell/src/VideoSupport.vala"
+ DATA_COLLECTION_CLASS (video_source_collection_parent_class)->finalize (obj);
+#line 10924 "VideoSupport.c"
+}
+
+
+GType video_source_collection_get_type (void) {
+ static volatile gsize video_source_collection_type_id__volatile = 0;
+ if (g_once_init_enter (&video_source_collection_type_id__volatile)) {
+ static const GTypeInfo g_define_type_info = { sizeof (VideoSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) video_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (VideoSourceCollection), 0, (GInstanceInitFunc) video_source_collection_instance_init, NULL };
+ GType video_source_collection_type_id;
+ video_source_collection_type_id = g_type_register_static (TYPE_MEDIA_SOURCE_COLLECTION, "VideoSourceCollection", &g_define_type_info, 0);
+ g_once_init_leave (&video_source_collection_type_id__volatile, video_source_collection_type_id);
+ }
+ return video_source_collection_type_id__volatile;
+}
+
+
+static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ if ((array != NULL) && (destroy_func != NULL)) {
+ int i;
+ for (i = 0; i < array_length; i = i + 1) {
+ if (((gpointer*) array)[i] != NULL) {
+ destroy_func (((gpointer*) array)[i]);
+ }
+ }
+ }
+}
+
+
+static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
+ _vala_array_destroy (array, array_length, destroy_func);
+ g_free (array);
+}
+
+
+