Difference between revisions of "Truxton media set calculated size"

From truxwiki.com
Jump to navigation Jump to search
(Created page with "Updates the <code>[Size]</code> column of the <code><nowiki>[</nowiki>Media<nowiki>]</nowiki></code> table with the sum of the file sizes of Origin|normal or...")
 
 
Line 10: Line 10:
 
==<code>media_handle</code>==
 
==<code>media_handle</code>==
 
The handle created by the [[truxton_media_create]] or [[truxton_media_open_id]] call.
 
The handle created by the [[truxton_media_create]] or [[truxton_media_open_id]] call.
 +
 +
=Return value=
 +
A non-zero value on success, zero on failure.
  
 
=Sample=
 
=Sample=

Latest revision as of 06:51, 16 August 2025

Updates the [Size] column of the [Media] table with the sum of the file sizes of normal origin. This API is useful when you are using a script to create media instead of loading it.

Syntax

int truxton_media_set_calculated_size( uint64_t media_handle );

Parameters

media_handle

The handle created by the truxton_media_create or truxton_media_open_id call.

Return value

A non-zero value on success, zero on failure.

Sample

void set_size( uint64_t media_handle )
{
   truxton_media_set_calculated_size( media_handle );
}