$track_info['display_y'
] =
(isset($trackarray['DisplayHeight'
]) ?
$trackarray['DisplayHeight'
] :
$trackarray['PixelHeight'
]);
if (isset($trackarray['PixelCropBottom'
])) { $track_info['crop_bottom'
] =
$trackarray['PixelCropBottom'
];
} if (isset($trackarray['PixelCropTop'
])) { $track_info['crop_top'
] =
$trackarray['PixelCropTop'
];
} if (isset($trackarray['PixelCropLeft'
])) { $track_info['crop_left'
] =
$trackarray['PixelCropLeft'
];
} if (isset($trackarray['PixelCropRight'
])) { $track_info['crop_right'
] =
$trackarray['PixelCropRight'
];
} if (isset($trackarray['DefaultDuration'
])) { $track_info['frame_rate'
] =
round(1000000000 /
$trackarray['DefaultDuration'
], 3
);
} if (isset($trackarray['CodecName'
])) { $track_info['codec'
] =
$trackarray['CodecName'
];
} switch ($trackarray['CodecID'
]) { case 'V_MS/VFW/FOURCC':
getid3_lib::
IncludeDependency(GETID3_INCLUDEPATH.'module.audio-video.riff.php', __FILE__, true
);
$parsed = getid3_riff::
ParseBITMAPINFOHEADER($trackarray['CodecPrivate'
]);
$track_info['codec'
] = getid3_riff::
fourccLookup($parsed['fourcc'
]);
$info['matroska'
]['track_codec_parsed'
][$trackarray['TrackNumber'
]] =
$parsed;
break;
/*case 'V_MPEG4/ISO/AVC':
$h264['profile'] = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 1, 1));
$h264['level'] = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 3, 1));
$rn = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 4, 1));
$h264['NALUlength'] = ($rn & 3) + 1;
$rn = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], 5, 1));
$nsps = ($rn & 31);
$offset = 6;
for ($i = 0; $i < $nsps; $i ++) {
$length = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 2));
$h264['SPS'][] = substr($trackarray['CodecPrivate'], $offset + 2, $length);
$offset += 2 + $length;
}
$npps = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 1));
$offset += 1;
for ($i = 0; $i < $npps; $i ++) {
$length = getid3_lib::BigEndian2Int(substr($trackarray['CodecPrivate'], $offset, 2));
$h264['PPS'][] = substr($trackarray['CodecPrivate'], $offset + 2, $length);
$offset += 2 + $length;
}
$info['matroska']['track_codec_parsed'][$trackarray['TrackNumber']] = $h264;
break;*/