Difference between revisions of "Truxton media set size"
Jump to navigation
Jump to search
(Created page with "Sets the size of the original media, in bytes, before processing. This corresponds to the <code>Size</code> column of the <code>Media</code> table. =Syntax= <syntaxhighlight...") |
|||
| Line 3: | Line 3: | ||
=Syntax= | =Syntax= | ||
| − | < | + | <source lang="C"> |
void truxton_media_set_size( uint64_t media_handle, uint64_t byte_count ); | void truxton_media_set_size( uint64_t media_handle, uint64_t byte_count ); | ||
| − | </ | + | </source> |
=Parameters= | =Parameters= | ||
| Line 15: | Line 15: | ||
=Sample= | =Sample= | ||
| − | < | + | <source lang="C" highlight="4"> |
void set_GB( uint64_t media_handle, double gigabytes ) | void set_GB( uint64_t media_handle, double gigabytes ) | ||
{ | { | ||
| Line 21: | Line 21: | ||
truxton_media_set_size( media_handle, byte_count ); | truxton_media_set_size( media_handle, byte_count ); | ||
} | } | ||
| − | </ | + | </source> |
Revision as of 00:10, 10 February 2021
Sets the size of the original media, in bytes, before processing.
This corresponds to the Size column of the Media table.
Syntax
void truxton_media_set_size( uint64_t media_handle, uint64_t byte_count );
Parameters
media_handle
The handle created by the truxton_media_create or truxton_media_open_id call.
byte_count
The number of bytes in the original media.
Sample
void set_GB( uint64_t media_handle, double gigabytes )
{
uint64_t byte_count = gigabytes * 1073741824;
truxton_media_set_size( media_handle, byte_count );
}