cgv
Loading...
Searching...
No Matches
cgv::media::riff_handler Struct Reference

callback handler passed to riff reader More...

#include <riff.h>

Public Member Functions

virtual bool begin_list_chunk (fourcc id, unsigned size, fourcc hdr)
 this is called when riff or list chunk is started, return whether to process list elements (default return is true)
 
virtual bool process_chunk_header (fourcc id, unsigned size, void *&data_ptr)
 this is called before data of chunk is read, return whether to process chunk data (default return is true)
 
virtual void process_chunk_data (fourcc id, unsigned size, void *data_ptr)
 if process_chunk_header returned true, this callback is called to process chunk data
 
virtual void end_list_chunk (fourcc id, unsigned size, fourcc hdr)
 called to mark the end of a list chunk
 

Detailed Description

callback handler passed to riff reader

Definition at line 34 of file riff.h.

Member Function Documentation

◆ begin_list_chunk()

bool cgv::media::riff_handler::begin_list_chunk ( fourcc  id,
unsigned  size,
fourcc  hdr 
)
virtual

this is called when riff or list chunk is started, return whether to process list elements (default return is true)

Definition at line 38 of file riff.cxx.

Referenced by cgv::media::riff_reader::read().

◆ end_list_chunk()

void cgv::media::riff_handler::end_list_chunk ( fourcc  id,
unsigned  size,
fourcc  hdr 
)
virtual

called to mark the end of a list chunk

Definition at line 41 of file riff.cxx.

Referenced by cgv::media::riff_reader::read().

◆ process_chunk_data()

void cgv::media::riff_handler::process_chunk_data ( fourcc  id,
unsigned  size,
void *  data_ptr 
)
virtual

if process_chunk_header returned true, this callback is called to process chunk data

Definition at line 40 of file riff.cxx.

◆ process_chunk_header()

bool cgv::media::riff_handler::process_chunk_header ( fourcc  id,
unsigned  size,
void *&  data_ptr 
)
virtual

this is called before data of chunk is read, return whether to process chunk data (default return is true)

If the chunk data should be stored in memory allocated by the handler, set data_ptr to this memory block that must provide space for size bytes. If data_ptr is not set, the reader automatically allocates a new data block, which is also deallocated by the reader after the corresponding call to process_chunk_data.

Definition at line 39 of file riff.cxx.


The documentation for this struct was generated from the following files: