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

QTMetaDataMBS.AddItem(StorageFormat as string, KeyFormat as string, Key as string, Value as String, DataType as integer) as QTMetaDataItemMBS
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.3, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Adds an inline metadata item to the metadata storage format.
Example:
//Open a movie and add a metadataitem
dim key, keyFmt as string
dim i as QTMetaDataItemMBS
dim QTmd as QTMetaDataMBS
dim f as FolderItem
dim m as EditableMovie

f=DesktopFolder.Child("testmovie.mov")
if f<>nil then
m=f.OpenEditableMovie
QTmd=m.MetaDataMBS
if QTmd <> nil then
i=QTmd.AddItem("mdta","mdta","com.apple.quicktime.producer","Christian Horst Schmitz",1)
MsgBox str(qtmd.Lasterror)

i=QTmd.FirstItem
//loop through each metadata item to check whether it was saved
while i<>nil
KeyFmt=i.GetPropertyString("keyf")
Key=i.GetPropertyString("key ")

KeyFmt=DefineEncoding(KeyFmt,Encodings.MacRoman)
key=DefineEncoding(key,Encodings.MacRoman)

MsgBox KeyFmt+" "+key

i=QTmd.NextItem
wend
call m.CommitChanges // save to disk
end if
end if

Notes:
Parameters:
self: The metadata object for this operation.
StorageFormat: The metadata storage format used by the object. The format may be UserData storage, iTunes metadata storage, or QuickTime metadata storage. Not all objects will include all forms of storage, and other storage formats may appear in the future. You cannot pass kQTMetaDataStorageFormatWildcard to target all storage formats.
KeyFormat: The format of the key.
Key: The key of the item to be used.
Value: The value to be added. This can be "" if you want to add an item with no value.
DataType: A data type from the following list: kQTMetaDataTypeBinary = 0, kQTMetaDataTypeUTF8 = 1, kQTMetaDataTypeUTF16BE = 2, kQTMetaDataTypeMacEncodedText = 3, kQTMetaDataTypeSignedIntegerBE = 21, kQTMetaDataTypeUnsignedIntegerBE = 22, kQTMetaDataTypeFloat32BE = 23, kQTMetaDataTypeFloat64BE = 24With kQTMetaDataTypeSignedIntegerBE and kQTMetaDataTypeUnsignedIntegerBE, the size of the integer is determined by the value size.

Result: On return, you get a reference to the newly added item.
Lasterror is set. Returns nil on any error.
If key is a 4 letter OSType, it must have MacRoman textencoding.
class QTMetaDataMBS
class, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The class to represent meta data from a movie or movie track.
Example:
// Open a movie and changes its info string, info key type must exist.
// from Ian Steele
dim key, keyFmt as string
dim i as QTMetaDataItemMBS
dim QTmd as QTMetaDataMBS
dim f as FolderItem
dim m as EditableMovie

f=GetOpenFolderItem("application/binary")
if f<>nil then
m=f.OpenEditableMovie
QTmd=m.MetaDataMBS
if QTmd <> nil then
i=QTmd.FirstItem
//loop through each metadata item
while i<>nil
KeyFmt=i.GetPropertyString("keyf")
Key=i.GetPropertyString("key")
if KeyFmt="udta" then
key=DefineEncoding(key,Encodings.MacRoman)
else
key=DefineEncoding(key,Encodings.ASCII)
end if
//old style metadata
if key="©inf" then
i.SetString("Info string old",3)//3=MacEncoded
end if
//new style metadata
if key="com.apple.quicktime.information" then
i.SetString("Info string new",1)//1=utf-8
end if
i=QTmd.NextItem
wend
call m.CommitChanges
end if
end if

QTMetaDataMBS.Close
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The destructor.
Notes:
There is no need to call this method except you want to free all resources of this object now without waiting for Realbasic to do it for you.
(e.g. some Realbasic versions crash on Windows if there are plugin objects not closed.)
QTMetaDataMBS.CountItems as integer
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Counts all items.
Notes:
Lasterror is set.
Returns 0 on any error.
QTMetaDataMBS.CountItemsWithKey(StorageFormat as string, KeyFormat as string, Key as string) as integer
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Counts all items with the given key.
Example:
dim QTmd as QTMetaDataMBS
dim f as FolderItem
dim m as EditableMovie
dim count as integer
dim sfmt,kfmt,key as string

sfmt="mdta"
kfmt="mdta"
key="com.apple.quicktime.information"

f=GetOpenFolderItem("application/binary")
if f<>nil then
m=f.OpenEditableMovie
QTmd=m.MetaDataMBS
if QTmd <> nil then
count=QTmd.CountItemsWithKey(sfmt,kfmt,key)
MsgBox str(count)
end if
end if

Notes:
Lasterror is set.
Returns 0 on any error.
QTMetaDataMBS.FirstItem as QTMetaDataItemMBS
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Resets the iterator and returns the first item in the list.
Notes:
Lasterror is set.
Returns nil on any error.
QTMetaDataMBS.GetPropertyMemory(what as string) as memoryblock
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Copies the property data part and returns it as a memoryblock.
Notes:
Lasterror is set.
Returns nil on any error.

Useful constants:
kQTMetaDataKeyAuthor = "auth"
kQTMetaDataKeyComment = "cmmt"
kQTMetaDataKeyCopyright = "cprt"
kQTMetaDataKeyDirector = "dtor"
kQTMetaDataKeyDisplayName = "name"
kQTMetaDataKeyInformation = "info"
kQTMetaDataKeyKeywords = "keyw"
kQTMetaDataKeyProducer = "prod"
kQTMetaDataKeyAlbum = "albm"
kQTMetaDataKeyArtist = "arts"
kQTMetaDataKeyArtwork = "artw"
kQTMetaDataKeyChapterName = "chap"
kQTMetaDataKeyComposer = "comp"
kQTMetaDataKeyDescription = "desc"
kQTMetaDataKeyGenre = "genr"
kQTMetaDataKeyOriginalFormat = "orif"
kQTMetaDataKeyOriginalSource = "oris"
kQTMetaDataKeyPerformers = "perf"
kQTMetaDataKeySoftware = "soft"
kQTMetaDataKeyWriter = "wrtr"
QTMetaDataMBS.GetPropertyString(what as string) as string
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Copies the property data part and returns it as a string.
Notes:
Lasterror is set.
Returns "" on any error.

Useful constants:
kQTMetaDataKeyAuthor = "auth"
kQTMetaDataKeyComment = "cmmt"
kQTMetaDataKeyCopyright = "cprt"
kQTMetaDataKeyDirector = "dtor"
kQTMetaDataKeyDisplayName = "name"
kQTMetaDataKeyInformation = "info"
kQTMetaDataKeyKeywords = "keyw"
kQTMetaDataKeyProducer = "prod"
kQTMetaDataKeyAlbum = "albm"
kQTMetaDataKeyArtist = "arts"
kQTMetaDataKeyArtwork = "artw"
kQTMetaDataKeyChapterName = "chap"
kQTMetaDataKeyComposer = "comp"
kQTMetaDataKeyDescription = "desc"
kQTMetaDataKeyGenre = "genr"
kQTMetaDataKeyOriginalFormat = "orif"
kQTMetaDataKeyOriginalSource = "oris"
kQTMetaDataKeyPerformers = "perf"
kQTMetaDataKeySoftware = "soft"
kQTMetaDataKeyWriter = "wrtr"
QTMetaDataMBS.Handle as Integer
property, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The handle to the metadata object.
Notes: (Read and Write property)
QTMetaDataMBS.Lasterror as Integer
property, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The last error code reported.
Notes: (Read and Write property)
QTMetaDataMBS.NextItem as QTMetaDataItemMBS
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: The next item in the iterator.
Notes:
Lasterror is set.
Returns nil on any error.
The RemoveItem method will reset the search so the next call returns the first item found.
QTMetaDataMBS.RemoveItem(item as QTMetaDataItemMBS)
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Removes the given item from the meta data object.
Notes:
Lasterror is set.
If you got the item by calling NextItem the plugin will reset the search so NextItem will return the first item.
QTMetaDataMBS.RemoveItemsWithKey(StorageFormat as string, KeyFormat as string, Key as string)
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Removes the items matching the key.
Notes: Lasterror is set.
QTMetaDataMBS.SetPropertyMemory(what as string, data as memoryblock, offset as integer, size as integer)
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Replaces the content of the metadata item part with the given memoryblock content.
Notes:
Lasterror is set.
Offset and size are in bytes.

Properties:
kQTMetaDataPropertyID_StorageFormats="fmts": The list of storage formats (QTMetaDataStorageFormat) associated with this QTMetaData object. C-style array of OSTypes.

kQTMetaDataPropertyID_OwnerType="ownt": The owner type associated with this QTMetaData object. OSType (QT_MOVIE_TYPE="moov", QT_TRACK_TYPE="trak", QT_MEDIA_TYPE="mdia").

kQTMetaDataPropertyID_Owner="ownr": The owner associated with this QTMetaData object. The QTMetaDataRef object does not necessarily need to have an owner. Movie, Track, or Media reference.
QTMetaDataMBS.SetPropertyString(what as string, data as string)
method, Quicktime, MBS QuickTime Plugin (QTMovie), class QTMetaDataMBS, Plugin version: 6.2, Mac OS X: Works, Windows: Works, Linux x86: Does nothing, Feedback.

Function: Replaces the content of the metadata item part with the given string content.
Notes:
Lasterror is set.

Properties:
kQTMetaDataPropertyID_StorageFormats="fmts": The list of storage formats (QTMetaDataStorageFormat) associated with this QTMetaData object. C-style array of OSTypes.

kQTMetaDataPropertyID_OwnerType="ownt": The owner type associated with this QTMetaData object. OSType (QT_MOVIE_TYPE="moov", QT_TRACK_TYPE="trak", QT_MEDIA_TYPE="mdia").

kQTMetaDataPropertyID_Owner="ownr": The owner associated with this QTMetaData object. The QTMetaDataRef object does not necessarily need to have an owner. Movie, Track, or Media reference.

Next items

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