|
MediaPlayer에서 동영상의 시간길이를 구하려 하는데...
아래처럼..help 에 있는 내용을 해보니.... 전혀 이해할수 있는 값들이 리턴됩니다..
실제로 약 3분 40초 짜리 동영상인데....
label1에선 240, label2에는 3 , label3에는 89 ....
이것이 코덱 따리 틀릴수 있는건가요?
MediaPlayer1->FileName="d:\\test\\kim3.wmv";
MediaPlayer1->Open();
MediaPlayer1->Play();
int TheLength;
// Set time format - note that some devices don뭪 support tfHMS
MediaPlayer1->TimeFormat = tfHMS;
// Store length of currently loaded media
TheLength = MediaPlayer1->Length;
//Label1->Caption = IntToStr ( TheLength );
// display hours in label 1
Label1->Caption = IntToStr(LOBYTE(LOWORD(TheLength)));
// display minutes in label 2
Label2->Caption = IntToStr(HIBYTE(LOWORD(TheLength)));
// display the seconds in label 3
Label3->Caption = IntToStr(LOBYTE(HIWORD(TheLength)));
|