MBS Plugin Documentation
Statistics - FAQ - Plugin Parts (All, Dependencies) - Class hierarchie
New in Version 7.0 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 8.0 8.1 8.2 8.3 8.4 8.5 8.6 8.7 9.0
The list of the themes, classes, controls, modules, global methods by category, global methods by name, screenshots, licenses and examples.
Platforms to show: All Mac Windows Linux Cross-Platform
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.5, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Changes the duration of a segment of a movie.
Notes:
self:
The movie for this operation.
startTime:
The start of the segment. The oldDuration parameter specifies the segment's duration. This time value must be expressed in the movie's time scale.
oldDuration:
The original duration of the segment in the source movie. This time value must be expressed in the movie's time scale.
newDuration:
The new duration of the segment. This time value must be expressed in the movie's time scale. The function alters the segment to accommodate the new duration.
Return Value
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.
Discussion
The Movie Toolbox scales the segment to accommodate the new duration.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.1, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The selection length in frames.
Notes:
(TimeScaleMBS * SelectionLengthMBS = SelectionLengthFramesMBS)
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The selection length in seconds.
Notes:
(TimeScaleMBS * SelectionLengthMBS = SelectionLengthFramesMBS)
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.1, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The selection start position in frames.
Notes:
(TimeScaleMBS * SelectionStartMBS = SelectionStartFramesMBS)
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The selection start position in seconds.
Notes:
(TimeScaleMBS * SelectionStartMBS = SelectionStartFramesMBS)
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the active segment of the movie in frames.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the active segment of the movie.
Example:
dim f as FolderItem
'dim m as movie // global
dim s,d as Double
f=DesktopFolder.Child("test movie.mov")
m=f.OpenAsMovie
m.SetActiveSegmentMBS 30,30 // 30 seconds starting at the 30th second
m.PlayMBS
m.GetActiveSegmentMBS s,d
MsgBox "playing "+str(d)+" seconds from position "+str(s)
Notes: SetActiveSegmentMBS + PlayMBS = PlaySelection
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to allow the movie codec to use black lines for better performance.
Notes:
There seems no way to read the current state.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to allow the movie codec to interlace video.
Notes:
There seems no way to read the current state.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to use High Quality movie playback.
Notes:
There seems no way to read the current state.
Please read <http://developer.apple.com/qa/qa2001/qa1149.html> for more details.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to use Deinterlaced movie playback.
Notes:
Deinterlacing is only available with QuickTime 6.5 or greater
There seems no way to read the current state.
Please read <http://developer.apple.com/qa/qa2001/qa1149.html> for more details.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to use Single field movie playback.
Notes:
There seems no way to read the current state.
Please read <http://developer.apple.com/qa/qa2001/qa1149.html> for more details.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Sets the movie aperture mode.
Notes:
kQTApertureMode_Classic = "clas"
An aperture mode which gives compatibility with behavior in QuickTime 7.0.x and earlier. A movie in classic aperture mode uses track dimensions as set in NewMovieTrack and SetTrackDimensions. A decompression session in classic aperture mode does not set the clean aperture or pixel aspect ratio attachments on emitted pixel buffers. Movies default to classic aperture mode. If you call SetTrackDimensions on a track, the movie is automatically switched into classic aperture mode.
kQTApertureMode_CleanAperture = "clea"
An aperture mode for general display. Where possible, video will be displayed at the correct pixel aspect ratio, trimmed to the clean aperture. A movie in clean aperture mode sets each track's dimensions to match its kQTVisualPropertyID_CleanApertureDimensions. A decompression session in clean aperture mode sets the clean aperture and pixel aspect ratio attachments on emitted pixel buffers based on the image description.
kQTApertureMode_ProductionAperture = "prod"
An aperture mode for modal use in authoring applications. Where possible, video will be displayed at the correct pixel aspect ratio, but without trimming to the clean aperture so that the edge processing region can be viewed. A movie in production aperture mode sets each track's dimensions to match its kQTVisualPropertyID_ProductionApertureDimensions. A decompression session in production aperture mode sets the pixel aspect ratio attachments on emitted pixel buffers based on the image description.
kQTApertureMode_EncodedPixels = "enco"
An aperture mode for technical use. Displays all encoded pixels with no aspect ratio or clean aperture compensation. A movie in encoded pixels aperture mode sets each track's dimensions to match its kQTVisualPropertyID_EncodedPixelsDimensions. A decompression session in encoded pixels aperture mode does not set the clean aperture or pixel aspect ratio attachments on emitted pixel buffers.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Tells QuickTime whether to play all frames or to skip frames to keep in sync with audio.
Notes:
There seems no way to read the current state.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Shows the current frame of the movie into the given GWorld object.
Notes:
The movie is scaled to the given rectangle.
Note that following frames on playing the movie will also be drawed into this graphics port.
Returns -1 if the function is not available, else a Mac OS error code like 0 for no error.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Draws the current frame of the movie into the given gworld object.
Notes:
Note that following frames on playing the movie may also be drawed into this graphics port.
Returns -1 if the function is not available, else a Mac OS error code like 0 for no error.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Shows the current frame of the movie into the given graphics object.
Notes:
The movie is scaled to the given rectangle.
Note that following frames on playing the movie will also be drawed into this graphics port.
Returns -1 if the function is not available, else a Mac OS error code like 0 for no error.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Draws the current frame of the movie into the given graphics object.
Example:
// Three differnt ways to get one picture for each
// second in the first 90 seconds of a movie:
dim t as integer
dim p as Picture
dim i,c,e as Integer
if theMovie<>nil then
t=ticks
for i=0 to 90
theMovie.Position = i
p=theMovie.Picture
// now p has the current picture
next
t=ticks-t
MsgBox str(t) // 1338
t=ticks
for i=0 to 90
p=theMovie.MoviePictureMBS(i)
// now p has the current picture
next
t=ticks-t
MsgBox str(t) // 1303
p=NewPicture(theMovie.BaseMovieWidth,theMovie.BaseMovieHeight,32)
t=ticks
e=theMovie.ShowMovieMBS(p.Graphics)
for i=0 to 90
theMovie.Position=i
QuickTimePollMBS
// now p has the current picture
next
t=ticks-t
MsgBox str(t) // 309
Backdrop=p
end
Notes: Note that following frames on playing the movie may also be drawed into this graphics port.
Returns -1 if the function is not available, else a Mac OS error code like 0 for no error.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTSoundExtract), class movie, Plugin version: 7.0, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Returns the sound of the first soundtrack in the movie as a memoryblock.
Example:
// Plays a MP3 file using SoundRawDataMBS and CoreAudioPlayer (on Mac OS X only)
dim m as movie
dim buf as MemoryBlock
dim b as Boolean
dim pos,size,n as integer
dim mpos,msize as Double
dim length as Double
dim c as CoreAudioPlayerMBS
// get a pointer to your movie. You might openAsMovie a folderitem, for
// example
m = theVideo.movie
// allocate and initialize the audio player to standard values
c=new CoreAudioPlayerMBS
c.NumberOfChannels=2
c.SampleRate = 44100
c.bitSize = 15
// play the entire file
mpos=0
msize=m.DurationMBS
// while stuff left to do.
do
// get a buffer's worth of audio data. It will always be 16bit signed, stereo, 44.1khz
// figure out how many seconds worth of data it is, and update the pointer for the
// next read
buf=m.SoundRawDataMBS(mpos,10) // always 16bit, stereo, 44100 Hz
length=buf.Size/2/2/44100
mpos=mpos+length
// log.append "got "+str(buf.size)+" bytes = "+str(length)+" seconds"
// while there is unplayed data in the buffer, push it out to the audioplayer
// object. buffer length will always be even, since samples are 2 bytes long.
// and since the audio player deals with samples, we'll handle them in those
// units
pos=0
size=buf.Size/2
do
// figure out how much space there is left in the buffer. .Freespace
// returns number of samples (2 bytes each)
n=c.FreeSpace
if n>size-pos then
n=size-pos
end if
// log.append " play "+str(n)+" samples @ "+str(pos)+" offset"
// playaudio takes byte offset and length, not samples. If you
// don't compensate for this, then you get alignment errors
// if pos is odd, and noise results
b=c.PlayAudio(buf,pos+pos,n+n)
// if we failed, quit
if not b then
MsgBox "PlayAudio failed"
Return
else
// otherwise, move along in our buffer
pos=pos+n
end if
// give the audio a little time to play before trying to stuff more
// into the audioplayer buffer
DelayMBS 0.1
loop until pos>=size
loop until mpos>=msize
Notes: The whole sound in 16bit, stereo, 44100 Hz, interleaved per default.
You can specify 8 or 16 bit, one or two channels and one of the following rates: 8000, 11025, 11127, 16000, 22254, 22050, 32000, 44100 and 48000.
Returns nil on any error.
Should do AAC and MP3, even VBRs.
You give times, but as most sound data is saved in chunks this will not be taken exactly. So if you work throught the movie, you will get returned blocks bigger than you asked for.
On Windows it may need byte swapping before using it (memoryblock.SwapBytes16MBS to be exact).
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Stops playback of the movie.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Whether timecode data should be displayed for this movie.
Notes:
(Read and Write runtime property)
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The current position inside the movie.
Notes:
Unit is the timebase of the movie.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 2.9, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The time scale for the movie.
Notes:
e.g. a value of 90000 on one movie here.
time units = seconds * time scale
Returns 0 on any error.
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The number of tracks in the movie.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTCoreClasses), class movie, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Unregisters a media key.
Notes:
Returns an error code (0 for success).
keytype must be a MacRoman string.
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 5.0, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Updates the movie.
Notes: Returns an error code.
method, QuickTime, MBS QuickTime Plugin (QTCoreClasses), class movie, Plugin version: 3.4, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: The userdata of the movie.
Example:
dim m as EditableMovie
dim f as FolderItem
dim u as QTUserDataMBS
f=DesktopFolder.Child("test.mov")
m=f.CreateMovie
u=m.UserDataMBS
u.AddText ConvertEncoding("©nam",Encodings.MacRoman),1,0,ConvertEncoding("Christian Schmitz äöü",Encodings.MacRoman)
call m.CommitChanges
// now the movie has the title "Christian Schmitz äöü"
Notes: You are working on the original data.
After the movie is closed, this object will be invalid and should no longer be used.
Returns nil on any error.
Some examples which use this method:
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.
Function: Set and get the volume of a movie.
Example:
movie.volume=256 'max
Notes: The volume may be between -256 and 256.
you don't hear anything if volume <=0.
For Sound Manager 3.0 and newer it should even work to set volume bigger than 256.
To switch between sound and nosound do:
movie.volume = -movie.volume
Useful constants:
| kNoVolume | &H000 | setting for no sound volume |
| kFullVolume | &H100 | setting for full hardware output volume |
Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
(Read and Write runtime property)
Some examples which use this method:
The items on this page are in the following plugins: MBS QuickTime Plugin.