Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/wp-inclu.../ID3
File: module.audio-video.quicktime.php
public function Pascal2String($pascalstring) {
[3000] Fix | Delete
// Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string
[3001] Fix | Delete
return substr($pascalstring, 1);
[3002] Fix | Delete
}
[3003] Fix | Delete
[3004] Fix | Delete
/**
[3005] Fix | Delete
* @param string $pascalstring
[3006] Fix | Delete
*
[3007] Fix | Delete
* @return string
[3008] Fix | Delete
*/
[3009] Fix | Delete
public function MaybePascal2String($pascalstring) {
[3010] Fix | Delete
// Pascal strings have 1 unsigned byte at the beginning saying how many chars (1-255) are in the string
[3011] Fix | Delete
// Check if string actually is in this format or written incorrectly, straight string, or null-terminated string
[3012] Fix | Delete
if (ord(substr($pascalstring, 0, 1)) == (strlen($pascalstring) - 1)) {
[3013] Fix | Delete
return substr($pascalstring, 1);
[3014] Fix | Delete
} elseif (substr($pascalstring, -1, 1) == "\x00") {
[3015] Fix | Delete
// appears to be null-terminated instead of Pascal-style
[3016] Fix | Delete
return substr($pascalstring, 0, -1);
[3017] Fix | Delete
}
[3018] Fix | Delete
return $pascalstring;
[3019] Fix | Delete
}
[3020] Fix | Delete
[3021] Fix | Delete
[3022] Fix | Delete
/**
[3023] Fix | Delete
* Helper functions for m4b audiobook chapters
[3024] Fix | Delete
* code by Steffen Hartmann 2015-Nov-08.
[3025] Fix | Delete
*
[3026] Fix | Delete
* @param array $info
[3027] Fix | Delete
* @param string $tag
[3028] Fix | Delete
* @param string $history
[3029] Fix | Delete
* @param array $result
[3030] Fix | Delete
*/
[3031] Fix | Delete
public function search_tag_by_key($info, $tag, $history, &$result) {
[3032] Fix | Delete
foreach ($info as $key => $value) {
[3033] Fix | Delete
$key_history = $history.'/'.$key;
[3034] Fix | Delete
if ($key === $tag) {
[3035] Fix | Delete
$result[] = array($key_history, $info);
[3036] Fix | Delete
} else {
[3037] Fix | Delete
if (is_array($value)) {
[3038] Fix | Delete
$this->search_tag_by_key($value, $tag, $key_history, $result);
[3039] Fix | Delete
}
[3040] Fix | Delete
}
[3041] Fix | Delete
}
[3042] Fix | Delete
}
[3043] Fix | Delete
[3044] Fix | Delete
/**
[3045] Fix | Delete
* @param array $info
[3046] Fix | Delete
* @param string $k
[3047] Fix | Delete
* @param string $v
[3048] Fix | Delete
* @param string $history
[3049] Fix | Delete
* @param array $result
[3050] Fix | Delete
*/
[3051] Fix | Delete
public function search_tag_by_pair($info, $k, $v, $history, &$result) {
[3052] Fix | Delete
foreach ($info as $key => $value) {
[3053] Fix | Delete
$key_history = $history.'/'.$key;
[3054] Fix | Delete
if (($key === $k) && ($value === $v)) {
[3055] Fix | Delete
$result[] = array($key_history, $info);
[3056] Fix | Delete
} else {
[3057] Fix | Delete
if (is_array($value)) {
[3058] Fix | Delete
$this->search_tag_by_pair($value, $k, $v, $key_history, $result);
[3059] Fix | Delete
}
[3060] Fix | Delete
}
[3061] Fix | Delete
}
[3062] Fix | Delete
}
[3063] Fix | Delete
[3064] Fix | Delete
/**
[3065] Fix | Delete
* @param array $info
[3066] Fix | Delete
*
[3067] Fix | Delete
* @return array
[3068] Fix | Delete
*/
[3069] Fix | Delete
public function quicktime_time_to_sample_table($info) {
[3070] Fix | Delete
$res = array();
[3071] Fix | Delete
$this->search_tag_by_pair($info['quicktime']['moov'], 'name', 'stbl', 'quicktime/moov', $res);
[3072] Fix | Delete
foreach ($res as $value) {
[3073] Fix | Delete
$stbl_res = array();
[3074] Fix | Delete
$this->search_tag_by_pair($value[1], 'data_format', 'text', $value[0], $stbl_res);
[3075] Fix | Delete
if (count($stbl_res) > 0) {
[3076] Fix | Delete
$stts_res = array();
[3077] Fix | Delete
$this->search_tag_by_key($value[1], 'time_to_sample_table', $value[0], $stts_res);
[3078] Fix | Delete
if (count($stts_res) > 0) {
[3079] Fix | Delete
return $stts_res[0][1]['time_to_sample_table'];
[3080] Fix | Delete
}
[3081] Fix | Delete
}
[3082] Fix | Delete
}
[3083] Fix | Delete
return array();
[3084] Fix | Delete
}
[3085] Fix | Delete
[3086] Fix | Delete
[3087] Fix | Delete
/**
[3088] Fix | Delete
* @param array $info
[3089] Fix | Delete
*
[3090] Fix | Delete
* @return int
[3091] Fix | Delete
*/
[3092] Fix | Delete
public function quicktime_bookmark_time_scale($info) {
[3093] Fix | Delete
$time_scale = '';
[3094] Fix | Delete
$ts_prefix_len = 0;
[3095] Fix | Delete
$res = array();
[3096] Fix | Delete
$this->search_tag_by_pair($info['quicktime']['moov'], 'name', 'stbl', 'quicktime/moov', $res);
[3097] Fix | Delete
foreach ($res as $value) {
[3098] Fix | Delete
$stbl_res = array();
[3099] Fix | Delete
$this->search_tag_by_pair($value[1], 'data_format', 'text', $value[0], $stbl_res);
[3100] Fix | Delete
if (count($stbl_res) > 0) {
[3101] Fix | Delete
$ts_res = array();
[3102] Fix | Delete
$this->search_tag_by_key($info['quicktime']['moov'], 'time_scale', 'quicktime/moov', $ts_res);
[3103] Fix | Delete
foreach ($ts_res as $sub_value) {
[3104] Fix | Delete
$prefix = substr($sub_value[0], 0, -12);
[3105] Fix | Delete
if ((substr($stbl_res[0][0], 0, strlen($prefix)) === $prefix) && ($ts_prefix_len < strlen($prefix))) {
[3106] Fix | Delete
$time_scale = $sub_value[1]['time_scale'];
[3107] Fix | Delete
$ts_prefix_len = strlen($prefix);
[3108] Fix | Delete
}
[3109] Fix | Delete
}
[3110] Fix | Delete
}
[3111] Fix | Delete
}
[3112] Fix | Delete
return $time_scale;
[3113] Fix | Delete
}
[3114] Fix | Delete
/*
[3115] Fix | Delete
// END helper functions for m4b audiobook chapters
[3116] Fix | Delete
*/
[3117] Fix | Delete
[3118] Fix | Delete
[3119] Fix | Delete
}
[3120] Fix | Delete
[3121] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function