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).

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).

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com