Difference between revisions of "Truxton media get status"
Jump to navigation
Jump to search
| Line 17: | Line 17: | ||
=Sample= | =Sample= | ||
<source lang="C" highlight="3"> | <source lang="C" highlight="3"> | ||
| − | void print_status(uint64_t media) | + | void print_status( uint64_t media ) |
{ | { | ||
uint64_t status = truxton_media_get_status( media ); | uint64_t status = truxton_media_get_status( media ); | ||
Revision as of 23:47, 9 February 2021
This retrieves the status of the media.
It corresponds to the [MediaStatusID] column of the [Media] table.
It can be one of the defined constants but it must be one of the values in the [ID] column of the [MediaStatus] table.
Syntax
uint64_t truxton_media_get_status( uint64_t media_handle );
Parameters
media_handle
The handle created by the truxton_media_open_id or truxton_media_create call.
Return value
The status of the media.
Sample
void print_status( uint64_t media )
{
uint64_t status = truxton_media_get_status( media );
if ( status == MEDIA_STATUS_LOADED )
{
printf( "The media has finished loading.\n" );
}
else
{
printf( "The media is not done.\n" );
}
}