22. maj 2001 - 10:13
Der 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?
Lav et TPanel hvis alignment er alClient og sæt TMediaPlayers display property til at henvis til Panel navnet
Sæt mediaplayers TemFormat property til den tidsenhed, derved StartPos, Length, Position, Start, and EndPos properties bruge den tidsenhed
Det skulle have været TimeFormat property
Her er hjælpens tekst :
Determines the format used to specify position information.
type TMPTimeFormats = (tfMilliseconds, tfHMS, tfMSF, tfFrames, tfSMPTE24, tfSMPTE25, tfSMPTE30, tfSMPTE30Drop, tfBytes, tfSamples, tfTMSF);
property TimeFormat: TMPTimeFormats;
Description
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
Tracks (least significant byte)
Minutes
Seconds
Frames (most significant byte)