Bewerken

Delen via


KsMergeAutomationTables function (ks.h)

The KsMergeAutomationTables function merges two automation tables.

Syntax

KSDDKAPI NTSTATUS KsMergeAutomationTables(
  [out]          PKSAUTOMATION_TABLE *AutomationTableAB,
  [in, optional] PKSAUTOMATION_TABLE AutomationTableA,
  [in, optional] PKSAUTOMATION_TABLE AutomationTableB,
  [in, optional] KSOBJECT_BAG        Bag
);

Parameters

[out] AutomationTableAB

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

[in, optional] AutomationTableA

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.

[in, optional] AutomationTableB

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.

[in, optional] Bag

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

Requirement Value
Minimum supported client Available in Microsoft Windows XP and later operating systems and DirectX 8.0 and later DirectX versions.
Target Platform Universal
Header ks.h (include Ks.h)
Library Ks.lib
IRQL PASSIVE_LEVEL

See also

KsAddItemToObjectBag

KsCopyObjectBagItems

KsRemoveItemFromObjectBag