grass valley developers

Home > APIs > AppServer API > Examples > Asset Management > Selecting Specific Assets

Selecting Specific Assets

Note: for the usual way of getting list of clips, see Get a List of Clips.

In other cases, rather than selecting all assets in a bin, it is useful to call SelectAssets() and query for specific assets using a database query.

In this case, instead of calling:

[C#]
int cookie = mediaMgr.EnumerateAssets("V:", "default", ref count);

you can call:

[C#]
// select all clips in V:/default that are not temporary movies 
// (i.e. starting with "~"). Order by the last changed time.

string query = "MovieGroup.datasetName = N'V:' AND MovieGroup.keygroupName = N'default' AND Movie.keyname not like N'~%%' ORDER BY Movie.lastChangedTime ASC";

int cookie = mediaMgr.SelectAssets(query, ref count);		

Note that:

"MovieGroup.datasetName" corresponds to the volume (i.e. "V:" drive)

"MovieGroup.keygroupName" corresponds to the bin (i.e. "default" in this case)

"Movie.keyname" corresponds to the asset's name