Migrating to the Character Generator filter

From AVObjects Knowledge Base
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
This entry provides an overview of the initiatives required to successfully migrate to our new [[Character Generator DirectShow Filter|Character Generator]] from the existing Text & Graphics Overlay and Flash Overlay filters.
+
This entry provides descriptions of the initiatives required to successfully migrate to our new [[Character Generator DirectShow Filter|Character Generator]] from the existing Text & Graphics Overlay and Flash Overlay filters.
  
==Overview==
+
===Why Migrate?===
  
 
The Character Generator filter was developed in response to customers requesting to provide a unified interface for text, graphic, image and Flash items management and to be able to define Z-order for each item. Below is some information that would help you understand how to migrate to the new filter.
 
The Character Generator filter was developed in response to customers requesting to provide a unified interface for text, graphic, image and Flash items management and to be able to define Z-order for each item. Below is some information that would help you understand how to migrate to the new filter.
Line 7: Line 7:
 
===Managing Overlay Items===
 
===Managing Overlay Items===
  
All objects can be added by one simple algorythm:
+
All items can be added via a simple algorythm:
  
# Add new item with ''m_objCarGen.AddNewItem()'' method.  
+
# Add a new item with ''m_objCarGen.AddNewItem()'' method.  
 
# Update it's properties by ''m_objCarGen.SetItemBaseProps()'' method.  
 
# Update it's properties by ''m_objCarGen.SetItemBaseProps()'' method.  
 
To change the properties you can use ''MLCHARGENLib.CG_ITEM_PROPS'' stucture that contains universal properties for each overlay item (such as alpha, back color, position etc.).  
 
To change the properties you can use ''MLCHARGENLib.CG_ITEM_PROPS'' stucture that contains universal properties for each overlay item (such as alpha, back color, position etc.).  

Revision as of 18:39, 7 May 2010

This entry provides descriptions of the initiatives required to successfully migrate to our new Character Generator from the existing Text & Graphics Overlay and Flash Overlay filters.

Why Migrate?

The Character Generator filter was developed in response to customers requesting to provide a unified interface for text, graphic, image and Flash items management and to be able to define Z-order for each item. Below is some information that would help you understand how to migrate to the new filter.

Managing Overlay Items

All items can be added via a simple algorythm:

  1. Add a new item with m_objCarGen.AddNewItem() method.
  2. Update it's properties by m_objCarGen.SetItemBaseProps() method.

To change the properties you can use MLCHARGENLib.CG_ITEM_PROPS stucture that contains universal properties for each overlay item (such as alpha, back color, position etc.).

Creating Graphic items

  • Replace PICTUREMIXERLib.CoPictureMixerClass with MLCHARGENLib.CoMLCharGenClass.
  • Replace the old m_objTnGOverlay.AddImage2 method with new m_objCarGen.AddNewItem() method.
  • If you need to change basic properties, you can create additional MLCHARGENLib.CG_ITEM_PROPS structure and set this properties to your graphic item by m_objCarGen.SetItemBaseProps() method.

Creating Flash items

  • Replace MLFLASHOVERLAYLib.CoFlashOverlayClass with MLCHARGENLib.CoMLCharGenClass.
  • Replace the previous m_pFlashOverlay.AddNewItem method with new m_objCarGen.AddNewItem() method.
  • If you need to change basic properties, you can create additional MLCHARGENLib.CG_ITEM_PROPS structure and set this properties to your flash item by m_objCarGen.SetItemBaseProps() method.

Creating Text items

  • Replace PICTUREMIXERLib.CoPictureMixerClass with MLCHARGENLib.CoMLCharGenClass.
  • Replace the previous PICTUREMIXERLib.OVERLAY_PROPS structure. To simplify the CG usage, single properties structure is replaced with 2 new structures - MLCHARGENLib.CG_TEXT_PROPS and MLCHARGENLib.CG_ITEM_PROPS.

MLCHARGENLib.CG_TEXT_PROPS contains text-specific properties (such as font type, font sixe, text style etc.) that are not included in MLCHARGENLib.CG_ITEM_PROPS structure.

  • Replace the previous m_objTnGOverlay.AddOutlinedText method with new m_objCarGen.AddNewTextItem call. Please note that it uses a MLCHARGENLib.CG_TEXT_PROPS stucture.

If you also need to change basic properties, you can create additional MLCHARGENLib.CG_ITEM_PROPS structure and set this properties of your text item by m_objCarGen.SetItemBaseProps() method.

Please note that every Character Generator item has its own string identifier and can be accessed through it. It is strongly recommended to give intelligent identifiers to the items, like variables names (for example "LogoPic", "ScrollingMsg", etc.). It will help you to access the items easily in advanced Chararacter Generator features usage.

Personal tools