libannodex  0.7.3
Typedefs | Functions
anx_track.h File Reference

Functions related to tracks in Annodex media. More...

#include <annodex/anx_types.h>

Go to the source code of this file.

Typedefs

typedef struct _AnxTrack AnxTrack
 Track.
 

Functions

AnxTrackanx_track_free (AnxTrack *track)
 Free an AnxTrack object. More...
 
AnxListanx_get_track_list (ANNODEX *annodex)
 Query the contents of tracks in an annodex. More...
 
char * anx_track_get_content_type (ANNODEX *annodex, long serialno)
 Query the content type of a track in an annodex. More...
 
long anx_track_get_nr_headers (ANNODEX *annodex, long serialno)
 Query the number of header packets of a track in an annodex. More...
 
int anx_track_get_granule_rate (ANNODEX *annodex, long serialno, anx_int64_t *granule_rate_n, anx_int64_t *granule_rate_d)
 Query the granule rate of a track in an annodex. More...
 
anx_int64_t anx_track_time_to_granules (ANNODEX *annodex, long serialno, double seconds)
 Convert a time in seconds to a granule position for a track in an annodex. More...
 
double anx_track_granules_to_time (ANNODEX *annodex, long serialno, anx_int64_t granules)
 Convert a granule position to time in seconds for a track in an annodex. More...
 
long anx_track_get_basegranule (ANNODEX *annodex, long serialno)
 Query the basegranule of a track in an annodex. More...
 
int anx_track_get_preroll (ANNODEX *annodex, long serialno)
 Query the preroll of a track in an annodex. More...
 
int anx_track_get_granuleshift (ANNODEX *annodex, long serialno)
 Query the granuleshift of a track in an annodex. More...
 

Detailed Description

Functions related to tracks in Annodex media.

Function Documentation

◆ anx_get_track_list()

AnxList* anx_get_track_list ( ANNODEX annodex)

Query the contents of tracks in an annodex.

Parameters
annodexan ANNODEX* handle
Returns
a list of AnxTrack *
Note
This should be freed as follows:
  Annodex * annodex;
  AnxList * tracks;

tracks = anx_get_track_list (annodex); ... anx_list_free_with (tracks, (AnxFreeFunc)anxrip_track_free);

◆ anx_track_free()

AnxTrack* anx_track_free ( AnxTrack track)

Free an AnxTrack object.

Parameters
trackAn AnxTrack
Returns
NULL

◆ anx_track_get_basegranule()

long anx_track_get_basegranule ( ANNODEX annodex,
long  serialno 
)

Query the basegranule of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
Returns
the basegranule

◆ anx_track_get_content_type()

char* anx_track_get_content_type ( ANNODEX annodex,
long  serialno 
)

Query the content type of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query

◆ anx_track_get_granule_rate()

int anx_track_get_granule_rate ( ANNODEX annodex,
long  serialno,
anx_int64_t granule_rate_n,
anx_int64_t granule_rate_d 
)

Query the granule rate of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
granule_rate_nreturn granule_rate numerator
granule_rate_dreturn granule_rate denominator
Returns
0 on success, -1 on failure

◆ anx_track_get_granuleshift()

int anx_track_get_granuleshift ( ANNODEX annodex,
long  serialno 
)

Query the granuleshift of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
Returns
the granuleshift

◆ anx_track_get_nr_headers()

long anx_track_get_nr_headers ( ANNODEX annodex,
long  serialno 
)

Query the number of header packets of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query

◆ anx_track_get_preroll()

int anx_track_get_preroll ( ANNODEX annodex,
long  serialno 
)

Query the preroll of a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
Returns
the preroll

◆ anx_track_granules_to_time()

double anx_track_granules_to_time ( ANNODEX annodex,
long  serialno,
anx_int64_t  granules 
)

Convert a granule position to time in seconds for a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
granulesthe granule position to convert

◆ anx_track_time_to_granules()

anx_int64_t anx_track_time_to_granules ( ANNODEX annodex,
long  serialno,
double  seconds 
)

Convert a time in seconds to a granule position for a track in an annodex.

Parameters
annodexan ANNODEX* handle
serialnothe serialno of the track to query
secondsthe time to convert
Returns
the granulepos corresponding to seconds