ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
AMFStream.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
GetId3\Module\AudioVideo
;
4
5
use
GetId3\Lib\Helper
;
6
9
// available at http://getid3.sourceforge.net //
10
// or http://www.getid3.org //
11
// //
12
// AMFStream //
13
// by Seth Kaufman <seth@whirl-i-gig.com> //
14
// //
16
// //
17
// dependencies: None //
18
// ///
20
29
class
AMFStream
30
{
31
public
$bytes
;
32
public
$pos
;
33
38
public
function
__construct
(&
$bytes
)
39
{
40
$this->bytes = &
$bytes
;
41
$this->pos = 0;
42
}
43
48
public
function
readByte
()
49
{
50
return
Helper::BigEndian2Int
(substr($this->bytes,
51
$this->pos++, 1));
52
}
53
58
public
function
readInt
()
59
{
60
return
($this->
readByte
() << 8) + $this->
readByte
();
61
}
62
67
public
function
readLong
()
68
{
69
return
($this->
readByte
() << 24) + ($this->
readByte
() << 16) + ($this->
readByte
() << 8) + $this->
readByte
();
70
}
71
76
public
function
readDouble
()
77
{
78
return
Helper::BigEndian2Float
($this->
read
(8));
79
}
80
85
public
function
readUTF
()
86
{
87
$length = $this->
readInt
();
88
89
return
$this->
read
($length);
90
}
91
96
public
function
readLongUTF
()
97
{
98
$length = $this->
readLong
();
99
100
return
$this->
read
($length);
101
}
102
108
public
function
read
($length)
109
{
110
$val = substr($this->bytes, $this->pos, $length);
111
$this->pos += $length;
112
113
return
$val;
114
}
115
120
public
function
peekByte
()
121
{
122
$pos
=
$this->pos
;
123
$val = $this->
readByte
();
124
$this->pos =
$pos
;
125
126
return
$val;
127
}
128
133
public
function
peekInt
()
134
{
135
$pos
=
$this->pos
;
136
$val = $this->
readInt
();
137
$this->pos =
$pos
;
138
139
return
$val;
140
}
141
146
public
function
peekLong
()
147
{
148
$pos
=
$this->pos
;
149
$val = $this->
readLong
();
150
$this->pos =
$pos
;
151
152
return
$val;
153
}
154
159
public
function
peekDouble
()
160
{
161
$pos
=
$this->pos
;
162
$val = $this->
readDouble
();
163
$this->pos =
$pos
;
164
165
return
$val;
166
}
167
172
public
function
peekUTF
()
173
{
174
$pos
=
$this->pos
;
175
$val = $this->
readUTF
();
176
$this->pos =
$pos
;
177
178
return
$val;
179
}
180
185
public
function
peekLongUTF
()
186
{
187
$pos
=
$this->pos
;
188
$val = $this->
readLongUTF
();
189
$this->pos =
$pos
;
190
191
return
$val;
192
}
193
}
GetId3\Module\AudioVideo\AMFStream\read
read($length)
Definition:
AMFStream.php:108
GetId3\Module\AudioVideo\AMFStream\peekInt
peekInt()
Definition:
AMFStream.php:133
GetId3\Module\AudioVideo\AMFStream\$bytes
$bytes
Definition:
AMFStream.php:31
GetId3\Module\AudioVideo
Definition:
AMFReader.php:3
GetId3\Module\AudioVideo\AMFStream\__construct
__construct(&$bytes)
Definition:
AMFStream.php:38
GetId3\Module\AudioVideo\AMFStream\peekLong
peekLong()
Definition:
AMFStream.php:146
GetId3\Module\AudioVideo\AMFStream\readLong
readLong()
Definition:
AMFStream.php:67
GetId3\Lib\Helper\BigEndian2Float
static BigEndian2Float($byteword)
ANSI/IEEE Standard 754-1985, Standard for Binary Floating Point Arithmetic.
Definition:
Helper.php:290
GetId3\Module\AudioVideo\AMFStream\peekUTF
peekUTF()
Definition:
AMFStream.php:172
GetId3\Module\AudioVideo\AMFStream\readInt
readInt()
Definition:
AMFStream.php:58
GetId3\Module\AudioVideo\AMFStream\readByte
readByte()
Definition:
AMFStream.php:48
GetId3\Module\AudioVideo\AMFStream\peekByte
peekByte()
Definition:
AMFStream.php:120
GetId3\Module\AudioVideo\AMFStream\$pos
$pos
Definition:
AMFStream.php:32
GetId3\Module\AudioVideo\AMFStream\peekDouble
peekDouble()
Definition:
AMFStream.php:159
GetId3\Module\AudioVideo\AMFStream\readDouble
readDouble()
Definition:
AMFStream.php:76
GetId3\Lib\Helper\BigEndian2Int
static BigEndian2Int($byteword, $synchsafe=false, $signed=false)
Definition:
Helper.php:374
GetId3\Module\AudioVideo\AMFStream\readLongUTF
readLongUTF()
Definition:
AMFStream.php:96
Helper
php
GetId3\Module\AudioVideo\AMFStream\readUTF
readUTF()
Definition:
AMFStream.php:85
GetId3\Module\AudioVideo\AMFStream
GetId3() by James Heinrich info@getid3.org //.
Definition:
AMFStream.php:29
GetId3\Module\AudioVideo\AMFStream\peekLongUTF
peekLongUTF()
Definition:
AMFStream.php:185
libs
composer
vendor
phansys
getid3
GetId3
Module
AudioVideo
AMFStream.php
Generated on Fri Jan 17 2025 19:00:52 for ILIAS by
1.8.13 (using
Doxyfile
)