Expand Minimize

KsMergeAutomationTables function

The KsMergeAutomationTables function merges two automation tables.

Syntax


NTSTATUS KsMergeAutomationTables(
  _Out_     PKSAUTOMATION_TABLE *AutomationTableAB,
  _In_opt_  PKSAUTOMATION_TABLE AutomationTableA,
  _In_opt_  PKSAUTOMATION_TABLE AutomationTableB,
  _In_opt_  KSOBJECT_BAG Bag
);

Parameters

AutomationTableAB [out]

A pointer to the location at which a pointer to a KSAUTOMATION_TABLE is deposited. This structure is the resulting merged automation table.

AutomationTableA [in, optional]

A pointer to a KSAUTOMATION_TABLE structure representing the first of the two automation tables to merge. This table is the dominant table with respect to duplicate entries. If NULL, AutomationTableB is copied into AutomationTableAB and optionally placed in Bag.

AutomationTableB [in, optional]

A pointer to a KSAUTOMATION_TABLE structure representing the second of the two automation tables to merge. If NULL, AutomationTableA is copied into AutomationTableAB and optionally placed in Bag.

Bag [in, optional]

The newly created automation table is placed in this KSOBJECT_BAG (equivalent to type PVOID) for later clean up. This parameter is optional.

Return value

KsMergeAutomationTables returns STATUS_SUCCESS if the merge successfully completes. If unsuccessful, it returns an error code. The most frequent error code is STATUS_INSUFFICIENT_RESOURCES, which indicates that there are insufficient system resources to complete the merge.

Remarks

If both AutomationTableA and AutomationTableB are NULL, this routine performs no action and returns STATUS_SUCCESS.

The entries in AutomationTableA have priority in the merge. If there is an entry that appears in both AutomationTableA and AutomationTableB, the entry in AutomationTableA is the one that is placed into the merged table. The newly created automation table is placed in the requested object bag if one is provided.

If an input table is in an object bag at call-time, AVStream removes the table from the object bag before KsMergeAutomationTables returns.

If the Bag parameter is not NULL, the minidriver should take the mutex associated with the object bag prior to calling this routine. If the bag is associated with a pin or a filter, then the control mutex must be held. If the bag is associated with a filter factory or a device, then the device mutex should be held. For more information, see Mutexes in AVStream.

Also see Object Bags and Defining Automation Tables.

Requirements

Version

Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.

Header

Ks.h (include Ks.h)

Library

Ks.lib

IRQL

PASSIVE_LEVEL

See also

KsRemoveItemFromObjectBag
KsAddItemToObjectBag
KsCopyObjectBagItems

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft