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

getID3::ChannelsBitratePlaytimeCalculations() public WP 1.0

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

Хуков нет.

Возвращает

Null. Ничего.

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

$getID3 = new getID3();
$getID3->ChannelsBitratePlaytimeCalculations();

Код getID3::ChannelsBitratePlaytimeCalculations() WP 5.5.1

wp-includes/ID3/getid3.php
<?php
public function ChannelsBitratePlaytimeCalculations() {

	// set channelmode on audio
	if (!empty($this->info['audio']['channelmode']) || !isset($this->info['audio']['channels'])) {
		// ignore
	} elseif ($this->info['audio']['channels'] == 1) {
		$this->info['audio']['channelmode'] = 'mono';
	} elseif ($this->info['audio']['channels'] == 2) {
		$this->info['audio']['channelmode'] = 'stereo';
	}

	// Calculate combined bitrate - audio + video
	$CombinedBitrate  = 0;
	$CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);
	$CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);
	if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) {
		$this->info['bitrate'] = $CombinedBitrate;
	}
	//if ((isset($this->info['video']) && !isset($this->info['video']['bitrate'])) || (isset($this->info['audio']) && !isset($this->info['audio']['bitrate']))) {
	//	// for example, VBR MPEG video files cannot determine video bitrate:
	//	// should not set overall bitrate and playtime from audio bitrate only
	//	unset($this->info['bitrate']);
	//}

	// video bitrate undetermined, but calculable
	if (isset($this->info['video']['dataformat']) && $this->info['video']['dataformat'] && (!isset($this->info['video']['bitrate']) || ($this->info['video']['bitrate'] == 0))) {
		// if video bitrate not set
		if (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] > 0) && ($this->info['audio']['bitrate'] == $this->info['bitrate'])) {
			// AND if audio bitrate is set to same as overall bitrate
			if (isset($this->info['playtime_seconds']) && ($this->info['playtime_seconds'] > 0)) {
				// AND if playtime is set
				if (isset($this->info['avdataend']) && isset($this->info['avdataoffset'])) {
					// AND if AV data offset start/end is known
					// THEN we can calculate the video bitrate
					$this->info['bitrate'] = round((($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds']);
					$this->info['video']['bitrate'] = $this->info['bitrate'] - $this->info['audio']['bitrate'];
				}
			}
		}
	}

	if ((!isset($this->info['playtime_seconds']) || ($this->info['playtime_seconds'] <= 0)) && !empty($this->info['bitrate'])) {
		$this->info['playtime_seconds'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['bitrate'];
	}

	if (!isset($this->info['bitrate']) && !empty($this->info['playtime_seconds'])) {
		$this->info['bitrate'] = (($this->info['avdataend'] - $this->info['avdataoffset']) * 8) / $this->info['playtime_seconds'];
	}
	if (isset($this->info['bitrate']) && empty($this->info['audio']['bitrate']) && empty($this->info['video']['bitrate'])) {
		if (isset($this->info['audio']['dataformat']) && empty($this->info['video']['resolution_x'])) {
			// audio only
			$this->info['audio']['bitrate'] = $this->info['bitrate'];
		} elseif (isset($this->info['video']['resolution_x']) && empty($this->info['audio']['dataformat'])) {
			// video only
			$this->info['video']['bitrate'] = $this->info['bitrate'];
		}
	}

	// Set playtime string
	if (!empty($this->info['playtime_seconds']) && empty($this->info['playtime_string'])) {
		$this->info['playtime_string'] = getid3_lib::PlaytimeString($this->info['playtime_seconds']);
	}
}