getid3_matroska::getEBMLelement() –

You appear to be a bot. Output may be restricted

Description

Usage

$bool = getid3_matroska::getEBMLelement( $element, $parent_end, $get_data );

Parameters

$element
( array ) required
$parent_end
( int ) required
$get_data
( array|bool ) optional

Returns

bool

Source

File name: wordpress/wp-includes/ID3/module.audio-video.matroska.php
Lines:

1 to 35 of 35
  private function getEBMLelement(&$element, $parent_end, $get_data=false) {
    if ($this->current_offset >= $parent_end) {
      return false;
    }

    if (!$this->getid3_matroska::EnsureBufferHasEnoughData()) {
      $this->current_offset = PHP_INT_MAX; // do not exit parser right now, allow to finish current loop to gather maximum information
      return false;
    }

    $element = array();

    // set offset
    $element['offset'] = $this->current_offset;

    // get ID
    $element['id'] = $this->getid3_matroska::readEBMLint();

    // get name
    $element['id_name'] = self::EBMLidName($element['id']);

    // get length
    $element['length'] = $this->getid3_matroska::readEBMLint();

    // get end offset
    $element['end'] = $this->current_offset + $element['length'];

    // get raw data
    $dont_parse = (in_array($element['id'], $this->unuseful_elements) || $element['id_name'] == dechex($element['id']));
    if (($get_data === true || (is_array($get_data) && !in_array($element['id'], $get_data))) && !$dont_parse) {
      $element['data'] = $this->getid3_matroska::readEBMLelementData($element['length'], $element);
    }

    return true;
  }
 

 View on GitHub View on Trac