Skip to content

acl/io/clip_reader.h

#include "acl/io/clip_reader.h"

The reader of the ACL clip file format (SJSON).

sjson_file_type

enum class sjson_file_type
{
    unknown,
    raw_clip,
    raw_track_list,
};

Enum to describe each type of raw content that an SJSON ACL file might contain.

sjson_raw_clip

struct sjson_raw_clip

Raw transform tracks.

sjson_raw_clip::track_list

track_array_vqvf track_list;

The transform tracks of the clip, they hold the transform space of the clip.

sjson_raw_clip::additive_base_track_list

track_array_vqvf additive_base_track_list;

The additive base, always in local space.

sjson_raw_clip::additive_format

additive_clip_format8 additive_format = additive_clip_format8::none;

The additive format of the clip, none when the clip has no additive base.

sjson_raw_clip::has_settings

bool has_settings = false;

True if the file contains compression settings.

sjson_raw_clip::settings

compression_settings settings;

The compression settings of the file, valid when has_settings is true.

sjson_raw_clip::sjson_raw_clip

sjson_raw_clip(sjson_raw_clip&&) = default

Moves the tracks and the settings of another instance.

sjson_raw_clip::operator=

sjson_raw_clip& operator=(sjson_raw_clip&&) = default

Moves the tracks and the settings of another instance.

sjson_raw_track_list

struct sjson_raw_track_list

Raw scalar tracks.

sjson_raw_track_list::track_list

track_array track_list;

The tracks of the track list.

sjson_raw_track_list::has_settings

bool has_settings = false;

True if the file contains compression settings.

sjson_raw_track_list::settings

compression_settings settings;

The compression settings of the file, valid when has_settings is true.

sjson_raw_track_list::sjson_raw_track_list

sjson_raw_track_list(sjson_raw_track_list&&) = default

Moves the tracks and the settings of another instance.

sjson_raw_track_list::operator=

sjson_raw_track_list& operator=(sjson_raw_track_list&&) = default

Moves the tracks and the settings of another instance.

clip_reader

class clip_reader

An SJSON ACL file reader.

clip_reader::clip_reader

clip_reader(iallocator& allocator, const char* sjson_input, size_t input_length)

Constructs a reader for the SJSON text in the given buffer. The reader does not copy the buffer: it must stay valid as long as the reader uses it.

clip_reader::get_file_type

sjson_file_type get_file_type()

Returns the type of the file: a raw clip, a raw track list, or unknown.

clip_reader::read_raw_clip

bool read_raw_clip(sjson_raw_clip& out_data)

Reads a raw clip file with transform tracks. Returns true on success. On failure, get_error() returns the error.

clip_reader::read_raw_track_list

bool read_raw_track_list(sjson_raw_track_list& out_data)

Reads a raw track list file. Returns true on success. On failure, get_error() returns the error.

clip_reader::get_error

clip_reader_error get_error() const

Returns the last error.