wppaste
WordPress

AVCSequenceParameterSetReader

Source
wp-includes/ID3/module.audio-video.flv.php:757

Compatibility

WordPress
core
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Properties · 6

$spsstringpublic
$startpublic
$currentBytespublic
$currentBitspublic
$widthintpublic
$heightintpublic

Methods · 9

Source code

class AVCSequenceParameterSetReader{	/**	 * @var string	 */	public $sps;	public $start = 0;	public $currentBytes = 0;	public $currentBits = 0; 	/**	 * @var int	 */	public $width; 	/**	 * @var int	 */	public $height; 	/**	 * @param string $sps	 */	public function __construct($sps) {		$this->sps = $sps;	} 	public function readData() {		$this->skipBits(8);		$this->skipBits(8);		$profile = $this->getBits(8);                               // read profile		if ($profile > 0) {			$this->skipBits(8);			$level_idc = $this->getBits(8);                         // level_idc			$this->expGolombUe();                                   // seq_parameter_set_id // sps			$this->expGolombUe();                                   // log2_max_frame_num_minus4			$picOrderType = $this->expGolombUe();                   // pic_order_cnt_type			if ($picOrderType == 0) {				$this->expGolombUe();                               // log2_max_pic_order_cnt_lsb_minus4			} elseif ($picOrderType == 1) {				$this->skipBits(1);                                 // delta_pic_order_always_zero_flag				$this->expGolombSe();                               // offset_for_non_ref_pic				$this->expGolombSe();                               // offset_for_top_to_bottom_field				$num_ref_frames_in_pic_order_cnt_cycle = $this->expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle				for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {					$this->expGolombSe();                           // offset_for_ref_frame[ i ]				}			}			$this->expGolombUe();                                   // num_ref_frames			$this->skipBits(1);                                     // gaps_in_frame_num_value_allowed_flag			$pic_width_in_mbs_minus1 = $this->expGolombUe();        // pic_width_in_mbs_minus1			$pic_height_in_map_units_minus1 = $this->expGolombUe(); // pic_height_in_map_units_minus1 			$frame_mbs_only_flag = $this->getBits(1);               // frame_mbs_only_flag			if ($frame_mbs_only_flag == 0) {				$this->skipBits(1);                                 // mb_adaptive_frame_field_flag			}			$this->skipBits(1);                                     // direct_8x8_inference_flag			$frame_cropping_flag = $this->getBits(1);               // frame_cropping_flag 			$frame_crop_left_offset   = 0;			$frame_crop_right_offset  = 0;			$frame_crop_top_offset    = 0;			$frame_crop_bottom_offset = 0; 			if ($frame_cropping_flag) {				$frame_crop_left_offset   = $this->expGolombUe();   // frame_crop_left_offset				$frame_crop_right_offset  = $this->expGolombUe();   // frame_crop_right_offset				$frame_crop_top_offset    = $this->expGolombUe();   // frame_crop_top_offset				$frame_crop_bottom_offset = $this->expGolombUe();   // frame_crop_bottom_offset			}			$this->skipBits(1);                                     // vui_parameters_present_flag			// etc 			$this->width  = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);			$this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);		}	} 	/**

Changelog

Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.1.0 tag, from src/wp-includes/ID3/module.audio-video.flv.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.