Selects all assets in a bin and its sub-bins
Namespace:
GrassValley.Mseries.MediaMgrAssembly: GrassValley.Mseries.MediaMgr (in GrassValley.Mseries.MediaMgr.dll) Version: 1.0.0.0
Syntax
C# |
---|
int SelectAllAssets( string uri, string whereClause, out int count ) |
Visual Basic (Declaration) |
---|
Function SelectAllAssets ( _ uri As String, _ whereClause As String, _ <OutAttribute> ByRef count As Integer _ ) As Integer |
Visual C++ |
---|
int SelectAllAssets( String^ uri, String^ whereClause, [OutAttribute] int% count ) |
Parameters
- uri
- Type: System..::.String
URI
- whereClause
- Type: System..::.String
where clause ("" for default)
- count
- Type:
System..::.Int32
%
number of assets returned
Return Value
cookie used for GetXmlResults or GetResultProperty calls to get resultsExamples
Get all assets in V:/default and its sub-bins
CopyC#
// select all assets under V:/default and its subdirectories int cookie = mediaMgr.SelectAllAssets("bin/cmf//localhost/V:/default", "", out count); // setup query string string query = "uri+lengthstr"; // Let's only get info on the first 100 clips in the bin object dataObj = null; mediaMgr.GetResultProperty( cookie, query, 0, 100, out count, out dataObj); Console.WriteLine("number of assets: " + count); // GetResultProperty for clip data returns a 2 dimensional array // - the first dimension represents the clip // - the second dimension represents the properties of the clip // so let's cast the dataobj to a clip array first object[] clipArray = (object[]) dataObj; // loop thru each clip foreach (object clip in clipArray) { // then cast the clip object to an array of properties for each clip object[] propertyArray = (object[]) clip; // and finally print out the clip properties for each clip Console.WriteLine("Clip: {0} Length: {1}", propertyArray[0], propertyArray[1]); } // make sure that you close the results after enumerating volumes, bins, or assets. // if you don't, you will run out of database selectors! mediaMgr.CloseResults(cookie);
Return Value
number of assets: 5
Clip: edl/cmf//SUMMIT_1/V:/default/Clip1 Length: 00:00:12,18
Clip: edl/cmf//SUMMIT_1/V:/default/Clip2 Length: 00:00:01,07
Clip: edl/cmf//SUMMIT_1/V:/default/Clip Length: 00:00:30,00
Clip: edl/cmf//SUMMIT_1/V:/default/alpha/K2_525_DV25_colorbar Length: 00:00:05,00
Clip: edl/cmf//SUMMIT_1/V:/default/alpha/beta/K2_625_DV25_colorbar Length: 00:00:05.00