ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
AMFStream Class Reference
+ Collaboration diagram for AMFStream:

Public Member Functions

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

Data Fields

 $bytes
 
 $pos
 

Detailed Description

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

Member Function Documentation

◆ AMFStream()

AMFStream::AMFStream ( $bytes)

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

252  {
253  $this->bytes =& $bytes;
254  $this->pos = 0;
255  }

◆ peekByte()

AMFStream::peekByte ( )

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

289  {
290  $pos = $this->pos;
291  $val = $this->readByte();
292  $this->pos = $pos;
293  return $val;
294  }

◆ peekDouble()

AMFStream::peekDouble ( )

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

310  {
311  $pos = $this->pos;
312  $val = $this->readDouble();
313  $this->pos = $pos;
314  return $val;
315  }

◆ peekInt()

AMFStream::peekInt ( )

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

296  {
297  $pos = $this->pos;
298  $val = $this->readInt();
299  $this->pos = $pos;
300  return $val;
301  }

◆ peekLong()

AMFStream::peekLong ( )

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

303  {
304  $pos = $this->pos;
305  $val = $this->readLong();
306  $this->pos = $pos;
307  return $val;
308  }

◆ peekLongUTF()

AMFStream::peekLongUTF ( )

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

324  {
325  $pos = $this->pos;
326  $val = $this->readLongUTF();
327  $this->pos = $pos;
328  return $val;
329  }

◆ peekUTF()

AMFStream::peekUTF ( )

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

317  {
318  $pos = $this->pos;
319  $val = $this->readUTF();
320  $this->pos = $pos;
321  return $val;
322  }

◆ read()

AMFStream::read (   $length)

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

283  {
284  $val = substr($this->bytes, $this->pos, $length);
285  $this->pos += $length;
286  return $val;
287  }

◆ readByte()

AMFStream::readByte ( )

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

References getid3_lib\BigEndian2Int().

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

◆ readDouble()

AMFStream::readDouble ( )

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

References getid3_lib\BigEndian2Float().

269  {
270  return getid3_lib::BigEndian2Float($this->read(8));
271  }
BigEndian2Float($byteword)
Definition: getid3.lib.php:159
+ Here is the call graph for this function:

◆ readInt()

AMFStream::readInt ( )

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

261  {
262  return ($this->readByte() << 8) + $this->readByte();
263  }

◆ readLong()

AMFStream::readLong ( )

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

265  {
266  return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();
267  }

◆ readLongUTF()

AMFStream::readLongUTF ( )

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

278  {
279  $length = $this->readLong();
280  return $this->read($length);
281  }

◆ readUTF()

AMFStream::readUTF ( )

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

273  {
274  $length = $this->readInt();
275  return $this->read($length);
276  }

Field Documentation

◆ $bytes

AMFStream::$bytes

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

◆ $pos

AMFStream::$pos

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


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