ArTrackData
External data track, used by Recording and Playback API.
Summary
Typedefs
struct ArTrackData_
Functions
ArTrackDataList_acquireItem
(const ArSession
*session, const ArTrackDataList
*track_data_list, int32_t index, ArTrackData
**out_track_data)
void
ArTrackDataList_create
(const ArSession
*session, ArTrackDataList
**out_track_data_list)
void
ArTrackDataList_destroy
( ArTrackDataList
*track_data_list)
void
ArTrackDataList_getSize
(const ArSession
*session, const ArTrackDataList
*track_data_list, int32_t *out_size)
void
ArTrackData_getData
(const ArSession
*session, const ArTrackData
*track_data, const uint8_t **out_data, int32_t *out_size)
void
ArTrackData_getFrameTimestamp
(const ArSession
*session, const ArTrackData
*track_data, int64_t *out_timestamp_ns)
void
ArTrackData_release
( ArTrackData
*track_data)
void
Typedefs
ArTrackData
struct ArTrackData_ ArTrackData
Data that has been recorded to an external track.
Functions
ArTrackDataList_acquireItem
void ArTrackDataList_acquireItem ( const ArSession * session , const ArTrackDataList * track_data_list , int32_t index , ArTrackData ** out_track_data )
Acquires a reference to an indexed entry in the list.
This call must eventually be matched with a call to ArTrackData_release
.
session
|
The ARCore session
|
track_data_list
|
The list being queried
|
index
|
The index of the list
|
out_track_data
|
ArTrackDataList_create
void ArTrackDataList_create ( const ArSession * session , ArTrackDataList ** out_track_data_list )
Creates an ArTrackDataList
object.
session
|
The ARCore session
|
out_track_data_list
|
The pointer to the list to be initialized
|
ArTrackDataList_destroy
void ArTrackDataList_destroy( ArTrackDataList *track_data_list )
Releases the memory used by the ArTrackData
list object.
track_data_list
ArTrackDataList_getSize
void ArTrackDataList_getSize ( const ArSession * session , const ArTrackDataList * track_data_list , int32_t * out_size )
Retrieves the number of ArTrackData
elements in the list.
session
|
The ARCore session.
|
track_data_list
|
The list being checked for size
|
out_size
|
The size of the list, 0 if
track_data_list
is empty |
ArTrackData_getData
void ArTrackData_getData ( const ArSession * session , const ArTrackData * track_data , const uint8_t ** out_data , int32_t * out_size )
Retrieves the ArTrackData
byte data that was recorded by ArFrame_recordTrackData
.
The pointer returned by this function is valid until ArTrackData_release
is called.
session
|
The ARCore session
|
track_data
|
|
out_data
|
The pointer to the
ArTrackDataList
byte data being populated. Will point to an empty list if no data present |
out_size
|
The number of bytes that were populated in
out_data
, 0 if list is empty |
ArTrackData_getFrameTimestamp
void ArTrackData_getFrameTimestamp ( const ArSession * session , const ArTrackData * track_data , int64_t * out_timestamp_ns )
Retrieves the timestamp in nanoseconds of the frame the given ArTrackData
was recorded on.
This timestamp is equal to the result of ArFrame_getTimestamp
on the frame during which the track data was written.
session
|
The ARCore session
|
track_data
|
|
out_timestamp_ns
|
The
int64_t
timestamp value to be set |
ArTrackData_release
void ArTrackData_release( ArTrackData *track_data )
Releases a reference to a ArTrackData
.
Acquire a ArTrackData
with ArTrackDataList_acquireItem
.
This function may safely be called with NULL
- it will do nothing.
track_data