ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
GetId3\Module\AudioVideo\AMFStream Class Reference

GetId3() by James Heinrich info@.nosp@m.geti.nosp@m.d3.or.nosp@m.g //. More...

+ Collaboration diagram for GetId3\Module\AudioVideo\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

Constructor & Destructor Documentation

◆ __construct()

GetId3\Module\AudioVideo\AMFStream::__construct ( $bytes)
Parameters
type$bytes

Definition at line 38 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$bytes.

39  {
40  $this->bytes = & $bytes;
41  $this->pos = 0;
42  }

Member Function Documentation

◆ peekByte()

GetId3\Module\AudioVideo\AMFStream::peekByte ( )
Returns
type

Definition at line 120 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readByte().

121  {
122  $pos = $this->pos;
123  $val = $this->readByte();
124  $this->pos = $pos;
125 
126  return $val;
127  }
+ Here is the call graph for this function:

◆ peekDouble()

GetId3\Module\AudioVideo\AMFStream::peekDouble ( )
Returns
type

Definition at line 159 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readDouble().

160  {
161  $pos = $this->pos;
162  $val = $this->readDouble();
163  $this->pos = $pos;
164 
165  return $val;
166  }
+ Here is the call graph for this function:

◆ peekInt()

GetId3\Module\AudioVideo\AMFStream::peekInt ( )
Returns
type

Definition at line 133 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readInt().

134  {
135  $pos = $this->pos;
136  $val = $this->readInt();
137  $this->pos = $pos;
138 
139  return $val;
140  }
+ Here is the call graph for this function:

◆ peekLong()

GetId3\Module\AudioVideo\AMFStream::peekLong ( )
Returns
type

Definition at line 146 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readLong().

147  {
148  $pos = $this->pos;
149  $val = $this->readLong();
150  $this->pos = $pos;
151 
152  return $val;
153  }
+ Here is the call graph for this function:

◆ peekLongUTF()

GetId3\Module\AudioVideo\AMFStream::peekLongUTF ( )
Returns
type

Definition at line 185 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readLongUTF().

186  {
187  $pos = $this->pos;
188  $val = $this->readLongUTF();
189  $this->pos = $pos;
190 
191  return $val;
192  }
+ Here is the call graph for this function:

◆ peekUTF()

GetId3\Module\AudioVideo\AMFStream::peekUTF ( )
Returns
type

Definition at line 172 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\$pos, and GetId3\Module\AudioVideo\AMFStream\readUTF().

173  {
174  $pos = $this->pos;
175  $val = $this->readUTF();
176  $this->pos = $pos;
177 
178  return $val;
179  }
+ Here is the call graph for this function:

◆ read()

GetId3\Module\AudioVideo\AMFStream::read (   $length)
Parameters
type$length
Returns
type

Definition at line 108 of file AMFStream.php.

Referenced by GetId3\Module\AudioVideo\AMFStream\readDouble(), GetId3\Module\AudioVideo\AMFStream\readLongUTF(), and GetId3\Module\AudioVideo\AMFStream\readUTF().

109  {
110  $val = substr($this->bytes, $this->pos, $length);
111  $this->pos += $length;
112 
113  return $val;
114  }
+ Here is the caller graph for this function:

◆ readByte()

GetId3\Module\AudioVideo\AMFStream::readByte ( )
Returns
type

Definition at line 48 of file AMFStream.php.

References GetId3\Lib\Helper\BigEndian2Int().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekByte(), GetId3\Module\AudioVideo\AMFStream\readInt(), and GetId3\Module\AudioVideo\AMFStream\readLong().

49  {
50  return Helper::BigEndian2Int(substr($this->bytes,
51  $this->pos++, 1));
52  }
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
Definition: Helper.php:374
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readDouble()

GetId3\Module\AudioVideo\AMFStream::readDouble ( )
Returns
type

Definition at line 76 of file AMFStream.php.

References GetId3\Lib\Helper\BigEndian2Float(), and GetId3\Module\AudioVideo\AMFStream\read().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekDouble().

77  {
78  return Helper::BigEndian2Float($this->read(8));
79  }
static BigEndian2Float($byteword)
ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic.
Definition: Helper.php:290
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readInt()

GetId3\Module\AudioVideo\AMFStream::readInt ( )
Returns
type

Definition at line 58 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\readByte().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekInt(), and GetId3\Module\AudioVideo\AMFStream\readUTF().

59  {
60  return ($this->readByte() << 8) + $this->readByte();
61  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readLong()

GetId3\Module\AudioVideo\AMFStream::readLong ( )
Returns
type

Definition at line 67 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\readByte().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekLong(), and GetId3\Module\AudioVideo\AMFStream\readLongUTF().

68  {
69  return ($this->readByte() << 24) + ($this->readByte() << 16) + ($this->readByte() << 8) + $this->readByte();
70  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readLongUTF()

GetId3\Module\AudioVideo\AMFStream::readLongUTF ( )
Returns
type

Definition at line 96 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\read(), and GetId3\Module\AudioVideo\AMFStream\readLong().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekLongUTF().

97  {
98  $length = $this->readLong();
99 
100  return $this->read($length);
101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readUTF()

GetId3\Module\AudioVideo\AMFStream::readUTF ( )
Returns
type

Definition at line 85 of file AMFStream.php.

References GetId3\Module\AudioVideo\AMFStream\read(), and GetId3\Module\AudioVideo\AMFStream\readInt().

Referenced by GetId3\Module\AudioVideo\AMFStream\peekUTF().

86  {
87  $length = $this->readInt();
88 
89  return $this->read($length);
90  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $bytes

GetId3\Module\AudioVideo\AMFStream::$bytes

Definition at line 31 of file AMFStream.php.

Referenced by GetId3\Module\AudioVideo\AMFStream\__construct().

◆ $pos


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