21#ifndef LIBHEIF_HEIF_SEQUENCES_H
22#define LIBHEIF_HEIF_SEQUENCES_H
167#define heif_sequence_track_number_of_repetitions_infinite 0xFFFFFFFFu
219 heif_image** out_img,
220 heif_colorspace colorspace,
222 const heif_decoding_options* options);
250 const char** out_uri);
311#define heif_sequence_maximum_number_of_repetitions 0
376 const char* track_id);
474 uint16_t width, uint16_t height,
496 const heif_image* image,
struct heif_encoder heif_encoder
Opaque object that represents the encoder used to code the images.
Definition heif_encoding.h:48
#define heif_fourcc(a, b, c, d)
Build a 32 bit integer from a 4-character code.
Definition heif_library.h:63
struct heif_context heif_context
Definition heif_library.h:89
int heif_context_has_sequence(const heif_context *)
Check whether there is an image sequence in the HEIF file.
size_t heif_track_get_references_from_track(const heif_track *, uint32_t reference_type, uint32_t out_to_track_id[])
List the track ids this track points to with the passed reference type.
size_t heif_track_get_number_of_track_reference_of_type(const heif_track *, uint32_t reference_type)
Get the number of references of the passed type.
void heif_image_set_gimi_sample_content_id(heif_image *, const char *contentID)
Set the GIMI content ID for an image sample.
void heif_raw_sequence_sample_set_duration(heif_raw_sequence_sample *, uint32_t duration)
Set the sample duration in track timescale units.
const char * heif_image_get_gimi_sample_content_id(const heif_image *)
Get the GIMI content ID stored in the image sample.
heif_error heif_track_options_enable_sample_tai_timestamps(heif_track_options *, const heif_tai_clock_info *, enum heif_sample_aux_info_presence)
uint32_t heif_track_type
Definition heif_sequences.h:117
void heif_context_set_sequence_timescale(heif_context *, uint32_t timescale)
Set an independent global timescale for the sequence.
void heif_track_add_reference_to_track(heif_track *, uint32_t reference_type, const heif_track *to_track)
Add a reference between tracks.
heif_error heif_track_get_image_resolution(const heif_track *, uint16_t *out_width, uint16_t *out_height)
Get the image resolution of the track.
heif_sample_aux_info_presence
Specifies whether a 'sample auxiliary info' is stored with the samples.
Definition heif_sequences.h:319
@ heif_sample_aux_info_presence_mandatory
Definition heif_sequences.h:322
@ heif_sample_aux_info_presence_optional
Definition heif_sequences.h:321
@ heif_sample_aux_info_presence_none
Definition heif_sequences.h:320
heif_sequence_encoding_options * heif_sequence_encoding_options_alloc(void)
heif_error heif_track_encode_sequence_image(heif_track *, const heif_image *image, heif_encoder *encoder, const heif_sequence_encoding_options *sequence_encoding_options)
Encode the image into a visual track.
int heif_context_number_of_sequence_tracks(const heif_context *)
Get the number of tracks in the HEIF file.
uint32_t heif_track_get_sample_entry_type_of_first_cluster(const heif_track *)
Get the "sample entry type" of the first sample sample cluster in the track.
void heif_sequence_encoding_options_release(heif_sequence_encoding_options *)
struct heif_tai_clock_info heif_tai_clock_info
Definition heif_sequences.h:31
void heif_track_get_track_reference_types(const heif_track *, uint32_t out_reference_types[])
List the reference types used in this track.
uint32_t heif_context_get_sequence_timescale(const heif_context *)
Get the timescale (clock ticks per second) for timing values in the sequence.
heif_raw_sequence_sample * heif_raw_sequence_sample_alloc(void)
Allocate a new heif_raw_sequence_sample object.
void heif_raw_sequence_sample_set_tai_timestamp(heif_raw_sequence_sample *sample, const heif_tai_timestamp_packet *timestamp)
Set the TAI timestamp for a raw sequence sample.
uint32_t heif_track_get_timescale(const heif_track *)
Get the timescale (clock ticks per second) for this track.
void heif_track_options_set_gimi_track_id(heif_track_options *, const char *track_id)
Set the GIMI format track ID string.
int heif_raw_sequence_sample_has_tai_timestamp(const heif_raw_sequence_sample *)
Returns whether the raw (metadata) sample has a TAI timestamp attached to it (stored as SAI).
struct heif_raw_sequence_sample heif_raw_sequence_sample
Sequence sample object that can hold any raw byte data.
Definition heif_sequences.h:256
const char * heif_track_get_auxiliary_info_type_urn(const heif_track *)
int heif_track_has_alpha_channel(const heif_track *)
heif_track_type_4cc
Definition heif_sequences.h:120
@ heif_track_type_auxiliary
Definition heif_sequences.h:123
@ heif_track_type_image_sequence
Definition heif_sequences.h:122
@ heif_track_type_video
Definition heif_sequences.h:121
@ heif_track_type_metadata
Definition heif_sequences.h:124
const char * heif_raw_sequence_sample_get_gimi_sample_content_id(const heif_raw_sequence_sample *)
Get the GIMI content ID stored in the metadata sample.
heif_error heif_context_add_uri_metadata_sequence_track(heif_context *, const char *uri, const heif_track_options *options, heif_track **out_track)
Add a metadata track.
struct heif_track_options heif_track_options
Definition heif_sequences.h:326
const char * heif_track_get_gimi_track_content_id(const heif_track *)
Get the GIMI content ID for the track (as a whole).
heif_track_reference_type
Definition heif_sequences.h:669
@ heif_track_reference_type_thumbnails
Definition heif_sequences.h:671
@ heif_track_reference_type_description
Definition heif_sequences.h:670
@ heif_track_reference_type_auxiliary
Definition heif_sequences.h:672
void heif_sequence_encoding_options_copy(heif_sequence_encoding_options *dst, const heif_sequence_encoding_options *src)
Copy fields from src into dst, respecting both structs' version numbers.
const heif_tai_clock_info * heif_track_get_tai_clock_info_of_first_cluster(heif_track *)
Returns the TAI clock info of the track.
heif_error heif_track_get_next_raw_sequence_sample(heif_track *, heif_raw_sequence_sample **out_sample)
Get the next raw sample from the (metadata) sequence track.
void heif_context_set_number_of_sequence_repetitions(heif_context *, uint32_t number_of_repetitions)
void heif_raw_sequence_sample_set_gimi_sample_content_id(heif_raw_sequence_sample *, const char *contentID)
Set the GIMI content ID for a (metadata) sample.
uint32_t heif_track_get_id(const heif_track *track)
Get the ID of the passed track.
heif_sequence_gop_structure
Definition heif_sequences.h:382
@ heif_sequence_gop_structure_unrestricted
Definition heif_sequences.h:391
@ heif_sequence_gop_structure_intra_only
Definition heif_sequences.h:384
@ heif_sequence_gop_structure_lowdelay
Definition heif_sequences.h:387
void heif_raw_sequence_sample_release(heif_raw_sequence_sample *)
Release a heif_raw_sequence_sample object.
void heif_track_options_enable_sample_gimi_content_ids(heif_track_options *, enum heif_sample_aux_info_presence)
void heif_context_get_track_ids(const heif_context *ctx, uint32_t out_track_id_array[])
Returns the IDs for each of the tracks stored in the HEIF file.
heif_error heif_raw_sequence_sample_set_data(heif_raw_sequence_sample *, const uint8_t *data, size_t size)
Set the raw sequence sample data.
void heif_track_options_set_timescale(heif_track_options *, uint32_t timescale)
Set the track specific timescale.
const heif_tai_timestamp_packet * heif_raw_sequence_sample_get_tai_timestamp(const heif_raw_sequence_sample *)
Get the TAI timestamp of the (metadata) sample.
void heif_track_get_sample_aux_info_types(const heif_track *, heif_sample_aux_info_type out_types[])
Get get the list of sample auxiliary data types used in the track.
size_t heif_track_get_number_of_track_reference_types(const heif_track *)
Return the number of different reference types used in this track's tref box.
void heif_track_options_set_interleaved_sample_aux_infos(heif_track_options *, int interleaved_flag)
Set whether the aux-info data should be stored interleaved with the sequence samples.
uint32_t heif_raw_sequence_sample_get_duration(const heif_raw_sequence_sample *)
Get the sample duration in clock ticks of this track.
heif_track_options * heif_track_options_alloc(void)
Allocate track options object that is required to set options for a new track.
void heif_track_release(heif_track *)
Free a heif_track object received from libheif.
const uint8_t * heif_raw_sequence_sample_get_data(const heif_raw_sequence_sample *, size_t *out_array_size)
Get a pointer to the data of the (metadata) sample.
void heif_image_set_duration(heif_image *, uint32_t duration)
Set the image display duration in the track's timescale units.
uint32_t heif_track_get_number_of_repetitions(const heif_track *)
How many times the media segment should be played according to the track's edit list.
heif_error heif_track_encode_end_of_sequence(heif_track *, heif_encoder *encoder)
When all sequence frames have been sent, you can to call this function to let the library know that n...
heif_error heif_track_get_urim_sample_entry_uri_of_first_cluster(const heif_track *, const char **out_uri)
Get the URI of the first sample cluster in an 'urim' track.
heif_error heif_track_decode_next_image(heif_track *track, heif_image **out_img, heif_colorspace colorspace, heif_chroma chroma, const heif_decoding_options *options)
Decode the next image in the passed sequence track.
size_t heif_raw_sequence_sample_get_data_size(const heif_raw_sequence_sample *)
Return the size of the raw data contained in the sample.
heif_auxiliary_track_info_type
Definition heif_sequences.h:139
@ heif_auxiliary_track_info_type_unknown
Definition heif_sequences.h:140
@ heif_auxiliary_track_info_type_alpha
Definition heif_sequences.h:141
heif_error heif_context_add_visual_sequence_track(heif_context *, uint16_t width, uint16_t height, heif_track_type track_type, const heif_track_options *track_options, const heif_sequence_encoding_options *encoding_options, heif_track **out_track)
Add a visual track to the sequence.
struct heif_track heif_track
Definition heif_sequences.h:66
heif_track * heif_context_get_track(const heif_context *, uint32_t id)
Get the heif_track object for the given track ID.
size_t heif_track_find_referring_tracks(const heif_track *, uint32_t reference_type, uint32_t out_track_id[], size_t array_size)
Find tracks that are referring to the current track through the passed reference_type.
void heif_track_options_release(heif_track_options *)
enum heif_auxiliary_track_info_type heif_track_get_auxiliary_info_type(const heif_track *)
uint32_t heif_image_get_duration(const heif_image *)
Get the image display duration in clock ticks of this track.
heif_sequence_content_kind
Definition heif_sequences.h:405
@ heif_sequence_content_kind_image_sequence
Definition heif_sequences.h:407
@ heif_sequence_content_kind_video
Definition heif_sequences.h:408
@ heif_sequence_content_kind_auto
Definition heif_sequences.h:406
heif_error heif_track_add_raw_sequence_sample(heif_track *, const heif_raw_sequence_sample *)
Add a raw sequence sample (usually a metadata sample) to the (metadata) track.
heif_track_type heif_track_get_track_handler_type(const heif_track *)
Get the four-cc track handler type.
int heif_track_get_number_of_sample_aux_infos(const heif_track *)
Returns how many different types of sample auxiliary data units are assigned to this track's samples.
uint64_t heif_context_get_sequence_duration(const heif_context *)
Get the total duration of the sequence in timescale clock ticks.
struct heif_tai_timestamp_packet heif_tai_timestamp_packet
Definition heif_sequences.h:32
Contains the type of sample auxiliary data assigned to the track samples.
Definition heif_sequences.h:565
uint32_t parameter
Definition heif_sequences.h:567
uint32_t type
Definition heif_sequences.h:566
Definition heif_sequences.h:413
uint8_t version
Definition heif_sequences.h:414
enum heif_sequence_content_kind content_kind
Definition heif_sequences.h:439
int keyframe_distance_max
Definition heif_sequences.h:428
int keyframe_distance_min
Definition heif_sequences.h:427
heif_color_conversion_options color_conversion_options
Definition heif_sequences.h:422
const heif_color_profile_nclx * output_nclx_profile
Definition heif_sequences.h:420
enum heif_sequence_gop_structure gop_structure
Definition heif_sequences.h:426
int save_alpha_channel
Definition heif_sequences.h:430