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 |
AnxTrack * | anx_track_free (AnxTrack *track) |
| Free an AnxTrack object.
|
AnxList * | anx_get_track_list (ANNODEX *annodex) |
| Query the contents of tracks in an annodex.
|
char * | anx_track_get_content_type (ANNODEX *annodex, long serialno) |
| Query the content type of a track in an annodex.
|
long | anx_track_get_nr_headers (ANNODEX *annodex, long serialno) |
| Query the number of header packets of a track in an annodex.
|
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.
|
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.
|
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.
|
long | anx_track_get_basegranule (ANNODEX *annodex, long serialno) |
| Query the basegranule of a track in an annodex.
|
int | anx_track_get_preroll (ANNODEX *annodex, long serialno) |
| Query the preroll of a track in an annodex.
|
int | anx_track_get_granuleshift (ANNODEX *annodex, long serialno) |
| Query the granuleshift of a track in an annodex.
|
Detailed Description
Functions related to tracks in Annodex media.
Function Documentation
Query the contents of tracks in an annodex.
- Parameters:
-
| annodex | an 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);
Free an AnxTrack object.
- Parameters:
-
- Returns:
- NULL
long anx_track_get_basegranule |
( |
ANNODEX * |
annodex, |
|
|
long |
serialno | |
|
) |
| | |
Query the basegranule of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
- Returns:
- the basegranule
char* anx_track_get_content_type |
( |
ANNODEX * |
annodex, |
|
|
long |
serialno | |
|
) |
| | |
Query the content type of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
Query the granule rate of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
| granule_rate_n | return granule_rate numerator |
| granule_rate_d | return granule_rate denominator |
- Returns:
- 0 on success, -1 on failure
int anx_track_get_granuleshift |
( |
ANNODEX * |
annodex, |
|
|
long |
serialno | |
|
) |
| | |
Query the granuleshift of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
- Returns:
- the granuleshift
long anx_track_get_nr_headers |
( |
ANNODEX * |
annodex, |
|
|
long |
serialno | |
|
) |
| | |
Query the number of header packets of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
int anx_track_get_preroll |
( |
ANNODEX * |
annodex, |
|
|
long |
serialno | |
|
) |
| | |
Query the preroll of a track in an annodex.
- Parameters:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
- Returns:
- the preroll
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:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
| granules | the granule position to convert |
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:
-
| annodex | an ANNODEX* handle |
| serialno | the serialno of the track to query |
| seconds | the time to convert |
- Returns:
- the granulepos corresponding to seconds