WordPress at a glance
function is not described

getid3_ogg::ParseOpusPageHeader() public WP 1.0

{} It's a method of the class: getid3_ogg{}

No Hooks.

Return

true|false. Nothing.

Usage

$getid3_ogg = new getid3_ogg();
$getid3_ogg->ParseOpusPageHeader( $filedata, $filedataoffset, $oggpageinfo );
$filedata(string) (required) (passed by reference — &)
-
$filedataoffset(int) (required) (passed by reference — &)
-
$oggpageinfo(array) (required) (passed by reference — &)
-

Code of getid3_ogg::ParseOpusPageHeader() WP 5.7.2

<?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;
}