ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
AMFStream Class Reference
+ Collaboration diagram for AMFStream:

Public Member Functions

 __construct (&$bytes)
 
 readByte ()
 
 readInt ()
 
 readLong ()
 
 readDouble ()
 
 readUTF ()
 
 readLongUTF ()
 
 read ($length)
 
 peekByte ()
 
 peekInt ()
 
 peekLong ()
 
 peekDouble ()
 
 peekUTF ()
 
 peekLongUTF ()
 

Data Fields

 $bytes
 
 $pos
 

Detailed Description

Definition at line 389 of file module.audio-video.flv.php.

Constructor & Destructor Documentation

◆ __construct()

AMFStream::__construct ( $bytes)

Definition at line 393 of file module.audio-video.flv.php.

393  {
394  $this->bytes =& $bytes;
395  $this->pos = 0;
396  }

Member Function Documentation

◆ peekByte()

AMFStream::peekByte ( )

Definition at line 430 of file module.audio-video.flv.php.

430  {
431  $pos = $this->pos;
432  $val = $this->readByte();
433  $this->pos = $pos;
434  return $val;
435  }

◆ peekDouble()

AMFStream::peekDouble ( )

Definition at line 451 of file module.audio-video.flv.php.

451  {
452  $pos = $this->pos;
453  $val = $this->readDouble();
454  $this->pos = $pos;
455  return $val;
456  }

◆ peekInt()

AMFStream::peekInt ( )

Definition at line 437 of file module.audio-video.flv.php.

437  {
438  $pos = $this->pos;
439  $val = $this->readInt();
440  $this->pos = $pos;
441  return $val;
442  }

◆ peekLong()

AMFStream::peekLong ( )

Definition at line 444 of file module.audio-video.flv.php.

444  {
445  $pos = $this->pos;
446  $val = $this->readLong();
447  $this->pos = $pos;
448  return $val;
449  }

◆ peekLongUTF()

AMFStream::peekLongUTF ( )

Definition at line 465 of file module.audio-video.flv.php.

465  {
466  $pos = $this->pos;
467  $val = $this->readLongUTF();
468  $this->pos = $pos;
469  return $val;
470  }

◆ peekUTF()

AMFStream::peekUTF ( )

Definition at line 458 of file module.audio-video.flv.php.

458  {
459  $pos = $this->pos;
460  $val = $this->readUTF();
461  $this->pos = $pos;
462  return $val;
463  }

◆ read()

AMFStream::read (   $length)

Definition at line 424 of file module.audio-video.flv.php.

424  {
425  $val = substr($this->bytes, $this->pos, $length);
426  $this->pos += $length;
427  return $val;
428  }

◆ readByte()

AMFStream::readByte ( )

Definition at line 398 of file module.audio-video.flv.php.

References getid3_lib\BigEndian2Int().

398  {
399  return getid3_lib::BigEndian2Int(substr($this->bytes, $this->pos++, 1));
400  }
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
Definition: getid3.lib.php:263
+ Here is the call graph for this function:

◆ readDouble()

AMFStream::readDouble ( )

Definition at line 410 of file module.audio-video.flv.php.

References getid3_lib\BigEndian2Float().

410  {
411  return getid3_lib::BigEndian2Float($this->read(8));
412  }
static BigEndian2Float($byteword)
Definition: getid3.lib.php:185
+ Here is the call graph for this function:

◆ readInt()

AMFStream::readInt ( )

Definition at line 402 of file module.audio-video.flv.php.

402  {
403  return ($this->readByte() << 8) + $this->readByte();
404  }

◆ readLong()

AMFStream::readLong ( )

Definition at line 406 of file module.audio-video.flv.php.

406  {
407  return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();
408  }

◆ readLongUTF()

AMFStream::readLongUTF ( )

Definition at line 419 of file module.audio-video.flv.php.

419  {
420  $length = $this->readLong();
421  return $this->read($length);
422  }

◆ readUTF()

AMFStream::readUTF ( )

Definition at line 414 of file module.audio-video.flv.php.

414  {
415  $length = $this->readInt();
416  return $this->read($length);
417  }

Field Documentation

◆ $bytes

AMFStream::$bytes

Definition at line 390 of file module.audio-video.flv.php.

◆ $pos

AMFStream::$pos

Definition at line 391 of file module.audio-video.flv.php.


The documentation for this class was generated from the following file: