Ace_Decoder_Media_Type_Get()
Abstract
Obtains the format of the file being decoded.
Syntax
Ace_Decoder_Media_Type_Get (pk_ptr)
| Argument | Type | Description |
|---|---|---|
pk_ptr |
AceT_Packet * |
Packet of interest. |
Return Type
int
File format (see Details).
Header
ace_client_api.h
Example
for (i = 0; i < prg_list_size (pk_lptr); i++)
{
Ace_Parsed_Pk *pkptr = (Ace_Parsed_Pk *)prg_list_access (pk_lptr, i);
CNGFrame *frame = new CNGFrame;
frame->frameNumber = i;
frame->frameType = Ace_Decoder_Media_Type_Get ((AceT_Packet *)pkptr);
frame->totalBytes = pkptr->get_pk_len ();
frame->time_stamp.seconds = (int)pkptr->get_rel_time ();
frame->time_stamp.nanoseconds = (pkptr->get_rel_time () -
(int)pkptr->get_rel_time ()) * 1000000000;
...
Details
The file format is one of the following:
- 0 (Token Ring)
- 1 (Ethernet)
- 9 (FDDI)
If the media type is not one of these values, the function issues a recoverable error and returns 1 (because this is the wrong media type, all packets will be filtered out, but this avoids an abort caused by returning an invalid media type).