22. maj 2001 - 10:13Der er
3 kommentarer og 1 løsning
Mediaplayer -afspilningstid -fullscreen
Jeg vil gerne vide, hvordan man koder afspilning af tid ind i en mediplayer? Den skal kunne følge tiden på en videofil. Hvad er programkoden til fullscreen-visning?
TimeFormat determines how the StartPos, Length, Position, Start, and EndPos properties are interpreted. For example, if Position is 180 and TimeFormat is tfMilliseconds, the current position is 180 milliseconds into the medium. If Position is 180 and TimeFormat is tfMSF, the current position is 180 minutes into the medium.
Not all formats are supported by every device. When trying to set an unsupported format, the assignment is ignored.
The current timing information is always passed in a 4-byte integer. In some formats, the timing information returned is not really one integer, but single bytes of information packed in the long integer.
The TMPTimeFormats type defines the time formats for a multimedia device used with a TMediaPlayer. The following table lists the possible values for the TMPTimeFormats type:
Value Time format
tfMilliseconds Milliseconds are stored as a 4-byte integer variable. tfHMS Hours, minutes, and seconds packed into a 4-byte integer. From least significant to most significant byte, the data values are Hours (least significant byte) Minutes Seconds Unused (most significant byte) tfMSF Minutes, seconds, and frames packed into a 4-byte integer. From least significant to most significant byte, the data values are Minutes (least significant byte)
Seconds Frames Unused (most significant byte) tfFrames Frames are stored as a 4-byte integer variable. tfSMPTE24 24-frame SMPTE packs values in a 4-byte variable. From least significant to most significant byte, the data values are Hours (least significant byte) Minutes Seconds Frames (most significant byte) SMPTE (Society of Motion Picture and Television Engineers) time is an absolute time format expressed in hours, minutes, seconds, and frames. The standard SMPTE division types are 24, 25, and 30 frames per second.
tfSMPTE25 25-frame SMPTE packs data into a 4-byte variable in the same order as 24-frame SMPTE. tfSMPTE30 30-frame SMPTE packs data into the 4-byte variable in the same order as 24-frame SMPTE. tfSMPTE30Drop 30-drop-frame SMPTE packs data into the 4-byte variable in the same order as 24-frame SMPTE. tfBytes Bytes are stored as a 4-byte integer variable. tfSamples Samples are stored as a 4-byte integer variable. tfTMSF Tracks, minutes, seconds, and frames are packed in the 4-byte variable. From least significant to most significant byte, the data values are
Hvis du sætter BorderStyle til bsNone på din form og sætter WindowState til wsMaximized, skulle den vise den i fuld skærm.
Så kan du bruge en Timer komponent til at aflæse positionen på movien.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.