Ardour  9.0-pre0-582-g084a23a80d
PTFFormat Class Reference

#include <ptformat.h>

Classes

struct  block_t
 
struct  midi_ev_t
 
struct  region_t
 
struct  track_t
 
struct  wav_t
 

Public Member Functions

 PTFFormat ()
 
 ~PTFFormat ()
 
int load (std::string const &path, int64_t targetsr)
 
int unxor (std::string const &path)
 
bool find_track (uint16_t index, track_t &tt) const
 
bool find_region (uint16_t index, region_t &rr) const
 
bool find_miditrack (uint16_t index, track_t &tt) const
 
bool find_midiregion (uint16_t index, region_t &rr) const
 
bool find_wav (uint16_t index, wav_t &ww) const
 
uint8_t version () const
 
int64_t sessionrate () const
 
const std::string & path ()
 
const std::vector< wav_t > & audiofiles () const
 
const std::vector< region_t > & regions () const
 
const std::vector< region_t > & midiregions () const
 
const std::vector< track_t > & tracks () const
 
const std::vector< track_t > & miditracks () const
 
const unsigned char * unxored_data () const
 
uint64_t unxored_size () const
 

Static Public Member Functions

static bool regionexistsin (std::vector< region_t > const &reg, uint16_t index)
 
static bool wavexistsin (std::vector< wav_t > const &wv, uint16_t index)
 

Private Member Functions

bool jumpback (uint32_t *currpos, unsigned char *buf, const uint32_t maxoffset, const unsigned char *needle, const uint32_t needlelen)
 
bool jumpto (uint32_t *currpos, unsigned char *buf, const uint32_t maxoffset, const unsigned char *needle, const uint32_t needlelen)
 
bool foundin (std::string const &haystack, std::string const &needle)
 
int64_t foundat (unsigned char *haystack, uint64_t n, const char *needle)
 
std::string parsestring (uint32_t pos)
 
const std::string get_content_description (uint16_t ctype)
 
int parse (void)
 
void parseblocks (void)
 
bool parseheader (void)
 
bool parserest (void)
 
bool parseaudio (void)
 
bool parsemidi (void)
 
void dump (void)
 
bool parse_block_at (uint32_t pos, struct block_t *b, struct block_t *parent, int level)
 
void dump_block (struct block_t &b, int level)
 
bool parse_version ()
 
void parse_region_info (uint32_t j, block_t &blk, region_t &r)
 
void parse_three_point (uint32_t j, uint64_t &start, uint64_t &offset, uint64_t &length)
 
uint8_t gen_xor_delta (uint8_t xor_value, uint8_t mul, bool negative)
 
void setrates (void)
 
void cleanup (void)
 
void free_block (struct block_t &b)
 
void free_all_blocks (void)
 

Private Attributes

std::vector< wav_t_audiofiles
 
std::vector< region_t_regions
 
std::vector< region_t_midiregions
 
std::vector< track_t_tracks
 
std::vector< track_t_miditracks
 
std::string _path
 
unsigned char * _ptfunxored
 
uint64_t _len
 
int64_t _sessionrate
 
uint8_t _version
 
uint8_t * _product
 
int64_t _targetrate
 
float _ratefactor
 
bool is_bigendian
 
std::vector< block_tblocks
 

Detailed Description

Definition at line 32 of file ptformat.h.

Constructor & Destructor Documentation

◆ PTFFormat()

PTFFormat::PTFFormat ( )

◆ ~PTFFormat()

PTFFormat::~PTFFormat ( )

Member Function Documentation

◆ audiofiles()

const std::vector<wav_t>& PTFFormat::audiofiles ( ) const
inline

Definition at line 213 of file ptformat.h.

◆ cleanup()

void PTFFormat::cleanup ( void  )
private

◆ dump()

void PTFFormat::dump ( void  )
private

◆ dump_block()

void PTFFormat::dump_block ( struct block_t b,
int  level 
)
private

◆ find_midiregion()

bool PTFFormat::find_midiregion ( uint16_t  index,
region_t rr 
) const
inline

Definition at line 157 of file ptformat.h.

◆ find_miditrack()

bool PTFFormat::find_miditrack ( uint16_t  index,
track_t tt 
) const
inline

Definition at line 143 of file ptformat.h.

◆ find_region()

bool PTFFormat::find_region ( uint16_t  index,
region_t rr 
) const
inline

Definition at line 128 of file ptformat.h.

◆ find_track()

bool PTFFormat::find_track ( uint16_t  index,
track_t tt 
) const
inline

Definition at line 114 of file ptformat.h.

◆ find_wav()

bool PTFFormat::find_wav ( uint16_t  index,
wav_t ww 
) const
inline

Definition at line 171 of file ptformat.h.

◆ foundat()

int64_t PTFFormat::foundat ( unsigned char *  haystack,
uint64_t  n,
const char *  needle 
)
private

◆ foundin()

bool PTFFormat::foundin ( std::string const &  haystack,
std::string const &  needle 
)
private

◆ free_all_blocks()

void PTFFormat::free_all_blocks ( void  )
private

◆ free_block()

void PTFFormat::free_block ( struct block_t b)
private

◆ gen_xor_delta()

uint8_t PTFFormat::gen_xor_delta ( uint8_t  xor_value,
uint8_t  mul,
bool  negative 
)
private

◆ get_content_description()

const std::string PTFFormat::get_content_description ( uint16_t  ctype)
private

◆ jumpback()

bool PTFFormat::jumpback ( uint32_t *  currpos,
unsigned char *  buf,
const uint32_t  maxoffset,
const unsigned char *  needle,
const uint32_t  needlelen 
)
private

◆ jumpto()

bool PTFFormat::jumpto ( uint32_t *  currpos,
unsigned char *  buf,
const uint32_t  maxoffset,
const unsigned char *  needle,
const uint32_t  needlelen 
)
private

◆ load()

int PTFFormat::load ( std::string const &  path,
int64_t  targetsr 
)

◆ midiregions()

const std::vector<region_t>& PTFFormat::midiregions ( ) const
inline

Definition at line 215 of file ptformat.h.

◆ miditracks()

const std::vector<track_t>& PTFFormat::miditracks ( ) const
inline

Definition at line 217 of file ptformat.h.

◆ parse()

int PTFFormat::parse ( void  )
private

◆ parse_block_at()

bool PTFFormat::parse_block_at ( uint32_t  pos,
struct block_t b,
struct block_t parent,
int  level 
)
private

◆ parse_region_info()

void PTFFormat::parse_region_info ( uint32_t  j,
block_t blk,
region_t r 
)
private

◆ parse_three_point()

void PTFFormat::parse_three_point ( uint32_t  j,
uint64_t &  start,
uint64_t &  offset,
uint64_t &  length 
)
private

◆ parse_version()

bool PTFFormat::parse_version ( )
private

◆ parseaudio()

bool PTFFormat::parseaudio ( void  )
private

◆ parseblocks()

void PTFFormat::parseblocks ( void  )
private

◆ parseheader()

bool PTFFormat::parseheader ( void  )
private

◆ parsemidi()

bool PTFFormat::parsemidi ( void  )
private

◆ parserest()

bool PTFFormat::parserest ( void  )
private

◆ parsestring()

std::string PTFFormat::parsestring ( uint32_t  pos)
private

◆ path()

const std::string& PTFFormat::path ( )
inline

Definition at line 211 of file ptformat.h.

◆ regionexistsin()

static bool PTFFormat::regionexistsin ( std::vector< region_t > const &  reg,
uint16_t  index 
)
inlinestatic

Definition at line 185 of file ptformat.h.

◆ regions()

const std::vector<region_t>& PTFFormat::regions ( ) const
inline

Definition at line 214 of file ptformat.h.

◆ sessionrate()

int64_t PTFFormat::sessionrate ( ) const
inline

Definition at line 210 of file ptformat.h.

◆ setrates()

void PTFFormat::setrates ( void  )
private

◆ tracks()

const std::vector<track_t>& PTFFormat::tracks ( ) const
inline

Definition at line 216 of file ptformat.h.

◆ unxor()

int PTFFormat::unxor ( std::string const &  path)

◆ unxored_data()

const unsigned char* PTFFormat::unxored_data ( ) const
inline

Definition at line 219 of file ptformat.h.

◆ unxored_size()

uint64_t PTFFormat::unxored_size ( ) const
inline

Definition at line 220 of file ptformat.h.

◆ version()

uint8_t PTFFormat::version ( ) const
inline

Definition at line 209 of file ptformat.h.

◆ wavexistsin()

static bool PTFFormat::wavexistsin ( std::vector< wav_t > const &  wv,
uint16_t  index 
)
inlinestatic

Definition at line 197 of file ptformat.h.

Member Data Documentation

◆ _audiofiles

std::vector<wav_t> PTFFormat::_audiofiles
private

Definition at line 224 of file ptformat.h.

◆ _len

uint64_t PTFFormat::_len
private

Definition at line 233 of file ptformat.h.

◆ _midiregions

std::vector<region_t> PTFFormat::_midiregions
private

Definition at line 226 of file ptformat.h.

◆ _miditracks

std::vector<track_t> PTFFormat::_miditracks
private

Definition at line 228 of file ptformat.h.

◆ _path

std::string PTFFormat::_path
private

Definition at line 230 of file ptformat.h.

◆ _product

uint8_t* PTFFormat::_product
private

Definition at line 236 of file ptformat.h.

◆ _ptfunxored

unsigned char* PTFFormat::_ptfunxored
private

Definition at line 232 of file ptformat.h.

◆ _ratefactor

float PTFFormat::_ratefactor
private

Definition at line 238 of file ptformat.h.

◆ _regions

std::vector<region_t> PTFFormat::_regions
private

Definition at line 225 of file ptformat.h.

◆ _sessionrate

int64_t PTFFormat::_sessionrate
private

Definition at line 234 of file ptformat.h.

◆ _targetrate

int64_t PTFFormat::_targetrate
private

Definition at line 237 of file ptformat.h.

◆ _tracks

std::vector<track_t> PTFFormat::_tracks
private

Definition at line 227 of file ptformat.h.

◆ _version

uint8_t PTFFormat::_version
private

Definition at line 235 of file ptformat.h.

◆ blocks

std::vector<block_t> PTFFormat::blocks
private

Definition at line 249 of file ptformat.h.

◆ is_bigendian

bool PTFFormat::is_bigendian
private

Definition at line 239 of file ptformat.h.


The documentation for this class was generated from the following file: