Migrating to the Character Generator filter

From AVObjects Knowledge Base
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
The main idea of Character Generator filter is to create the universal overlay filter that will provide a generic interface to deal with Test Graphic and Flash items. So all objects can be added by one simple algorythm:
+
Character Generator filter was developed in response to customer requests to provide unified interfaces for Test, Graphic and Flash items management and to define Z-order for each item.  
 +
Please, find the instructions for customers wishing to migrate to Character Generator filter from Text & Graphics Overlay and Flash Overlay filters:
 +
 
 +
All objects can be added by one simple algorythm:
  
 
# Add new item with ''m_objCarGen.AddNewItem()'' method.  
 
# Add new item with ''m_objCarGen.AddNewItem()'' method.  
Line 5: Line 8:
 
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.).  
  
So the migration from separate filters to complex Character Generator is very simple task too:
+
'''Creating Graphic items'''
 
+
'''Graphic items creation.'''
+
  
* Replace the previous ''PICTUREMIXERLib.CoPictureMixerClass'' with ''MLCHARGENLib.CoMLCharGenClass''.
+
* Replace ''PICTUREMIXERLib.CoPictureMixerClass'' with ''MLCHARGENLib.CoMLCharGenClass''.
* Replace the previous ''m_objTnGOverlay.AddImage2'' method with new ''m_objCarGen.AddNewItem()'' method.
+
* 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.  
+
* 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.  
  
'''Flash items creation.'''
+
'''Creating Flash items'''
  
* Replace the previous ''MLFLASHOVERLAYLib.CoFlashOverlayClass'' with ''MLCHARGENLib.CoMLCharGenClass''.
+
* Replace ''MLFLASHOVERLAYLib.CoFlashOverlayClass'' with ''MLCHARGENLib.CoMLCharGenClass''.
 
* Replace the previous ''m_pFlashOverlay.AddNewItem'' method with new ''m_objCarGen.AddNewItem()'' method.
 
* 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.  
 
* 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.  
  
'''Text items creation:'''
+
'''Creating Text items'''
  
* Replace the previous ''PICTUREMIXERLib.CoPictureMixerClass'' with ''MLCHARGENLib.CoMLCharGenClass''.
+
* 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''.
 
* 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 does not included into ''MLCHARGENLib.CG_ITEM_PROPS'' structure.
+
''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 takes a ''MLCHARGENLib.CG_TEXT_PROPS'' stucture.  
+
* 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 need to change basic properties too, you can create additional MLCHARGENLib.CG_ITEM_PROPS structure and set this properties to your text item by ''m_objCarGen.SetItemBaseProps()'' method.
+
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 in Character Generator every item has it's own string identifier and can be accessed through it. It is strongly recommended to give intelligent identifiers to items, like  variables naming (for example "LogoPic", "ScrollingMsg", etc.). It will help you to access the items easily in advanced Chararacter Generator features usage.
+
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.

Revision as of 02:52, 6 May 2010

Character Generator filter was developed in response to customer requests to provide unified interfaces for Test, Graphic and Flash items management and to define Z-order for each item. Please, find the instructions for customers wishing to migrate to Character Generator filter from Text & Graphics Overlay and Flash Overlay filters:

All objects can be added by one simple algorythm:

  1. Add 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.