MBS Plugin Documentation

Search:

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

Next items

movie.ActiveMBS as boolean
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 6.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Whether movie is active or not.
Notes: (Read and Write runtime property)
Movie.AddMovieSelectionMBS(sourcemovie as movie) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Adds one or more tracks to a movie.
Notes:
AddMovieSelection adds the tracks from the source movie to the destination movie. The function adds these tracks at the time specified by the current selection in the destination movie.

Introduced in QuickTime 3 or earlier.

Returns -1 if the movies are nil or the function is not available.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.AddSoundFadeMBS(StartVolume as integer, EndVolume as integer, StartTime as integer, DurationTime as integer) as Boolean
method, QuickTime, MBS QuickTime Plugin (QTTween), class movie, Plugin version: 8.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds a sound fade to a sound track.
Example:
dim m as movie
dim f as FolderItem

f=DesktopFolder.Child("test.mov")
m=f.OpenAsMovie

// fade last ten seconds
if m.AddSoundFadeMBS(256, 0, m.DurationFramesMBS-m.TimeScaleMBS*10, m.TimeScaleMBS*10) then
MsgBox "ok"
else
MsgBox "Fail"
end if

'// fade first ten seconds
'if m.AddSoundFadeMBS(0, 256, 0, m.TimeScaleMBS*10) then
'MsgBox "ok"
'else
'MsgBox "Fail"
'end if

MoviePlayer1.Movie=m


Notes: Calls AddSoundFadeToTrack for the first soundtrack in the movie.
movie.AddSoundFadeToTrackMBS(TrackHandle as integer, StartVolume as integer, EndVolume as integer, StartTime as integer, DurationTime as integer) as Boolean
method, QuickTime, MBS QuickTime Plugin (QTTween), class movie, Plugin version: 8.4, Mac OS X: Works, Windows: Works, Linux x86: Works, Feedback.

Function: Adds a sound fade to a sound track.
Notes:
StartVolume and EndVolume are numbers from 0 to 256.

StartTime and DurationTime are in time scale units, so call movie.TimeScaleMBS to get the number of units per second.

Returns true for success.

Currently you can only use one sound fade per sound track.
movie.AddTextTrackMBS(chapters() as QTChapterDataMBS, type as string, isChapterTrack as boolean) as QTChapterTrackMBS
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.4, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Adds a text track to
Example:
// add chapters to a movie
dim e as EditableMovie
dim f as FolderItem
dim q as QTChapterTrackMBS
dim data(9) as QTChapterDataMBS
dim i,c,d as integer
dim texts(-1) as string

f=DesktopFolder.Child("test.mov")
e=f.OpenEditableMovie

d=e.DurationFramesMBS
MsgBox str(d)
for i=0 to 9
data(i)=new QTChapterDataMBS
data(i).FrameDuration=d/11
data(i).Text="Chapter "+str(i+1)
data(i).HasBackColor=true
data(i).BackColor=rgb(127+rnd*128,127+rnd*128,127+rnd*128)
data(i).HasTextColor=true
data(i).TextColor=rgb(rnd*128,rnd*128,rnd*128)
next

q=e.AddTextTrackMBS(data, "vide", true)

if q<>Nil then
c=q.ChapterCount
MsgBox "Success!"+EndOfLine+"Added "+str(c)+" chapters. "+str(q.TrackHandle)
for i=0 to c-1
texts.Append q.ChapterText(q.GetChapterTime(i))
next

MsgBox Join(texts,EndOfLine)
else
MsgBox "Failed"
end if

call e.CommitChanges

Notes:
On success returns the new track reference.

If the isChapterTrack parameter is true, the text track is set to be a chapter track, attached to the (first) track of the given type.
movie.AddTimeCodeToMovieMBS(parameters as QTTimeCodeCreationParametersMBS) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Creates a new time code track for this movie.
Example:
dim e as movie
dim f as FolderItem
dim p as QTTimeCodeCreationParametersMBS

f=DesktopFolder.Child("Abba.mov")
e=f.OpenEditableMovie

e.DeleteTimeCodeTracksMBS

p=new QTTimeCodeCreationParametersMBS
p.UseTimeCode=false
p.FrameDuration=1

if e.AddTimeCodeToMovieMBS(p)=0 then
e.TimeCodeDisplayedMBS=true

MoviePlayer1.Movie=e
MoviePlayer1.play
end if

Notes:
Returns an error code (0 for success, -1 for bad parameters.)
Else a Mac OS error code.

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:

movie.ChapterTrackMBS as QTChapterTrackMBS
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Searches the chapter track inside the track list.
Notes:
Returns nil on any error.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
class Movie
class, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Extends the Movie class inside Realbasic.
Notes:
Some calls need QuickTime 2.5 and some 3.0. Ask if you need details and I can add the version requirement to each call.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
Movie.clearMovieChangedMBS
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Sets the movie changed flag to indicate that the movie has not been changed.
Notes:
Introduced in QuickTime 3 or earlier.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.CurrentTimeCodeStringMBS as string
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The current time code as a string.
Notes:
The string may have the wrong encoding. (US ASCII, MacRoman or WinANSI?)

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:

movie.DeleteMovieSegmentMBS(time as integer, Duration as integer) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.5, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Removes a specified segment from a movie.
Notes:
self:
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, and NewMovieFromHandle.

time:
A time value specifying the starting point of the segment to be deleted.

Duration:
A time value that specifies the duration of the segment to be deleted.

Return Value
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.

Discussion
You identify the segment to remove by specifying its starting time and duration. The following code snippet shows DeleteMovieSegment being used while adding a modifier track to a movie.
Movie.DeleteMovieSelectionMBS as integer
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 4.1, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Clears the selection in movie by removing this part of the movie.
Notes:
Returns -1 if the function is not available, 0 on success and else a Mac OS error code.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.DeleteTimeCodeTracksMBS
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Deletes all time code tracks from the current movie.

Some examples which use this method:

Movie.DrawMovieGWorldIntoRectMBS(GWorldHandle as integer, left as integer, top as integer, width as integer, height as integer) as integer
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:
The movie is scaled to the given rectangle.
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.
Movie.DrawMovieGWorldMBS(GWorldHandle as integer) as integer
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.
Movie.DrawMovieIntoRectMBS(g as graphics, left as integer, top as integer, width as integer, height as integer) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Draws 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 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.
Movie.DrawMovieMBS(g as graphics) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Does nothing, Linux x86: Does nothing, Feedback.

Function: Draws the current frame of the movie into the given graphics 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.
movie.DurationFramesMBS as double
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 2.9, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Reads the length of the movie in time units.
Example:
msgbox format(movie.DurationFrames,"0")+" seconds."

Notes:
Remember: Duration=DurationFrames/TimeScale

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:

Movie.DurationMBS as double
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Reads the length of the movie in seconds.
Example:
msgbox format(movie.duration,"0")+" seconds."

Notes:
Realbasic gives you for the editablemovie class a duration property, but not for the movie, so here it is :-)

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:

Movie.FlattenMovieMBS(file as folderitem, creatorcode as string, ReplaceFile as boolean, ResourceName as string) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Flattens a movie to a movie file.
Example:
dim f as FolderItem
dim result as integer
dim m as movie
dim e as integer

f= getfolderitem("Ein Loch ist im Eimer.mov")
movieplayer1.movie=f.openasmovie
f= getfolderitem("10 Ich Bin Aus Jenem Holze Gesc")
movieplayer2.movie=f.openasmovie

movieplayer1.EditableMBS=True
movieplayer2.EditableMBS=True
movieplayer2.movie.SelectionStartMBS=0
movieplayer2.movie.SelectionLengthMBS=30
m=movieplayer2.CopyMBS

//Pasting a part of another in movieplayer1
'e=movieplayer1.Movie.AddMovieSelectionMBS(m)
e=MoviePlayer1.PasteMBS(m)
f= getfolderitem("test.mov")
Result=movieplayer1.movie.FlattenMovieMBS(f,"",true,"")
MsgBox str(result)

Notes:
Returns -1 on parameter error and 0 if the function started successfull. The result must be checked using the LastQuickTimeErrorMBS function.

Parameters:
fileThe destination file. On Mac OS X only the first 31 characters of the file name are used, so you better save to a temp file and rename the file later.
creatorcodeThe Mac OS creator code to use. If you pass "" the default creator code ("TVOD") is used.
ReplaceFilewhether the file should be replaced or the movie should be added to an existing file.
ResourceNameThe name of the movie resource. You can pass "" to use no resource name.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.GenerateMovieApertureModeDimensionsMBS as integer
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Examines a movie and sets up track aperture mode dimensions.
Notes: This function can be used to add information needed to support aperture modes to movies created with applications and/or versions of QuickTime that did not support aperture mode dimensions. If the image descriptions in video tracks lack tags describing clean aperture and pixel aspect ratio information, the media data may be scanned to see if the correct values can be divined and attached. Then the aperture mode dimensions are calculated and set for each track. Afterwards, the kQTVisualPropertyID_HasApertureModeDimensions property will be set to true for these tracks. Tracks which do not support aperture modes are not changed.
movie.GetActiveSegmentFramesMBS(byref StartFrame as integer, byref DurationFrame as integer)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Queries the current active segment position and length.
movie.GetActiveSegmentMBS(byref StartFrame as double, byref DurationFrame as double)
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 4.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Queries the current active segment position and length.
Example:
// creates selection and plays it.
dim s,d as double

m.SetActiveSegmentMBS inVal,(outVal-inVal)

m.GetActiveSegmentMBS s,d

txtInfo.caption= "playing "+str(d)+" seconds from position "+str(s)

m.GoToBeginningMBS
m.PlayMBS

movie.GetTrackIDMBS(id as integer) as QTTrackMBS
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns the QuickTime Track with the given ID.
Notes:
On any error the function returns nil.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.GetTrackIndexMBS(index as integer) as QTTrackMBS
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns the QuickTime Track with the given index.
Example:
Title=str(MoviePlayer1.Position)+" "+str(MoviePlayer1.movie.GetTrackIndexMBS(1).TrackVolume)

Notes:
Index starts at 1.
On any error the function returns nil.

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:

Movie.GoToBeginningMBS
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Moves the current position of this movie to the beginning.

Some examples which use this method:

Movie.GoToEndMBS
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Moves the current position of this movie to the end.
movie.HasMovieChangedMBS as boolean
method, QuickTime, MBS QuickTime Plugin (QTMovies), class movie, Plugin version: 3.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Determines whether a movie has changed and needs to be saved.
Notes:
Your application can clear the movie changed flag, indicating that the movie has not changed, by calling ClearMovieChangedMBS.
Introduced in QuickTime 3 or earlier.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.HasQTChapterTrackMBS as Boolean
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 4.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: True if this movie has a chapter track.
Notes:
Returns false on any error.

Does not work if movie.handle is 0. You can use e.g. OpenAsMovieMBS which returns a movie with handle<>0.
movie.HasTimeCodeTrackMBS as boolean
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 the movie has a time code track.
Notes:
True if such a track exists in this movie.
False 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:

movie.InsertEmptyMovieSegmentMBS(time as integer, Duration as integer) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.5, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Adds an empty segment to a movie.
Notes:
self:
The movie for this operation. Your application obtains this movie identifier from such functions as NewMovie, NewMovieFromFile, or NewMovieFromHandle.

time:
A time value that specifies where the segment is to be inserted. This time value must be expressed in the movie's time scale.

Duration:
A time value that specifies the duration of the segment to be added. This time value must be expressed in the movie's time scale.

Discussion
You specify the starting time and duration of the empty segment to be added. These times must be expressed in the movie's time scale. You cannot add empty space to the end of a movie. If you want to insert a segment beyond the end of a movie, use InsertMovieSegment.

Returns a Mac OS error code.
movie.InsertMovieSegmentMBS(dest as movie, srcIn as integer, srcDuration as integer, dstIn as integer) as integer
method, QuickTime, MBS QuickTime Plugin (QTMovie), class movie, Plugin version: 8.5, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Copies part of one movie to another.
Notes:
self:
The source movie for this operation. This function obtains the movie segment from the source movie specified in this parameter.

dest:
The destination movie for this operation. The function places a copy of the segment, which it obtained from the source movie, into this destination movie.

srcIn:
The start of the segment in the source movie. This time value must be expressed in the source movie's time scale.

srcDuration:
The duration of the segment in the source movie. This time value must be expressed in the source movie's time scale.

dstIn:
A time value specifying where the segment is to be inserted. This time value must be expressed in the destination movie's time scale.

Return Value
You can access Movie Toolbox error returns through GetMoviesError and GetMoviesStickyError, as well as in the function result. See Error Codes.

Discussion
If you are not copying data from one location in a movie to a different point in the same movie, this function may create new tracks, as appropriate. Before adding a track to the destination movie, the Movie Toolbox looks in the destination movie for tracks that have the same characteristics as the tracks in the source movie. The toolbox considers several characteristics when searching for an appropriate track, including track spatial dimensions, track matrix, track clipping region, track matte, alternate group affiliation, media time scale, media type, media language, and data reference (that is, referring to the same file). If the Movie Toolbox cannot find an appropriate track in the destination movie, it creates a new track with the proper characteristics.

Special Considerations
If you have assigned a progress function to the destination movie, the Movie Toolbox calls that progress function during long copy operations. Some Movie Toolbox functions can take a long time to execute. For example, if you call FlattenMovie and specify a large movie, the Movie Toolbox must read and write all the sample data for the movie. During such operations you may wish to display some kind of progress indicator to the user.
Movie.IsAutoPlayMovieMBS as boolean
method, QuickTime, MBS QuickTime Plugin (QTMovies), class Movie, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Returns true if the movie is an autoplay movie.

Previous items Next items

The items on this page are in the following plugins: MBS QuickTime Plugin.