diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-07-09 12:10:38 +0200 |
commit | 709e2d6f5652ec90c194a4ec2b530bebc6f952cb (patch) | |
tree | 496b2f3899e1d5728ee9ae76095cc5056c317447 /src/photos/JfifSupport.c | |
parent | f1353e9ffd34db5f755c7da0b3f9c10638fbfd38 (diff) | |
parent | 5c8be07095cc04a6d8a95204b0504fd7ab030154 (diff) |
Merge branch 'release/0.28.3-1'0.28.3-1
Diffstat (limited to 'src/photos/JfifSupport.c')
-rw-r--r-- | src/photos/JfifSupport.c | 1198 |
1 files changed, 714 insertions, 484 deletions
diff --git a/src/photos/JfifSupport.c b/src/photos/JfifSupport.c index baaaf55..e4e9217 100644 --- a/src/photos/JfifSupport.c +++ b/src/photos/JfifSupport.c @@ -1,4 +1,4 @@ -/* JfifSupport.c generated by valac 0.36.6, the Vala compiler +/* JfifSupport.c generated by valac 0.40.4, the Vala compiler * generated from JfifSupport.vala, do not modify */ /* Copyright 2016 Software Freedom Conservancy Inc. @@ -7,6 +7,7 @@ * See the COPYING file in this distribution. */ + #include <glib.h> #include <glib-object.h> #include <stdlib.h> @@ -481,31 +482,55 @@ static gpointer jfif_metadata_writer_parent_class = NULL; gpointer photo_file_format_driver_ref (gpointer instance); void photo_file_format_driver_unref (gpointer instance); -GParamSpec* param_spec_photo_file_format_driver (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_photo_file_format_driver (GValue* value, gpointer v_object); -void value_take_photo_file_format_driver (GValue* value, gpointer v_object); +GParamSpec* param_spec_photo_file_format_driver (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_photo_file_format_driver (GValue* value, + gpointer v_object); +void value_take_photo_file_format_driver (GValue* value, + gpointer v_object); gpointer value_get_photo_file_format_driver (const GValue* value); GType photo_file_format_driver_get_type (void) G_GNUC_CONST; gpointer photo_file_format_properties_ref (gpointer instance); void photo_file_format_properties_unref (gpointer instance); -GParamSpec* param_spec_photo_file_format_properties (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_photo_file_format_properties (GValue* value, gpointer v_object); -void value_take_photo_file_format_properties (GValue* value, gpointer v_object); +GParamSpec* param_spec_photo_file_format_properties (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_photo_file_format_properties (GValue* value, + gpointer v_object); +void value_take_photo_file_format_properties (GValue* value, + gpointer v_object); gpointer value_get_photo_file_format_properties (const GValue* value); GType photo_file_format_properties_get_type (void) G_GNUC_CONST; gpointer photo_file_adapter_ref (gpointer instance); void photo_file_adapter_unref (gpointer instance); -GParamSpec* param_spec_photo_file_adapter (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_photo_file_adapter (GValue* value, gpointer v_object); -void value_take_photo_file_adapter (GValue* value, gpointer v_object); +GParamSpec* param_spec_photo_file_adapter (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_photo_file_adapter (GValue* value, + gpointer v_object); +void value_take_photo_file_adapter (GValue* value, + gpointer v_object); gpointer value_get_photo_file_adapter (const GValue* value); GType photo_file_adapter_get_type (void) G_GNUC_CONST; GType photo_file_reader_get_type (void) G_GNUC_CONST; 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); +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 photo_metadata_get_type (void) G_GNUC_CONST; @@ -514,15 +539,18 @@ GType photo_file_metadata_writer_get_type (void) G_GNUC_CONST; GType photo_file_sniffer_options_get_type (void) G_GNUC_CONST; gpointer photo_file_sniffer_ref (gpointer instance); void photo_file_sniffer_unref (gpointer instance); -GParamSpec* param_spec_photo_file_sniffer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_photo_file_sniffer (GValue* value, gpointer v_object); -void value_take_photo_file_sniffer (GValue* value, gpointer v_object); +GParamSpec* param_spec_photo_file_sniffer (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_photo_file_sniffer (GValue* value, + gpointer v_object); +void value_take_photo_file_sniffer (GValue* value, + gpointer v_object); gpointer value_get_photo_file_sniffer (const GValue* value); GType photo_file_sniffer_get_type (void) G_GNUC_CONST; GType jfif_file_format_driver_get_type (void) G_GNUC_CONST; -enum { - JFIF_FILE_FORMAT_DRIVER_DUMMY_PROPERTY -}; void jfif_file_format_driver_init (void); JfifFileFormatDriver* jfif_file_format_driver_new (void); JfifFileFormatDriver* jfif_file_format_driver_construct (GType object_type); @@ -531,9 +559,11 @@ JfifFileFormatDriver* jfif_file_format_driver_get_instance (void); static PhotoFileFormatProperties* jfif_file_format_driver_real_get_properties (PhotoFileFormatDriver* base); GType jfif_file_format_properties_get_type (void) G_GNUC_CONST; JfifFileFormatProperties* jfif_file_format_properties_get_instance (void); -static PhotoFileReader* jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath); +static PhotoFileReader* jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, + const gchar* filepath); JfifReader* jfif_reader_new (const gchar* filepath); -JfifReader* jfif_reader_construct (GType object_type, const gchar* filepath); +JfifReader* jfif_reader_construct (GType object_type, + const gchar* filepath); GType gdk_reader_get_type (void) G_GNUC_CONST; GType jfif_reader_get_type (void) G_GNUC_CONST; static PhotoMetadata* jfif_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base); @@ -541,74 +571,98 @@ PhotoMetadata* photo_metadata_new (void); PhotoMetadata* photo_metadata_construct (GType object_type); static gboolean jfif_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base); static gboolean jfif_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base); -static PhotoFileWriter* jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath); +static PhotoFileWriter* jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, + const gchar* filepath); JfifWriter* jfif_writer_new (const gchar* filepath); -JfifWriter* jfif_writer_construct (GType object_type, const gchar* filepath); +JfifWriter* jfif_writer_construct (GType object_type, + const gchar* filepath); GType jfif_writer_get_type (void) G_GNUC_CONST; -static PhotoFileMetadataWriter* jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath); +static PhotoFileMetadataWriter* jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, + const gchar* filepath); JfifMetadataWriter* jfif_metadata_writer_new (const gchar* filepath); -JfifMetadataWriter* jfif_metadata_writer_construct (GType object_type, const gchar* filepath); +JfifMetadataWriter* jfif_metadata_writer_construct (GType object_type, + const gchar* filepath); GType jfif_metadata_writer_get_type (void) G_GNUC_CONST; -static PhotoFileSniffer* jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options); -JfifSniffer* jfif_sniffer_new (GFile* file, PhotoFileSnifferOptions options); -JfifSniffer* jfif_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options); +static PhotoFileSniffer* jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, + GFile* file, + PhotoFileSnifferOptions options); +JfifSniffer* jfif_sniffer_new (GFile* file, + PhotoFileSnifferOptions options); +JfifSniffer* jfif_sniffer_construct (GType object_type, + GFile* file, + PhotoFileSnifferOptions options); GType gdk_sniffer_get_type (void) G_GNUC_CONST; GType jfif_sniffer_get_type (void) G_GNUC_CONST; PhotoFileFormatDriver* photo_file_format_driver_construct (GType object_type); static void jfif_file_format_driver_finalize (PhotoFileFormatDriver * obj); GType photo_file_format_get_type (void) G_GNUC_CONST; GType photo_file_format_flags_get_type (void) G_GNUC_CONST; -enum { - JFIF_FILE_FORMAT_PROPERTIES_DUMMY_PROPERTY -}; JfifFileFormatProperties* jfif_file_format_properties_new (void); JfifFileFormatProperties* jfif_file_format_properties_construct (GType object_type); static PhotoFileFormat jfif_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base); static PhotoFileFormatFlags jfif_file_format_properties_real_get_flags (PhotoFileFormatProperties* base); static gchar* jfif_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base); static gchar* jfif_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base); -static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1); -static gchar** _vala_array_dup8 (gchar** self, int length); +static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, + int* result_length1); +static gchar** _vala_array_dup6 (gchar** self, + int length); static gchar* jfif_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base); -static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1); -static gchar** _vala_array_dup9 (gchar** self, int length); +static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, + int* result_length1); +static gchar** _vala_array_dup7 (gchar** self, + int length); PhotoFileFormatProperties* photo_file_format_properties_construct (GType object_type); static void jfif_file_format_properties_finalize (PhotoFileFormatProperties * obj); gpointer detected_photo_information_ref (gpointer instance); void detected_photo_information_unref (gpointer instance); -GParamSpec* param_spec_detected_photo_information (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags); -void value_set_detected_photo_information (GValue* value, gpointer v_object); -void value_take_detected_photo_information (GValue* value, gpointer v_object); +GParamSpec* param_spec_detected_photo_information (const gchar* name, + const gchar* nick, + const gchar* blurb, + GType object_type, + GParamFlags flags); +void value_set_detected_photo_information (GValue* value, + gpointer v_object); +void value_take_detected_photo_information (GValue* value, + gpointer v_object); gpointer value_get_detected_photo_information (const GValue* value); GType detected_photo_information_get_type (void) G_GNUC_CONST; -enum { - JFIF_SNIFFER_DUMMY_PROPERTY -}; -GdkSniffer* gdk_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options); -static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error); -gboolean jpeg_is_jpeg (GFile* file, GError** error); -DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, gboolean* is_corrupted, GError** error); +GdkSniffer* gdk_sniffer_construct (GType object_type, + GFile* file, + PhotoFileSnifferOptions options); +static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base, + gboolean* is_corrupted, + GError** error); +gboolean jpeg_is_jpeg (GFile* file, + GError** error); +DetectedPhotoInformation* photo_file_sniffer_sniff (PhotoFileSniffer* self, + gboolean* is_corrupted, + GError** error); GType dimensions_get_type (void) G_GNUC_CONST; Dimensions* dimensions_dup (const Dimensions* self); void dimensions_free (Dimensions* self); -enum { - JFIF_READER_DUMMY_PROPERTY -}; -GdkReader* gdk_reader_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format); +GdkReader* gdk_reader_construct (GType object_type, + const gchar* filepath, + PhotoFileFormat file_format); GType jpeg_quality_get_type (void) G_GNUC_CONST; -enum { - JFIF_WRITER_DUMMY_PROPERTY -}; -PhotoFileWriter* photo_file_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format); -static void jfif_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error); +PhotoFileWriter* photo_file_writer_construct (GType object_type, + const gchar* filepath, + PhotoFileFormat file_format); +static void jfif_writer_real_write (PhotoFileWriter* base, + GdkPixbuf* pixbuf, + JpegQuality quality, + GError** error); gchar* photo_file_adapter_get_filepath (PhotoFileAdapter* self); gchar* jpeg_quality_get_pct_text (JpegQuality self); -enum { - JFIF_METADATA_WRITER_DUMMY_PROPERTY -}; -PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, const gchar* filepath, PhotoFileFormat file_format); -static void jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error); -void photo_metadata_write_to_file (PhotoMetadata* self, GFile* file, GError** error); +PhotoFileMetadataWriter* photo_file_metadata_writer_construct (GType object_type, + const gchar* filepath, + PhotoFileFormat file_format); +static void jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, + PhotoMetadata* metadata, + GError** error); +void photo_metadata_write_to_file (PhotoMetadata* self, + GFile* file, + GError** error); GFile* photo_file_adapter_get_file (PhotoFileAdapter* self); #define JPEG_MARKER_PREFIX ((guint8) 0xFF) GType jpeg_marker_get_type (void) G_GNUC_CONST; @@ -616,10 +670,18 @@ guint8 jpeg_marker_get_byte (JpegMarker self); gint jpeg_quality_get_pct (JpegQuality self); JpegQuality* jpeg_quality_get_all (int* result_length1); gchar* jpeg_quality_to_string (JpegQuality self); -gint jpeg_read_marker (GFileInputStream* fins, JpegMarker* marker, GError** error); - - -void jfif_file_format_driver_init (void) { +gboolean jpeg_is_jpeg_stream (GInputStream* ins, + GError** error); +gint jpeg_read_marker (GInputStream* fins, + JpegMarker* marker, + GError** error); +gboolean jpeg_is_jpeg_bytes (GBytes* bytes, + GError** error); + + +void +jfif_file_format_driver_init (void) +{ JfifFileFormatDriver* _tmp0_; #line 11 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0_ = jfif_file_format_driver_new (); @@ -629,18 +691,22 @@ void jfif_file_format_driver_init (void) { jfif_file_format_driver_instance = _tmp0_; #line 12 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_file_format_properties_init (); -#line 633 "JfifSupport.c" +#line 695 "JfifSupport.c" } -static gpointer _photo_file_format_driver_ref0 (gpointer self) { +static gpointer +_photo_file_format_driver_ref0 (gpointer self) +{ #line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self ? photo_file_format_driver_ref (self) : NULL; -#line 640 "JfifSupport.c" +#line 704 "JfifSupport.c" } -JfifFileFormatDriver* jfif_file_format_driver_get_instance (void) { +JfifFileFormatDriver* +jfif_file_format_driver_get_instance (void) +{ JfifFileFormatDriver* result = NULL; JfifFileFormatDriver* _tmp0_; JfifFileFormatDriver* _tmp1_; @@ -652,11 +718,13 @@ JfifFileFormatDriver* jfif_file_format_driver_get_instance (void) { result = _tmp1_; #line 16 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 656 "JfifSupport.c" +#line 722 "JfifSupport.c" } -static PhotoFileFormatProperties* jfif_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) { +static PhotoFileFormatProperties* +jfif_file_format_driver_real_get_properties (PhotoFileFormatDriver* base) +{ JfifFileFormatDriver * self; PhotoFileFormatProperties* result = NULL; JfifFileFormatProperties* _tmp0_; @@ -668,32 +736,34 @@ static PhotoFileFormatProperties* jfif_file_format_driver_real_get_properties (P result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_FORMAT_PROPERTIES, PhotoFileFormatProperties); #line 20 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 672 "JfifSupport.c" +#line 740 "JfifSupport.c" } -static PhotoFileReader* jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, const gchar* filepath) { +static PhotoFileReader* +jfif_file_format_driver_real_create_reader (PhotoFileFormatDriver* base, + const gchar* filepath) +{ JfifFileFormatDriver * self; PhotoFileReader* result = NULL; - const gchar* _tmp0_; - JfifReader* _tmp1_; + JfifReader* _tmp0_; #line 23 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver); #line 23 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = jfif_reader_new (_tmp0_); + _tmp0_ = jfif_reader_new (filepath); #line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_READER, PhotoFileReader); + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_READER, PhotoFileReader); #line 24 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 693 "JfifSupport.c" +#line 761 "JfifSupport.c" } -static PhotoMetadata* jfif_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) { +static PhotoMetadata* +jfif_file_format_driver_real_create_metadata (PhotoFileFormatDriver* base) +{ JfifFileFormatDriver * self; PhotoMetadata* result = NULL; PhotoMetadata* _tmp0_; @@ -705,11 +775,13 @@ static PhotoMetadata* jfif_file_format_driver_real_create_metadata (PhotoFileFor result = _tmp0_; #line 28 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 709 "JfifSupport.c" +#line 779 "JfifSupport.c" } -static gboolean jfif_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) { +static gboolean +jfif_file_format_driver_real_can_write_image (PhotoFileFormatDriver* base) +{ JfifFileFormatDriver * self; gboolean result = FALSE; #line 31 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -718,11 +790,13 @@ static gboolean jfif_file_format_driver_real_can_write_image (PhotoFileFormatDri result = TRUE; #line 32 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 722 "JfifSupport.c" +#line 794 "JfifSupport.c" } -static gboolean jfif_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) { +static gboolean +jfif_file_format_driver_real_can_write_metadata (PhotoFileFormatDriver* base) +{ JfifFileFormatDriver * self; gboolean result = FALSE; #line 35 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -731,94 +805,98 @@ static gboolean jfif_file_format_driver_real_can_write_metadata (PhotoFileFormat result = TRUE; #line 36 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 735 "JfifSupport.c" +#line 809 "JfifSupport.c" } -static PhotoFileWriter* jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, const gchar* filepath) { +static PhotoFileWriter* +jfif_file_format_driver_real_create_writer (PhotoFileFormatDriver* base, + const gchar* filepath) +{ JfifFileFormatDriver * self; PhotoFileWriter* result = NULL; - const gchar* _tmp0_; - JfifWriter* _tmp1_; + JfifWriter* _tmp0_; #line 39 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver); #line 39 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = jfif_writer_new (_tmp0_); + _tmp0_ = jfif_writer_new (filepath); #line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter); + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_WRITER, PhotoFileWriter); #line 40 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 756 "JfifSupport.c" +#line 830 "JfifSupport.c" } -static PhotoFileMetadataWriter* jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, const gchar* filepath) { +static PhotoFileMetadataWriter* +jfif_file_format_driver_real_create_metadata_writer (PhotoFileFormatDriver* base, + const gchar* filepath) +{ JfifFileFormatDriver * self; PhotoFileMetadataWriter* result = NULL; - const gchar* _tmp0_; - JfifMetadataWriter* _tmp1_; + JfifMetadataWriter* _tmp0_; #line 43 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver); #line 43 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = jfif_metadata_writer_new (_tmp0_); + _tmp0_ = jfif_metadata_writer_new (filepath); #line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter); + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_METADATA_WRITER, PhotoFileMetadataWriter); #line 44 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 777 "JfifSupport.c" +#line 851 "JfifSupport.c" } -static PhotoFileSniffer* jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, GFile* file, PhotoFileSnifferOptions options) { +static PhotoFileSniffer* +jfif_file_format_driver_real_create_sniffer (PhotoFileFormatDriver* base, + GFile* file, + PhotoFileSnifferOptions options) +{ JfifFileFormatDriver * self; PhotoFileSniffer* result = NULL; - GFile* _tmp0_; - PhotoFileSnifferOptions _tmp1_; - JfifSniffer* _tmp2_; + JfifSniffer* _tmp0_; #line 47 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver); #line 47 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (G_IS_FILE (file), NULL); #line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = file; -#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = options; -#line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp2_ = jfif_sniffer_new (_tmp0_, _tmp1_); + _tmp0_ = jfif_sniffer_new (file, options); #line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer); + result = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer); #line 48 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 801 "JfifSupport.c" +#line 873 "JfifSupport.c" } -JfifFileFormatDriver* jfif_file_format_driver_construct (GType object_type) { +JfifFileFormatDriver* +jfif_file_format_driver_construct (GType object_type) +{ JfifFileFormatDriver* self = NULL; #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = (JfifFileFormatDriver*) photo_file_format_driver_construct (object_type); #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 811 "JfifSupport.c" +#line 885 "JfifSupport.c" } -JfifFileFormatDriver* jfif_file_format_driver_new (void) { +JfifFileFormatDriver* +jfif_file_format_driver_new (void) +{ #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_file_format_driver_construct (TYPE_JFIF_FILE_FORMAT_DRIVER); -#line 818 "JfifSupport.c" +#line 894 "JfifSupport.c" } -static void jfif_file_format_driver_class_init (JfifFileFormatDriverClass * klass) { +static void +jfif_file_format_driver_class_init (JfifFileFormatDriverClass * klass) +{ #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_file_format_driver_parent_class = g_type_class_peek_parent (klass); #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -839,25 +917,31 @@ static void jfif_file_format_driver_class_init (JfifFileFormatDriverClass * klas ((PhotoFileFormatDriverClass *) klass)->create_metadata_writer = (PhotoFileMetadataWriter* (*) (PhotoFileFormatDriver *, const gchar*)) jfif_file_format_driver_real_create_metadata_writer; #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" ((PhotoFileFormatDriverClass *) klass)->create_sniffer = (PhotoFileSniffer* (*) (PhotoFileFormatDriver *, GFile*, PhotoFileSnifferOptions)) jfif_file_format_driver_real_create_sniffer; -#line 843 "JfifSupport.c" +#line 921 "JfifSupport.c" } -static void jfif_file_format_driver_instance_init (JfifFileFormatDriver * self) { +static void +jfif_file_format_driver_instance_init (JfifFileFormatDriver * self) +{ } -static void jfif_file_format_driver_finalize (PhotoFileFormatDriver * obj) { +static void +jfif_file_format_driver_finalize (PhotoFileFormatDriver * obj) +{ JfifFileFormatDriver * self; #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_JFIF_FILE_FORMAT_DRIVER, JfifFileFormatDriver); #line 7 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" PHOTO_FILE_FORMAT_DRIVER_CLASS (jfif_file_format_driver_parent_class)->finalize (obj); -#line 857 "JfifSupport.c" +#line 939 "JfifSupport.c" } -GType jfif_file_format_driver_get_type (void) { +GType +jfif_file_format_driver_get_type (void) +{ static volatile gsize jfif_file_format_driver_type_id__volatile = 0; if (g_once_init_enter (&jfif_file_format_driver_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifFileFormatDriverClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_file_format_driver_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifFileFormatDriver), 0, (GInstanceInitFunc) jfif_file_format_driver_instance_init, NULL }; @@ -869,7 +953,9 @@ GType jfif_file_format_driver_get_type (void) { } -void jfif_file_format_properties_init (void) { +void +jfif_file_format_properties_init (void) +{ JfifFileFormatProperties* _tmp0_; #line 64 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0_ = jfif_file_format_properties_new (); @@ -877,18 +963,22 @@ void jfif_file_format_properties_init (void) { _photo_file_format_properties_unref0 (jfif_file_format_properties_instance); #line 64 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_file_format_properties_instance = _tmp0_; -#line 881 "JfifSupport.c" +#line 967 "JfifSupport.c" } -static gpointer _photo_file_format_properties_ref0 (gpointer self) { +static gpointer +_photo_file_format_properties_ref0 (gpointer self) +{ #line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self ? photo_file_format_properties_ref (self) : NULL; -#line 888 "JfifSupport.c" +#line 976 "JfifSupport.c" } -JfifFileFormatProperties* jfif_file_format_properties_get_instance (void) { +JfifFileFormatProperties* +jfif_file_format_properties_get_instance (void) +{ JfifFileFormatProperties* result = NULL; JfifFileFormatProperties* _tmp0_; JfifFileFormatProperties* _tmp1_; @@ -900,11 +990,13 @@ JfifFileFormatProperties* jfif_file_format_properties_get_instance (void) { result = _tmp1_; #line 68 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 904 "JfifSupport.c" +#line 994 "JfifSupport.c" } -static PhotoFileFormat jfif_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) { +static PhotoFileFormat +jfif_file_format_properties_real_get_file_format (PhotoFileFormatProperties* base) +{ JfifFileFormatProperties * self; PhotoFileFormat result = 0; #line 71 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -913,11 +1005,13 @@ static PhotoFileFormat jfif_file_format_properties_real_get_file_format (PhotoFi result = PHOTO_FILE_FORMAT_JFIF; #line 72 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 917 "JfifSupport.c" +#line 1009 "JfifSupport.c" } -static PhotoFileFormatFlags jfif_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) { +static PhotoFileFormatFlags +jfif_file_format_properties_real_get_flags (PhotoFileFormatProperties* base) +{ JfifFileFormatProperties * self; PhotoFileFormatFlags result = 0; #line 75 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -926,11 +1020,13 @@ static PhotoFileFormatFlags jfif_file_format_properties_real_get_flags (PhotoFil result = PHOTO_FILE_FORMAT_FLAGS_NONE; #line 76 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 930 "JfifSupport.c" +#line 1024 "JfifSupport.c" } -static gchar* jfif_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) { +static gchar* +jfif_file_format_properties_real_get_default_extension (PhotoFileFormatProperties* base) +{ JfifFileFormatProperties * self; gchar* result = NULL; gchar* _tmp0_; @@ -942,11 +1038,13 @@ static gchar* jfif_file_format_properties_real_get_default_extension (PhotoFileF result = _tmp0_; #line 80 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 946 "JfifSupport.c" +#line 1042 "JfifSupport.c" } -static gchar* jfif_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) { +static gchar* +jfif_file_format_properties_real_get_user_visible_name (PhotoFileFormatProperties* base) +{ JfifFileFormatProperties * self; gchar* result = NULL; gchar* _tmp0_; @@ -958,32 +1056,38 @@ static gchar* jfif_file_format_properties_real_get_user_visible_name (PhotoFileF result = _tmp0_; #line 84 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 962 "JfifSupport.c" +#line 1060 "JfifSupport.c" } -static gchar** _vala_array_dup8 (gchar** self, int length) { +static gchar** +_vala_array_dup6 (gchar** self, + int length) +{ gchar** result; int i; #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = g_new0 (gchar*, length + 1); #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" for (i = 0; i < length; i++) { -#line 973 "JfifSupport.c" +#line 1074 "JfifSupport.c" gchar* _tmp0_; #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0_ = g_strdup (self[i]); #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result[i] = _tmp0_; -#line 979 "JfifSupport.c" +#line 1080 "JfifSupport.c" } #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 983 "JfifSupport.c" +#line 1084 "JfifSupport.c" } -static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, int* result_length1) { +static gchar** +jfif_file_format_properties_real_get_known_extensions (PhotoFileFormatProperties* base, + int* result_length1) +{ JfifFileFormatProperties * self; gchar** result = NULL; gchar** _tmp0_; @@ -999,7 +1103,7 @@ static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileF #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0__length1 = jfif_file_format_properties_KNOWN_EXTENSIONS_length1; #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup8 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup6 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp1__length1 = _tmp0__length1; #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1010,17 +1114,19 @@ static gchar** jfif_file_format_properties_real_get_known_extensions (PhotoFileF if (result_length1) { #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *result_length1 = _tmp2__length1; -#line 1014 "JfifSupport.c" +#line 1118 "JfifSupport.c" } #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = _tmp2_; #line 88 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1020 "JfifSupport.c" +#line 1124 "JfifSupport.c" } -static gchar* jfif_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) { +static gchar* +jfif_file_format_properties_real_get_default_mime_type (PhotoFileFormatProperties* base) +{ JfifFileFormatProperties * self; gchar* result = NULL; gchar** _tmp0_; @@ -1041,32 +1147,38 @@ static gchar* jfif_file_format_properties_real_get_default_mime_type (PhotoFileF result = _tmp2_; #line 92 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1045 "JfifSupport.c" +#line 1151 "JfifSupport.c" } -static gchar** _vala_array_dup9 (gchar** self, int length) { +static gchar** +_vala_array_dup7 (gchar** self, + int length) +{ gchar** result; int i; #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = g_new0 (gchar*, length + 1); #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" for (i = 0; i < length; i++) { -#line 1056 "JfifSupport.c" +#line 1165 "JfifSupport.c" gchar* _tmp0_; #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0_ = g_strdup (self[i]); #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result[i] = _tmp0_; -#line 1062 "JfifSupport.c" +#line 1171 "JfifSupport.c" } #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1066 "JfifSupport.c" +#line 1175 "JfifSupport.c" } -static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, int* result_length1) { +static gchar** +jfif_file_format_properties_real_get_mime_types (PhotoFileFormatProperties* base, + int* result_length1) +{ JfifFileFormatProperties * self; gchar** result = NULL; gchar** _tmp0_; @@ -1082,7 +1194,7 @@ static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatP #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp0__length1 = jfif_file_format_properties_KNOWN_MIME_TYPES_length1; #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup9 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); + _tmp1_ = (_tmp0_ != NULL) ? _vala_array_dup7 (_tmp0_, _tmp0__length1) : ((gpointer) _tmp0_); #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp1__length1 = _tmp0__length1; #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1093,34 +1205,40 @@ static gchar** jfif_file_format_properties_real_get_mime_types (PhotoFileFormatP if (result_length1) { #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *result_length1 = _tmp2__length1; -#line 1097 "JfifSupport.c" +#line 1209 "JfifSupport.c" } #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = _tmp2_; #line 96 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1103 "JfifSupport.c" +#line 1215 "JfifSupport.c" } -JfifFileFormatProperties* jfif_file_format_properties_construct (GType object_type) { +JfifFileFormatProperties* +jfif_file_format_properties_construct (GType object_type) +{ JfifFileFormatProperties* self = NULL; #line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = (JfifFileFormatProperties*) photo_file_format_properties_construct (object_type); #line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 1113 "JfifSupport.c" +#line 1227 "JfifSupport.c" } -JfifFileFormatProperties* jfif_file_format_properties_new (void) { +JfifFileFormatProperties* +jfif_file_format_properties_new (void) +{ #line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_file_format_properties_construct (TYPE_JFIF_FILE_FORMAT_PROPERTIES); -#line 1120 "JfifSupport.c" +#line 1236 "JfifSupport.c" } -static void jfif_file_format_properties_class_init (JfifFileFormatPropertiesClass * klass) { +static void +jfif_file_format_properties_class_init (JfifFileFormatPropertiesClass * klass) +{ gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; @@ -1178,25 +1296,31 @@ static void jfif_file_format_properties_class_init (JfifFileFormatPropertiesClas jfif_file_format_properties_KNOWN_MIME_TYPES = _tmp6_; #line 57 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_file_format_properties_KNOWN_MIME_TYPES_length1 = 1; -#line 1182 "JfifSupport.c" +#line 1300 "JfifSupport.c" } -static void jfif_file_format_properties_instance_init (JfifFileFormatProperties * self) { +static void +jfif_file_format_properties_instance_init (JfifFileFormatProperties * self) +{ } -static void jfif_file_format_properties_finalize (PhotoFileFormatProperties * obj) { +static void +jfif_file_format_properties_finalize (PhotoFileFormatProperties * obj) +{ JfifFileFormatProperties * self; #line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_JFIF_FILE_FORMAT_PROPERTIES, JfifFileFormatProperties); #line 52 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" PHOTO_FILE_FORMAT_PROPERTIES_CLASS (jfif_file_format_properties_parent_class)->finalize (obj); -#line 1196 "JfifSupport.c" +#line 1318 "JfifSupport.c" } -GType jfif_file_format_properties_get_type (void) { +GType +jfif_file_format_properties_get_type (void) +{ static volatile gsize jfif_file_format_properties_type_id__volatile = 0; if (g_once_init_enter (&jfif_file_format_properties_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifFileFormatPropertiesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_file_format_properties_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifFileFormatProperties), 0, (GInstanceInitFunc) jfif_file_format_properties_instance_init, NULL }; @@ -1208,53 +1332,59 @@ GType jfif_file_format_properties_get_type (void) { } -JfifSniffer* jfif_sniffer_construct (GType object_type, GFile* file, PhotoFileSnifferOptions options) { +JfifSniffer* +jfif_sniffer_construct (GType object_type, + GFile* file, + PhotoFileSnifferOptions options) +{ JfifSniffer* self = NULL; - GFile* _tmp0_; - PhotoFileSnifferOptions _tmp1_; #line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (G_IS_FILE (file), NULL); #line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = file; -#line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = options; -#line 102 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - self = (JfifSniffer*) gdk_sniffer_construct (object_type, _tmp0_, _tmp1_); + self = (JfifSniffer*) gdk_sniffer_construct (object_type, file, options); #line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 1226 "JfifSupport.c" +#line 1348 "JfifSupport.c" } -JfifSniffer* jfif_sniffer_new (GFile* file, PhotoFileSnifferOptions options) { +JfifSniffer* +jfif_sniffer_new (GFile* file, + PhotoFileSnifferOptions options) +{ #line 101 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_sniffer_construct (TYPE_JFIF_SNIFFER, file, options); -#line 1233 "JfifSupport.c" +#line 1358 "JfifSupport.c" } -static gpointer _detected_photo_information_ref0 (gpointer self) { +static gpointer +_detected_photo_information_ref0 (gpointer self) +{ #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self ? detected_photo_information_ref (self) : NULL; -#line 1240 "JfifSupport.c" +#line 1367 "JfifSupport.c" } -static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base, gboolean* is_corrupted, GError** error) { +static DetectedPhotoInformation* +jfif_sniffer_real_sniff (PhotoFileSniffer* base, + gboolean* is_corrupted, + GError** error) +{ JfifSniffer * self; gboolean _vala_is_corrupted = FALSE; DetectedPhotoInformation* result = NULL; gboolean _tmp0_ = FALSE; GFile* _tmp1_; - gboolean _tmp2_; DetectedPhotoInformation* detected = NULL; - gboolean _tmp3_ = FALSE; + gboolean _tmp2_ = FALSE; + DetectedPhotoInformation* _tmp3_; DetectedPhotoInformation* _tmp4_; - DetectedPhotoInformation* _tmp5_; - DetectedPhotoInformation* _tmp6_ = NULL; - DetectedPhotoInformation* _tmp7_; - PhotoFileFormat _tmp8_; - DetectedPhotoInformation* _tmp10_; + DetectedPhotoInformation* _tmp5_ = NULL; + DetectedPhotoInformation* _tmp6_; + PhotoFileFormat _tmp7_; + DetectedPhotoInformation* _tmp9_; GError * _inner_error_ = NULL; #line 105 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_SNIFFER, JfifSniffer); @@ -1263,16 +1393,14 @@ static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp1_ = G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer)->file; #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp2_ = jpeg_is_jpeg (_tmp1_, &_inner_error_); -#line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = _tmp2_; + _tmp0_ = jpeg_is_jpeg (_tmp1_, &_inner_error_); #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return NULL; -#line 1276 "JfifSupport.c" +#line 1404 "JfifSupport.c" } #line 109 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (!_tmp0_) { @@ -1282,30 +1410,30 @@ static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base if (is_corrupted) { #line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *is_corrupted = _vala_is_corrupted; -#line 1286 "JfifSupport.c" +#line 1414 "JfifSupport.c" } #line 110 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1290 "JfifSupport.c" +#line 1418 "JfifSupport.c" } #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp4_ = PHOTO_FILE_SNIFFER_CLASS (jfif_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp3_, &_inner_error_); + _tmp3_ = PHOTO_FILE_SNIFFER_CLASS (jfif_sniffer_parent_class)->sniff (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_GDK_SNIFFER, GdkSniffer), TYPE_PHOTO_FILE_SNIFFER, PhotoFileSniffer), &_tmp2_, &_inner_error_); #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _vala_is_corrupted = _tmp3_; + _vala_is_corrupted = _tmp2_; #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - detected = _tmp4_; + detected = _tmp3_; #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 112 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return NULL; -#line 1304 "JfifSupport.c" +#line 1432 "JfifSupport.c" } #line 113 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp5_ = detected; + _tmp4_ = detected; #line 113 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp5_ == NULL) { + if (_tmp4_ == NULL) { #line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = NULL; #line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1314,62 +1442,68 @@ static DetectedPhotoInformation* jfif_sniffer_real_sniff (PhotoFileSniffer* base if (is_corrupted) { #line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *is_corrupted = _vala_is_corrupted; -#line 1318 "JfifSupport.c" +#line 1446 "JfifSupport.c" } #line 114 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1322 "JfifSupport.c" +#line 1450 "JfifSupport.c" } #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp7_ = detected; + _tmp6_ = detected; #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp8_ = _tmp7_->file_format; + _tmp7_ = _tmp6_->file_format; #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp8_ == PHOTO_FILE_FORMAT_JFIF) { -#line 1330 "JfifSupport.c" - DetectedPhotoInformation* _tmp9_; + if (_tmp7_ == PHOTO_FILE_FORMAT_JFIF) { +#line 1458 "JfifSupport.c" + DetectedPhotoInformation* _tmp8_; #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp9_ = detected; + _tmp8_ = detected; #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp6_ = _tmp9_; -#line 1336 "JfifSupport.c" + _tmp5_ = _tmp8_; +#line 1464 "JfifSupport.c" } else { #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp6_ = NULL; -#line 1340 "JfifSupport.c" + _tmp5_ = NULL; +#line 1468 "JfifSupport.c" } #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp10_ = _detected_photo_information_ref0 (_tmp6_); + _tmp9_ = _detected_photo_information_ref0 (_tmp5_); #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = _tmp10_; + result = _tmp9_; #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _detected_photo_information_unref0 (detected); #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (is_corrupted) { #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *is_corrupted = _vala_is_corrupted; -#line 1352 "JfifSupport.c" +#line 1480 "JfifSupport.c" } #line 116 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1356 "JfifSupport.c" +#line 1484 "JfifSupport.c" } -static void jfif_sniffer_class_init (JfifSnifferClass * klass) { +static void +jfif_sniffer_class_init (JfifSnifferClass * klass) +{ #line 100 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_sniffer_parent_class = g_type_class_peek_parent (klass); #line 100 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" ((PhotoFileSnifferClass *) klass)->sniff = (DetectedPhotoInformation* (*) (PhotoFileSniffer *, gboolean*, GError**)) jfif_sniffer_real_sniff; -#line 1365 "JfifSupport.c" +#line 1495 "JfifSupport.c" } -static void jfif_sniffer_instance_init (JfifSniffer * self) { +static void +jfif_sniffer_instance_init (JfifSniffer * self) +{ } -GType jfif_sniffer_get_type (void) { +GType +jfif_sniffer_get_type (void) +{ static volatile gsize jfif_sniffer_type_id__volatile = 0; if (g_once_init_enter (&jfif_sniffer_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifSnifferClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_sniffer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifSniffer), 0, (GInstanceInitFunc) jfif_sniffer_instance_init, NULL }; @@ -1381,40 +1515,48 @@ GType jfif_sniffer_get_type (void) { } -JfifReader* jfif_reader_construct (GType object_type, const gchar* filepath) { +JfifReader* +jfif_reader_construct (GType object_type, + const gchar* filepath) +{ JfifReader* self = NULL; - const gchar* _tmp0_; #line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 122 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 122 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - self = (JfifReader*) gdk_reader_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF); + self = (JfifReader*) gdk_reader_construct (object_type, filepath, PHOTO_FILE_FORMAT_JFIF); #line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 1396 "JfifSupport.c" +#line 1530 "JfifSupport.c" } -JfifReader* jfif_reader_new (const gchar* filepath) { +JfifReader* +jfif_reader_new (const gchar* filepath) +{ #line 121 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_reader_construct (TYPE_JFIF_READER, filepath); -#line 1403 "JfifSupport.c" +#line 1539 "JfifSupport.c" } -static void jfif_reader_class_init (JfifReaderClass * klass) { +static void +jfif_reader_class_init (JfifReaderClass * klass) +{ #line 120 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_reader_parent_class = g_type_class_peek_parent (klass); -#line 1410 "JfifSupport.c" +#line 1548 "JfifSupport.c" } -static void jfif_reader_instance_init (JfifReader * self) { +static void +jfif_reader_instance_init (JfifReader * self) +{ } -GType jfif_reader_get_type (void) { +GType +jfif_reader_get_type (void) +{ static volatile gsize jfif_reader_type_id__volatile = 0; if (g_once_init_enter (&jfif_reader_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifReaderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_reader_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifReader), 0, (GInstanceInitFunc) jfif_reader_instance_init, NULL }; @@ -1426,84 +1568,91 @@ GType jfif_reader_get_type (void) { } -JfifWriter* jfif_writer_construct (GType object_type, const gchar* filepath) { +JfifWriter* +jfif_writer_construct (GType object_type, + const gchar* filepath) +{ JfifWriter* self = NULL; - const gchar* _tmp0_; #line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 128 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 128 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - self = (JfifWriter*) photo_file_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF); + self = (JfifWriter*) photo_file_writer_construct (object_type, filepath, PHOTO_FILE_FORMAT_JFIF); #line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 1441 "JfifSupport.c" +#line 1583 "JfifSupport.c" } -JfifWriter* jfif_writer_new (const gchar* filepath) { +JfifWriter* +jfif_writer_new (const gchar* filepath) +{ #line 127 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_writer_construct (TYPE_JFIF_WRITER, filepath); -#line 1448 "JfifSupport.c" +#line 1592 "JfifSupport.c" } -static void jfif_writer_real_write (PhotoFileWriter* base, GdkPixbuf* pixbuf, JpegQuality quality, GError** error) { +static void +jfif_writer_real_write (PhotoFileWriter* base, + GdkPixbuf* pixbuf, + JpegQuality quality, + GError** error) +{ JfifWriter * self; - GdkPixbuf* _tmp0_; + gchar* _tmp0_; gchar* _tmp1_; gchar* _tmp2_; - JpegQuality _tmp3_; - gchar* _tmp4_; - gchar* _tmp5_; + gchar* _tmp3_; GError * _inner_error_ = NULL; #line 131 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_WRITER, JfifWriter); #line 131 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_if_fail (GDK_IS_PIXBUF (pixbuf)); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = pixbuf; -#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter)); -#line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp2_ = _tmp1_; + _tmp0_ = photo_file_adapter_get_filepath (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter)); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp3_ = quality; + _tmp1_ = _tmp0_; #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp4_ = jpeg_quality_get_pct_text (_tmp3_); + _tmp2_ = jpeg_quality_get_pct_text (quality); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp5_ = _tmp4_; + _tmp3_ = _tmp2_; #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - gdk_pixbuf_save (_tmp0_, _tmp2_, "jpeg", &_inner_error_, "quality", _tmp5_, NULL); + gdk_pixbuf_save (pixbuf, _tmp1_, "jpeg", &_inner_error_, "quality", _tmp3_, NULL); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _g_free0 (_tmp5_); + _g_free0 (_tmp3_); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _g_free0 (_tmp2_); + _g_free0 (_tmp1_); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 132 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return; -#line 1489 "JfifSupport.c" +#line 1632 "JfifSupport.c" } } -static void jfif_writer_class_init (JfifWriterClass * klass) { +static void +jfif_writer_class_init (JfifWriterClass * klass) +{ #line 126 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_writer_parent_class = g_type_class_peek_parent (klass); #line 126 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" ((PhotoFileWriterClass *) klass)->write = (void (*) (PhotoFileWriter *, GdkPixbuf*, JpegQuality, GError**)) jfif_writer_real_write; -#line 1499 "JfifSupport.c" +#line 1644 "JfifSupport.c" } -static void jfif_writer_instance_init (JfifWriter * self) { +static void +jfif_writer_instance_init (JfifWriter * self) +{ } -GType jfif_writer_get_type (void) { +GType +jfif_writer_get_type (void) +{ static volatile gsize jfif_writer_type_id__volatile = 0; if (g_once_init_enter (&jfif_writer_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifWriter), 0, (GInstanceInitFunc) jfif_writer_instance_init, NULL }; @@ -1515,73 +1664,82 @@ GType jfif_writer_get_type (void) { } -JfifMetadataWriter* jfif_metadata_writer_construct (GType object_type, const gchar* filepath) { +JfifMetadataWriter* +jfif_metadata_writer_construct (GType object_type, + const gchar* filepath) +{ JfifMetadataWriter* self = NULL; - const gchar* _tmp0_; #line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (filepath != NULL, NULL); #line 138 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = filepath; -#line 138 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - self = (JfifMetadataWriter*) photo_file_metadata_writer_construct (object_type, _tmp0_, PHOTO_FILE_FORMAT_JFIF); + self = (JfifMetadataWriter*) photo_file_metadata_writer_construct (object_type, filepath, PHOTO_FILE_FORMAT_JFIF); #line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return self; -#line 1530 "JfifSupport.c" +#line 1679 "JfifSupport.c" } -JfifMetadataWriter* jfif_metadata_writer_new (const gchar* filepath) { +JfifMetadataWriter* +jfif_metadata_writer_new (const gchar* filepath) +{ #line 137 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return jfif_metadata_writer_construct (TYPE_JFIF_METADATA_WRITER, filepath); -#line 1537 "JfifSupport.c" +#line 1688 "JfifSupport.c" } -static void jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, PhotoMetadata* metadata, GError** error) { +static void +jfif_metadata_writer_real_write_metadata (PhotoFileMetadataWriter* base, + PhotoMetadata* metadata, + GError** error) +{ JfifMetadataWriter * self; - PhotoMetadata* _tmp0_; + GFile* _tmp0_; GFile* _tmp1_; - GFile* _tmp2_; GError * _inner_error_ = NULL; #line 141 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_JFIF_METADATA_WRITER, JfifMetadataWriter); #line 141 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_if_fail (IS_PHOTO_METADATA (metadata)); #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = metadata; + _tmp0_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter)); #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = photo_file_adapter_get_file (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_PHOTO_FILE_ADAPTER, PhotoFileAdapter)); -#line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp2_ = _tmp1_; + _tmp1_ = _tmp0_; #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - photo_metadata_write_to_file (_tmp0_, _tmp2_, &_inner_error_); + photo_metadata_write_to_file (metadata, _tmp1_, &_inner_error_); #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _g_object_unref0 (_tmp2_); + _g_object_unref0 (_tmp1_); #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 142 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return; -#line 1567 "JfifSupport.c" +#line 1719 "JfifSupport.c" } } -static void jfif_metadata_writer_class_init (JfifMetadataWriterClass * klass) { +static void +jfif_metadata_writer_class_init (JfifMetadataWriterClass * klass) +{ #line 136 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" jfif_metadata_writer_parent_class = g_type_class_peek_parent (klass); #line 136 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" ((PhotoFileMetadataWriterClass *) klass)->write_metadata = (void (*) (PhotoFileMetadataWriter *, PhotoMetadata*, GError**)) jfif_metadata_writer_real_write_metadata; -#line 1577 "JfifSupport.c" +#line 1731 "JfifSupport.c" } -static void jfif_metadata_writer_instance_init (JfifMetadataWriter * self) { +static void +jfif_metadata_writer_instance_init (JfifMetadataWriter * self) +{ } -GType jfif_metadata_writer_get_type (void) { +GType +jfif_metadata_writer_get_type (void) +{ static volatile gsize jfif_metadata_writer_type_id__volatile = 0; if (g_once_init_enter (&jfif_metadata_writer_type_id__volatile)) { static const GTypeInfo g_define_type_info = { sizeof (JfifMetadataWriterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) jfif_metadata_writer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (JfifMetadataWriter), 0, (GInstanceInitFunc) jfif_metadata_writer_instance_init, NULL }; @@ -1593,17 +1751,21 @@ GType jfif_metadata_writer_get_type (void) { } -guint8 jpeg_marker_get_byte (JpegMarker self) { +guint8 +jpeg_marker_get_byte (JpegMarker self) +{ guint8 result = 0U; #line 160 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = (guint8) self; #line 160 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1603 "JfifSupport.c" +#line 1763 "JfifSupport.c" } -GType jpeg_marker_get_type (void) { +GType +jpeg_marker_get_type (void) +{ static volatile gsize jpeg_marker_type_id__volatile = 0; if (g_once_init_enter (&jpeg_marker_type_id__volatile)) { static const GEnumValue values[] = {{JPEG_MARKER_INVALID, "JPEG_MARKER_INVALID", "invalid"}, {JPEG_MARKER_SOI, "JPEG_MARKER_SOI", "soi"}, {JPEG_MARKER_EOI, "JPEG_MARKER_EOI", "eoi"}, {JPEG_MARKER_APP0, "JPEG_MARKER_APP0", "app0"}, {JPEG_MARKER_APP1, "JPEG_MARKER_APP1", "app1"}, {0, NULL, NULL}}; @@ -1615,17 +1777,21 @@ GType jpeg_marker_get_type (void) { } -gint jpeg_quality_get_pct (JpegQuality self) { +gint +jpeg_quality_get_pct (JpegQuality self) +{ gint result = 0; #line 171 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = (gint) self; #line 171 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1625 "JfifSupport.c" +#line 1789 "JfifSupport.c" } -gchar* jpeg_quality_get_pct_text (JpegQuality self) { +gchar* +jpeg_quality_get_pct_text (JpegQuality self) +{ gchar* result = NULL; gchar* _tmp0_; #line 175 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1634,11 +1800,13 @@ gchar* jpeg_quality_get_pct_text (JpegQuality self) { result = _tmp0_; #line 175 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1638 "JfifSupport.c" +#line 1804 "JfifSupport.c" } -JpegQuality* jpeg_quality_get_all (int* result_length1) { +JpegQuality* +jpeg_quality_get_all (int* result_length1) +{ JpegQuality* result = NULL; JpegQuality* _tmp0_; JpegQuality* _tmp1_; @@ -1661,23 +1829,25 @@ JpegQuality* jpeg_quality_get_all (int* result_length1) { if (result_length1) { #line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *result_length1 = _tmp1__length1; -#line 1665 "JfifSupport.c" +#line 1833 "JfifSupport.c" } #line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = _tmp1_; #line 179 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1671 "JfifSupport.c" +#line 1839 "JfifSupport.c" } -gchar* jpeg_quality_to_string (JpegQuality self) { +gchar* +jpeg_quality_to_string (JpegQuality self) +{ gchar* result = NULL; #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" switch (self) { #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" case JPEG_QUALITY_LOW: -#line 1681 "JfifSupport.c" +#line 1851 "JfifSupport.c" { gchar* _tmp0_; #line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1686,11 +1856,11 @@ gchar* jpeg_quality_to_string (JpegQuality self) { result = _tmp0_; #line 185 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1690 "JfifSupport.c" +#line 1860 "JfifSupport.c" } #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" case JPEG_QUALITY_MEDIUM: -#line 1694 "JfifSupport.c" +#line 1864 "JfifSupport.c" { gchar* _tmp1_; #line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1699,11 +1869,11 @@ gchar* jpeg_quality_to_string (JpegQuality self) { result = _tmp1_; #line 188 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1703 "JfifSupport.c" +#line 1873 "JfifSupport.c" } #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" case JPEG_QUALITY_HIGH: -#line 1707 "JfifSupport.c" +#line 1877 "JfifSupport.c" { gchar* _tmp2_; #line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1712,11 +1882,11 @@ gchar* jpeg_quality_to_string (JpegQuality self) { result = _tmp2_; #line 191 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1716 "JfifSupport.c" +#line 1886 "JfifSupport.c" } #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" case JPEG_QUALITY_MAXIMUM: -#line 1720 "JfifSupport.c" +#line 1890 "JfifSupport.c" { gchar* _tmp3_; #line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" @@ -1725,12 +1895,12 @@ gchar* jpeg_quality_to_string (JpegQuality self) { result = _tmp3_; #line 194 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1729 "JfifSupport.c" +#line 1899 "JfifSupport.c" } default: #line 183 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" break; -#line 1734 "JfifSupport.c" +#line 1904 "JfifSupport.c" } #line 197 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_warn_if_reached (); @@ -1738,11 +1908,13 @@ gchar* jpeg_quality_to_string (JpegQuality self) { result = NULL; #line 199 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1742 "JfifSupport.c" +#line 1912 "JfifSupport.c" } -GType jpeg_quality_get_type (void) { +GType +jpeg_quality_get_type (void) +{ static volatile gsize jpeg_quality_type_id__volatile = 0; if (g_once_init_enter (&jpeg_quality_type_id__volatile)) { static const GEnumValue values[] = {{JPEG_QUALITY_LOW, "JPEG_QUALITY_LOW", "low"}, {JPEG_QUALITY_MEDIUM, "JPEG_QUALITY_MEDIUM", "medium"}, {JPEG_QUALITY_HIGH, "JPEG_QUALITY_HIGH", "high"}, {JPEG_QUALITY_MAXIMUM, "JPEG_QUALITY_MAXIMUM", "maximum"}, {0, NULL, NULL}}; @@ -1754,266 +1926,324 @@ GType jpeg_quality_get_type (void) { } -gboolean jpeg_is_jpeg (GFile* file, GError** error) { +gboolean +jpeg_is_jpeg (GFile* file, + GError** error) +{ gboolean result = FALSE; GFileInputStream* fins = NULL; - GFile* _tmp0_; - GFileInputStream* _tmp1_; - JpegMarker marker = 0; - gint segment_length = 0; + GFileInputStream* _tmp0_; + gboolean _tmp2_ = FALSE; GFileInputStream* _tmp3_; - JpegMarker _tmp4_ = 0; - gint _tmp5_; - gboolean _tmp7_ = FALSE; - JpegMarker _tmp8_; GError * _inner_error_ = NULL; #line 203 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_return_val_if_fail (G_IS_FILE (file), FALSE); #line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = file; -#line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = g_file_read (_tmp0_, NULL, &_inner_error_); + _tmp0_ = g_file_read (file, NULL, &_inner_error_); #line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - fins = _tmp1_; + fins = _tmp0_; #line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1781 "JfifSupport.c" - gboolean _tmp2_ = FALSE; +#line 1948 "JfifSupport.c" + gboolean _tmp1_ = FALSE; #line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 204 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - return _tmp2_; -#line 1787 "JfifSupport.c" + return _tmp1_; +#line 1954 "JfifSupport.c" } -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _tmp3_ = fins; -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp5_ = jpeg_read_marker (_tmp3_, &_tmp4_, &_inner_error_); -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - marker = _tmp4_; -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - segment_length = _tmp5_; -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp2_ = jpeg_is_jpeg_stream (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, g_input_stream_get_type (), GInputStream), &_inner_error_); +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1799 "JfifSupport.c" - gboolean _tmp6_ = FALSE; -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 1962 "JfifSupport.c" + gboolean _tmp4_ = FALSE; +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (fins); -#line 207 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - return _tmp6_; -#line 1807 "JfifSupport.c" +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return _tmp4_; +#line 1970 "JfifSupport.c" } +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + result = _tmp2_; +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _g_object_unref0 (fins); +#line 205 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return result; +#line 1978 "JfifSupport.c" +} + + +gboolean +jpeg_is_jpeg_stream (GInputStream* ins, + GError** error) +{ + gboolean result = FALSE; + JpegMarker marker = 0; + gint segment_length = 0; + JpegMarker _tmp0_ = 0; + gint _tmp1_; + gboolean _tmp3_ = FALSE; + GError * _inner_error_ = NULL; +#line 208 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + g_return_val_if_fail (G_IS_INPUT_STREAM (ins), FALSE); #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp8_ = marker; -#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp8_ == JPEG_MARKER_SOI) { -#line 1813 "JfifSupport.c" - gint _tmp9_; -#line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp9_ = segment_length; + _tmp1_ = jpeg_read_marker (ins, &_tmp0_, &_inner_error_); #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp7_ = _tmp9_ == 0; -#line 1819 "JfifSupport.c" - } else { + marker = _tmp0_; #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp7_ = FALSE; -#line 1823 "JfifSupport.c" - } + segment_length = _tmp1_; #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = _tmp7_; + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2003 "JfifSupport.c" + gboolean _tmp2_ = FALSE; #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _g_object_unref0 (fins); + g_propagate_error (error, _inner_error_); #line 210 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return _tmp2_; +#line 2009 "JfifSupport.c" + } +#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (marker == JPEG_MARKER_SOI) { +#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp3_ = segment_length == 0; +#line 2015 "JfifSupport.c" + } else { +#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp3_ = FALSE; +#line 2019 "JfifSupport.c" + } +#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + result = _tmp3_; +#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1831 "JfifSupport.c" +#line 2025 "JfifSupport.c" } -gint jpeg_read_marker (GFileInputStream* fins, JpegMarker* marker, GError** error) { - JpegMarker _vala_marker = 0; - gint result = 0; - GDataInputStream* dins = NULL; - GFileInputStream* _tmp0_; - GDataInputStream* _tmp1_; - GDataInputStream* _tmp2_; - guint8 _tmp3_ = 0U; - GDataInputStream* _tmp4_; - guint8 _tmp5_; - guint8 _tmp7_ = 0U; - GDataInputStream* _tmp8_; - guint8 _tmp9_; - gboolean _tmp11_ = FALSE; - JpegMarker _tmp12_; - guint16 length = 0U; - GDataInputStream* _tmp14_; - guint16 _tmp15_; - guint16 _tmp17_; - guint16 _tmp21_; +gboolean +jpeg_is_jpeg_bytes (GBytes* bytes, + GError** error) +{ + gboolean result = FALSE; + GMemoryInputStream* mins = NULL; + GMemoryInputStream* _tmp0_; + gboolean _tmp1_ = FALSE; GError * _inner_error_ = NULL; -#line 213 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - g_return_val_if_fail (G_IS_FILE_INPUT_STREAM (fins), 0); -#line 214 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _vala_marker = JPEG_MARKER_INVALID; -#line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp0_ = fins; -#line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp1_ = g_data_input_stream_new (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, g_input_stream_get_type (), GInputStream)); #line 216 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - dins = _tmp1_; + g_return_val_if_fail (bytes != NULL, FALSE); #line 217 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp2_ = dins; + _tmp0_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (bytes); #line 217 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - g_data_input_stream_set_byte_order (_tmp2_, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN); + mins = _tmp0_; #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp4_ = dins; -#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp5_ = g_data_input_stream_read_byte (_tmp4_, NULL, &_inner_error_); -#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp3_ = _tmp5_; + _tmp1_ = jpeg_is_jpeg_stream (G_TYPE_CHECK_INSTANCE_CAST (mins, g_input_stream_get_type (), GInputStream), &_inner_error_); #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1878 "JfifSupport.c" - gint _tmp6_ = 0; +#line 2048 "JfifSupport.c" + gboolean _tmp2_ = FALSE; #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _g_object_unref0 (dins); + _g_object_unref0 (mins); #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - return _tmp6_; -#line 1886 "JfifSupport.c" + return _tmp2_; +#line 2056 "JfifSupport.c" } #line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp3_ != JPEG_MARKER_PREFIX) { -#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + result = _tmp1_; +#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _g_object_unref0 (mins); +#line 219 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return result; +#line 2064 "JfifSupport.c" +} + + +gint +jpeg_read_marker (GInputStream* fins, + JpegMarker* marker, + GError** error) +{ + JpegMarker _vala_marker = 0; + gint result = 0; + GDataInputStream* dins = NULL; + GDataInputStream* _tmp0_; + GDataInputStream* _tmp1_; + guint8 _tmp2_ = 0U; + GDataInputStream* _tmp3_; + guint8 _tmp5_ = 0U; + GDataInputStream* _tmp6_; + gboolean _tmp8_ = FALSE; + JpegMarker _tmp9_; + guint16 length = 0U; + GDataInputStream* _tmp11_; + gboolean _tmp13_ = FALSE; + guint16 _tmp14_; + guint16 _tmp16_; + GError * _inner_error_ = NULL; +#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + g_return_val_if_fail (G_IS_INPUT_STREAM (fins), 0); +#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _vala_marker = JPEG_MARKER_INVALID; +#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp0_ = g_data_input_stream_new (fins); +#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + dins = _tmp0_; +#line 226 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp1_ = dins; +#line 226 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + g_data_input_stream_set_byte_order (_tmp1_, G_DATA_STREAM_BYTE_ORDER_BIG_ENDIAN); +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp3_ = dins; +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp2_ = g_data_input_stream_read_byte (_tmp3_, NULL, &_inner_error_); +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (G_UNLIKELY (_inner_error_ != NULL)) { +#line 2108 "JfifSupport.c" + gint _tmp4_ = 0; +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + g_propagate_error (error, _inner_error_); +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _g_object_unref0 (dins); +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return _tmp4_; +#line 2116 "JfifSupport.c" + } +#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (_tmp2_ != JPEG_MARKER_PREFIX) { +#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = -1; -#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (marker) { -#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *marker = _vala_marker; -#line 1898 "JfifSupport.c" +#line 2128 "JfifSupport.c" } -#line 220 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1902 "JfifSupport.c" +#line 2132 "JfifSupport.c" } -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp8_ = dins; -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp9_ = g_data_input_stream_read_byte (_tmp8_, NULL, &_inner_error_); -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp7_ = _tmp9_; -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp6_ = dins; +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp5_ = g_data_input_stream_read_byte (_tmp6_, NULL, &_inner_error_); +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1912 "JfifSupport.c" - gint _tmp10_ = 0; -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 2140 "JfifSupport.c" + gint _tmp7_ = 0; +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - return _tmp10_; -#line 1920 "JfifSupport.c" +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return _tmp7_; +#line 2148 "JfifSupport.c" } -#line 222 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _vala_marker = (JpegMarker) _tmp7_; -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp12_ = _vala_marker; -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp12_ == JPEG_MARKER_SOI) { -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp11_ = TRUE; -#line 1930 "JfifSupport.c" +#line 231 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _vala_marker = (JpegMarker) _tmp5_; +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp9_ = _vala_marker; +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (_tmp9_ == JPEG_MARKER_SOI) { +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp8_ = TRUE; +#line 2158 "JfifSupport.c" } else { - JpegMarker _tmp13_; -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp13_ = _vala_marker; -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp11_ = _tmp13_ == JPEG_MARKER_EOI; -#line 1937 "JfifSupport.c" + JpegMarker _tmp10_; +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp10_ = _vala_marker; +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp8_ = _tmp10_ == JPEG_MARKER_EOI; +#line 2165 "JfifSupport.c" } -#line 223 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (_tmp11_) { -#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (_tmp8_) { +#line 234 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = 0; -#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 234 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 234 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (marker) { -#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 234 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *marker = _vala_marker; -#line 1949 "JfifSupport.c" +#line 2177 "JfifSupport.c" } -#line 225 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 234 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 1953 "JfifSupport.c" +#line 2181 "JfifSupport.c" } -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp14_ = dins; -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp15_ = g_data_input_stream_read_uint16 (_tmp14_, NULL, &_inner_error_); -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - length = _tmp15_; -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp11_ = dins; +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + length = g_data_input_stream_read_uint16 (_tmp11_, NULL, &_inner_error_); +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (G_UNLIKELY (_inner_error_ != NULL)) { -#line 1963 "JfifSupport.c" - gint _tmp16_ = 0; -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 2189 "JfifSupport.c" + gint _tmp12_ = 0; +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" g_propagate_error (error, _inner_error_); -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 228 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - return _tmp16_; -#line 1971 "JfifSupport.c" +#line 237 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + return _tmp12_; +#line 2197 "JfifSupport.c" } -#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp17_ = length; -#line 229 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - if (((gint) _tmp17_) < 2) { -#line 1977 "JfifSupport.c" - guint16 _tmp18_; - GFileInputStream* _tmp19_; - gint64 _tmp20_; -#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp18_ = length; -#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp19_ = fins; -#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp20_ = G_FILE_INPUT_STREAM_GET_CLASS (_tmp19_)->tell (_tmp19_); -#line 230 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - g_debug ("Invalid length %Xh at ofs %" G_GINT64_FORMAT "Xh", _tmp18_, _tmp20_ - 2); -#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 238 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp14_ = length; +#line 238 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (((gint) _tmp14_) < 2) { +#line 238 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp13_ = G_TYPE_CHECK_INSTANCE_TYPE (fins, g_seekable_get_type ()); +#line 2205 "JfifSupport.c" + } else { +#line 238 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp13_ = FALSE; +#line 2209 "JfifSupport.c" + } +#line 238 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + if (_tmp13_) { +#line 2213 "JfifSupport.c" + guint16 _tmp15_; +#line 239 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp15_ = length; +#line 239 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + g_debug ("Invalid length %Xh at ofs %" G_GINT64_FORMAT "Xh", _tmp15_, g_seekable_tell (G_TYPE_CHECK_INSTANCE_TYPE (fins, g_seekable_get_type ()) ? ((GSeekable*) fins) : NULL) - 2); +#line 242 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" result = -1; -#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 242 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 242 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (marker) { -#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 242 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *marker = _vala_marker; -#line 1997 "JfifSupport.c" +#line 2227 "JfifSupport.c" } -#line 232 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 242 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 2001 "JfifSupport.c" +#line 2231 "JfifSupport.c" } -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - _tmp21_ = length; -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" - result = _tmp21_ - 2; -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + _tmp16_ = length; +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" + result = _tmp16_ - 2; +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" _g_object_unref0 (dins); -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" if (marker) { -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" *marker = _vala_marker; -#line 2013 "JfifSupport.c" +#line 2243 "JfifSupport.c" } -#line 236 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" +#line 246 "/home/jens/Source/shotwell/src/photos/JfifSupport.vala" return result; -#line 2017 "JfifSupport.c" +#line 2247 "JfifSupport.c" } |