LanguageLookup example

$frame_terminatorpos++; // strpos() fooled because 2nd byte of Unicode chars are often 0x00                 }
                $parsedFrame['description'] = substr($parsedFrame['data']$frame_offset$frame_terminatorpos - $frame_offset);
                $parsedFrame['description'] = $this->MakeUTF16emptyStringEmpty($parsedFrame['description']);
                $parsedFrame['data'] = substr($parsedFrame['data']$frame_terminatorpos + strlen($frame_textencoding_terminator));
                $parsedFrame['data'] = $this->RemoveStringTerminator($parsedFrame['data']$frame_textencoding_terminator);

                $parsedFrame['encodingid']   = $frame_textencoding;
                $parsedFrame['encoding']     = $this->TextEncodingNameLookup($frame_textencoding);

                $parsedFrame['language']     = $frame_language;
                $parsedFrame['languagename'] = $this->LanguageLookup($frame_language, false);
                if (!empty($parsedFrame['framenameshort']) && !empty($parsedFrame['data'])) {
                    $info['id3v2']['comments'][$parsedFrame['framenameshort']][] = getid3_lib::iconv_fallback($parsedFrame['encoding']$info['id3v2']['encoding']$parsedFrame['data']);
                }
            } else {
                $this->warning('Invalid data in frame "'.$parsedFrame['frame_name'].'" at offset '.$parsedFrame['dataoffset']);
            }
            unset($parsedFrame['data']);


        } elseif ((($id3v2_majorversion >= 3) && ($parsedFrame['frame_name'] == 'SYLT')) || // 4.9 SYLT Synchronised lyric/text                 (($id3v2_majorversion == 2) && ($parsedFrame['frame_name'] == 'SLT'))) {     // 4.10 SLT Synchronised lyric/text

            $iso_language_id  = '';
            $iso_language_id .= chr((($languageid & 0x7C00) >> 10) + 0x60);
            $iso_language_id .= chr((($languageid & 0x03E0) >>  5) + 0x60);
            $iso_language_id .= chr((($languageid & 0x001F) >>  0) + 0x60);
            $QuicktimeLanguageLookup[$languageid] = getid3_id3v2::LanguageLookup($iso_language_id);
        }
        return (isset($QuicktimeLanguageLookup[$languageid]) ? $QuicktimeLanguageLookup[$languageid] : 'invalid');
    }

    /** * @param string $codecid * * @return string */
    public function QuicktimeVideoCodecLookup($codecid) {
        static $QuicktimeVideoCodecLookup = array();
        
Home | Imprint | This part of the site doesn't use cookies.