|
68 | 68 | #include <vips/debug.h>
|
69 | 69 | #include <vips/internal.h>
|
70 | 70 |
|
71 |
| -#ifdef HAVE_HEIF_DECODER |
| 71 | +/* These are shared with the encoder. |
| 72 | + */ |
| 73 | +#if defined(HAVE_HEIF_DECODER) || defined(HAVE_HEIF_ENCODER) |
72 | 74 |
|
73 | 75 | #include <libheif/heif.h>
|
74 | 76 |
|
75 | 77 | #include "pforeign.h"
|
76 | 78 |
|
| 79 | +void |
| 80 | +vips__heif_error( struct heif_error *error ) |
| 81 | +{ |
| 82 | + if( error->code ) |
| 83 | + vips_error( "heif", "%s (%d.%d)", error->message, error->code, |
| 84 | + error->subcode ); |
| 85 | +} |
| 86 | + |
| 87 | +const char *vips__heif_suffs[] = { |
| 88 | + ".heic", |
| 89 | + ".heif", |
| 90 | + ".avif", |
| 91 | + NULL |
| 92 | +}; |
| 93 | + |
| 94 | +#endif /*defined(DECODE) || defined(ENCODE)*/ |
| 95 | + |
| 96 | +#ifdef HAVE_HEIF_DECODER |
| 97 | + |
77 | 98 | #define VIPS_TYPE_FOREIGN_LOAD_HEIF (vips_foreign_load_heif_get_type())
|
78 | 99 | #define VIPS_FOREIGN_LOAD_HEIF( obj ) \
|
79 | 100 | (G_TYPE_CHECK_INSTANCE_CAST( (obj), \
|
@@ -200,14 +221,6 @@ vips_foreign_load_heif_dispose( GObject *gobject )
|
200 | 221 | dispose( gobject );
|
201 | 222 | }
|
202 | 223 |
|
203 |
| -void |
204 |
| -vips__heif_error( struct heif_error *error ) |
205 |
| -{ |
206 |
| - if( error->code ) |
207 |
| - vips_error( "heif", "%s (%d.%d)", error->message, error->code, |
208 |
| - error->subcode ); |
209 |
| -} |
210 |
| - |
211 | 224 | static int
|
212 | 225 | vips_foreign_load_heif_build( VipsObject *object )
|
213 | 226 | {
|
@@ -1055,13 +1068,6 @@ vips_foreign_load_heif_file_is_a( const char *filename )
|
1055 | 1068 | return( vips_foreign_load_heif_is_a( buf, 12 ) );
|
1056 | 1069 | }
|
1057 | 1070 |
|
1058 |
| -const char *vips__heif_suffs[] = { |
1059 |
| - ".heic", |
1060 |
| - ".heif", |
1061 |
| - ".avif", |
1062 |
| - NULL |
1063 |
| -}; |
1064 |
| - |
1065 | 1071 | static void
|
1066 | 1072 | vips_foreign_load_heif_file_class_init( VipsForeignLoadHeifFileClass *class )
|
1067 | 1073 | {
|
|
0 commit comments