ParseBITMAPINFOHEADER example

                                                case 'YUY2': // Uncompressed YUV 4:2:2                                                     $thisfile_video['lossless'] = true;
                                                    break;

                                                default:
                                                    $thisfile_video['lossless'] = false;
                                                    break;
                                            }

                                            switch ($strhfccType) {
                                                case 'vids':
                                                    $thisfile_riff_raw_strf_strhfccType_streamindex = self::ParseBITMAPINFOHEADER(substr($strfData, 0, 40)($this->container == 'riff'));
                                                    $thisfile_video['bits_per_sample'] = $thisfile_riff_raw_strf_strhfccType_streamindex['biBitCount'];

                                                    if ($thisfile_riff_video_current['codec'] == 'DV') {
                                                        $thisfile_riff_video_current['dv_type'] = 2;
                                                    }
                                                    break;

                                                case 'iavs':
                                                    $thisfile_riff_video_current['dv_type'] = 1;
                                                    break;
                                            }
                                            
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;*/
Home | Imprint | This part of the site doesn't use cookies.