Truxton media get type

From truxwiki.com
Revision as of 02:24, 25 July 2020 by Sam (talk | contribs) (Created page with "This retrieves the type of the media. It corresponds to the <code>MediaTypeID</code> column of the <code>Media</code> table. It can be one of the Media Status...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This retrieves the type of the media. It corresponds to the MediaTypeID 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

 1 void print_status(uint64_t media)
 2 {
 3    uint64_t status = truxton_media_get_status( media );
 4 
 5    if ( status == MEDIA_STATUS_LOADED )
 6    {
 7       printf( "The media has finished loading.\n" );
 8    }
 9    else
10    {
11       printf( "The media is not done.\n" );
12    }
13 }