cgv
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) More...
 
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

Member Function Documentation

◆ 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.


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