WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

getid3_ogg::ParseOpusPageHeader() public WP 1.0

Это метод класса: getid3_ogg{}

Хуков нет.

Возвращает

true/false.

Использование

$getid3_ogg = new getid3_ogg();
$getid3_ogg->ParseOpusPageHeader( $filedata, $filedataoffset, $oggpageinfo );
$filedata(строка) (обязательный) (передается по ссылке — &)
$filedataoffset(число) (обязательный) (передается по ссылке — &)
$oggpageinfo(массив) (обязательный) (передается по ссылке — &)

Код getid3_ogg::ParseOpusPageHeader() WP 5.5.1

wp-includes/ID3/module.audio.ogg.php
<?php
public function ParseOpusPageHeader(&$filedata, &$filedataoffset, &$oggpageinfo) {
	$info = &$this->getid3->info;
	$info['audio']['dataformat']   = 'opus';
	$info['mime_type']             = 'audio/ogg; codecs=opus';

	/** @todo find a usable way to detect abr (vbr that is padded to be abr) */
	$info['audio']['bitrate_mode'] = 'vbr';

	$info['audio']['lossless']     = false;

	$info['ogg']['pageheader']['opus']['opus_magic'] = substr($filedata, $filedataoffset, 8); // hard-coded to 'OpusHead'
	$filedataoffset += 8;
	$info['ogg']['pageheader']['opus']['version']    = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
	$filedataoffset += 1;

	if ($info['ogg']['pageheader']['opus']['version'] < 1 || $info['ogg']['pageheader']['opus']['version'] > 15) {
		$this->error('Unknown opus version number (only accepting 1-15)');
		return false;
	}

	$info['ogg']['pageheader']['opus']['out_channel_count'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
	$filedataoffset += 1;

	if ($info['ogg']['pageheader']['opus']['out_channel_count'] == 0) {
		$this->error('Invalid channel count in opus header (must not be zero)');
		return false;
	}

	$info['ogg']['pageheader']['opus']['pre_skip'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
	$filedataoffset += 2;

	$info['ogg']['pageheader']['opus']['input_sample_rate'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  4));
	$filedataoffset += 4;

	//$info['ogg']['pageheader']['opus']['output_gain'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  2));
	//$filedataoffset += 2;

	//$info['ogg']['pageheader']['opus']['channel_mapping_family'] = getid3_lib::LittleEndian2Int(substr($filedata, $filedataoffset,  1));
	//$filedataoffset += 1;

	$info['opus']['opus_version']       = $info['ogg']['pageheader']['opus']['version'];
	$info['opus']['sample_rate_input']  = $info['ogg']['pageheader']['opus']['input_sample_rate'];
	$info['opus']['out_channel_count']  = $info['ogg']['pageheader']['opus']['out_channel_count'];

	$info['audio']['channels']          = $info['opus']['out_channel_count'];
	$info['audio']['sample_rate_input'] = $info['opus']['sample_rate_input'];
	$info['audio']['sample_rate']       = 48000; // "All Opus audio is coded at 48 kHz, and should also be decoded at 48 kHz for playback (unless the target hardware does not support this sampling rate). However, this field may be used to resample the audio back to the original sampling rate, for example, when saving the output to a file." -- https://mf4.xiph.org/jenkins/view/opus/job/opusfile-unix/ws/doc/html/structOpusHead.html
	return true;
}