home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
temacd
/
imtoodownyoutube
/
download-youtube-video.exe
/
script
/
fileinfos.js
< prev
next >
Wrap
Text File
|
2007-07-25
|
2KB
|
64 lines
function GetFileInfo(filename)
{
helper.Helper_InitFileInfo(filename);
fileinfos.filename.SetText(getfilename(filename));
fileinfos.filelocation.SetText(getlocation(filename));
fileinfos.filelocation.SetLink(getlocation(filename));
var duration=helper.Helper_GetDuration();
fileinfos.fileduration.SetText(duration);
var filesize=helper.Helper_GetFileSize();
fileinfos.filesize.SetText(parseInt(filesize/1024)+"KB");
var videowidth=helper.Helper_GetVideoWidth();
var videoheight=helper.Helper_GetVidoeHeight();
if(videowidth==0&&videoheight==0)
fileinfos.Dimensionvalue.SetText("N/A");
else
fileinfos.Dimensionvalue.SetText(videowidth+"*"+videoheight);
var videoframe=helper.Helper_GetVideoFrame();
fileinfos.FramerateValue.SetText(videoframe);
var audiochannel=helper.Helper_GetAudioChannels();
fileinfos.ChannelsValue.SetText(audiochannel);
var audiofreq=helper.Helper_GetAudioFrequency();
fileinfos.FidelityValue.SetText(audiofreq+"Hz");
var audiorate=helper.Helper_GetAudioRate();
fileinfos.BitrateValue.SetText(audiorate);
var videorate=helper.Helper_GetVideoRate();
fileinfos.videorate.SetText(videorate);
var videocodec=helper.Helper_GetVideoCodec();
if(videocodec=="")
fileinfos.videocodecvalue.SetText("N/A");
else
fileinfos.videocodecvalue.SetText(videocodec);
var audiocodec=helper.Helper_GetAudioCodec();
fileinfos.AudioCodecValue.SetText(audiocodec);
}
function getfilename(filename)
{
var start=filename.lastIndexOf("\\");
var file1=filename.substr(start+1,filename.length-start);
return file1;
}
function getlocation(filename)
{
var end=filename.lastIndexOf("\\");
var filepath=filename.substr(0,end+1);
return filepath;
}
function fileinfos_destroy()
{
//helper.Helper_UnInit();
fileinfos.Close();
}