Difference between revisions of "Truxton media set size"

From truxwiki.com
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...")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
Sets the size of the original media, in bytes, before processing.
 
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.
+
This corresponds to the <code>[Size]</code> column of the <code><nowiki>[</nowiki>[[Media Table|Media]]<nowiki>]</nowiki></code> table.
  
 
=Syntax=
 
=Syntax=
<syntaxhighlight lang="C">
+
<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 );
</syntaxhighlight>
+
</source>
  
 
=Parameters=
 
=Parameters=
Line 15: Line 15:
  
 
=Sample=
 
=Sample=
<syntaxhighlight lang="C" highlight="4">
+
<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 );
 
}
 
}
</syntaxhighlight>
+
</source>

Latest revision as of 07:45, 3 February 2024

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 );
}