throbber
CEnumPins Class
`
`Page 3 of7
`
`Return Values
`
`No return value.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 111j Topic Contents
`
`l@i§il!MM
`
`CEnumPins: :Clone
`
`CEnumPins Class
`
`Makes a copy of the enumerator. This allows the calling application to retain two positions in
`the list of pins.
`
`HRESULT Clone(
`IEnumPins ** ppEnum
`);
`
`Parameters
`
`ppEnum
`New enumerator that is a copy of this enumerator.
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`This member function implements the IEnumPins: :Clone method.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M 11!.l:.!j Topic Contents
`
`l@i§il!MM
`
`CEnumPins::Next
`
`CEnumPins Class
`
`Places pointers to IPin interfaces into the specified array.
`
`1486
`
`

`
`CEnumPins Class
`
`Page 4 of7
`
`HRESULT Next(
`ULONG cPins,
`I Pin * * ppPins,
`ULONG * pcFetched
`);
`
`Parameters
`
`cPins
`
`Number of pins to place.
`ppPins
`Array in which to place the interface pointers.
`pcFetched
`Actual number of pins placed in the array.
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`This member function implements the IEnumPins:: Next method. The derived class is
`responsible for implementing CBaseFilter: :GetPin, which this member function calls to retrieve
`the next pin.
`
`Because this member function returns one or more interfaces that have had their reference
`counts incremented, the caller of this member function must be sure to release the interfaces
`by calling !Unknown: :Release on the interfaces when done with them.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQi@[.jjj,M l!i.! 111j Topic Contents
`
`l@i§il!MM
`
`MQi§i[.jjj,M 1 !1·Hj Topic Contents
`
`l@IJll!MM
`
`CEnumPins: :Querylnterface
`
`CEnumPins Class
`
`Retrieves a pointer to a specified interface on a component to which a client currently holds an
`interface pointer. This method must call !Unknown: :AddRef on the pointer it returns.
`
`HRESULT Queryinterface(
`REFIID iid,
`void * * ppvObject
`);
`
`1487
`
`

`
`CEnumPins Class
`
`Parameters
`
`Page 5 of7
`
`iid
`
`Specifies the IID of the interface being requested.
`ppvObject
`Receives a pointer to an interface pointer to the object on return. If the interface
`specified in iid is not supported by the object, ppvObject is set to NULL.
`
`Return Values
`
`Returns S_OK if the interface is supported, S_FALSE if not.
`
`Remarks
`
`This member function implements the IUnknown: :Queryinterface method and passes out
`references to the IEnumPins interface.
`
`© 1997 Microsoft Corporation . All rights reserved . Terms of Use.
`
`•;<MM+' •11·!:.!¥ Topic Contents lmli§lll¥M
`
`CEnumPins::Release
`
`CEnumPins Class
`
`Decrements the reference count for the calling interface on an object. If the reference count on
`the object falls to zero, the object is freed from memory.
`
`ULONG Release(void);
`
`Return Values
`
`Returns the resulting value of the reference count, which is used for diagnostic/testing
`purposes only. If you need to know that resources have been freed, use an interface with
`higher-level semantics.
`
`Remarks
`
`This member function implements the IUnknown:: Release method.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQi§1[.]+• 1 11·1::'¥ Topic Contents
`
`lfflj[§ill¥M
`
`1488
`
`

`
`CEnumPins Class
`
`Page 6 of7
`
`CEnumPins::Reset
`
`CEnumPins Class
`
`Resets the enumerator to the beginning so that the next call to the IEnumPins: :Next method
`will return, at a minimum, the first pin of the filter.
`
`HRESULT Reset(void);
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`This member function implements the IEnumPins:: Reset method.
`
`© 1997 Microsoft Corporation . All rights reserved. Terms of Use.
`
`•;<MM+' •11·!:.!¥ Topic Contents
`
`lmli§lllMM
`
`CEnumPins::Skip
`
`CEnumPins Class
`
`Skips the next specified number of pins.
`
`HRESULT Skip(
`ULONG cPins
`);
`
`Parameters
`
`cPins
`
`Number of pins to skip.
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`This member function implements the IEnumPins:: Skip method. This member function affects
`the next call to the IEnumPins:: Next method.
`
`© 1997 Microsoft Corooratjon . All rights reserved. Terms of Use.
`
`1489
`
`

`
`CEnumPins Class
`
`Page 7 of7
`
`1490
`
`

`
`CFactoryTemplate Class
`
`Page I of3
`
`e4140.111,e 1:1.11119 T op1c Contents
`
`i@IQilt§jM
`
`CFactoryTemplate Class
`
`( CFactoryTemplate
`
`)
`
`This class provides a template used by the default class factory code.
`
`Create one <::FactoryTemplate object in an array for every object class so that the default
`class factory code can create new instances.
`
`This class holds the name of the object, the object's class identifier (CLSID), and a pointer to
`the creation function for the corresponding object. Initialize one of these in an array called
`g Templates for each CLSID the application's dynamic-link library (DLL) supports. The creation
`function should take an LPUNKNOWN parameter and an HRESULT pointer and return an object
`derived from the CBaseObject class. Set the HRESULT to a failed value if there is any error in
`construction. An example declaration (from the Gargle sample filter) follows:
`
`fl list of class ids and creator functions for class factory
`CFact.oryTerrplat.e g_ Terrplat.es [2] = { { L"Gargle fi lt.er"
`&CLSID Gargle
`03argle::Create!nstance
`
`II CFact.oryTerrplat.e,rr
`II CFact.oryTerrplat.e,rr
`II CFact.oryTerrplat.e,rr
`NULL
`&sudGargle
`
`}
`{ L"Gargle fi lt.er propert.y page"
`&CLSID GargProp
`03argleProperties::Createinstance
`
`};
`int. g_cTerrplat.es = sizeof{g_Terrplat.es) I sizeof{g_Terrplat.es[O]J;
`
`i
`
`Note that the name of the object is strictly necessary only if you are using the
`DURegisterServer setup routine to implement self-registering of your filter. If you are not using
`this feature, you can set the first element of the gTemplates instance (m Name) to NULL or
`L .....
`
`Protecte<I Data Members
`Name
`Description
`m_ClsID
`Pointer to the CLSID of the object class.
`m_lpfnNew
`Pointer to a function that creates an instance of the object class.
`m_lpfnlnlt
`Pointer to a function that initializes a new instance of the object
`class.
`Name of the filter; required when using filter self-registration
`serviees.
`m_pAMovleSetup_Fllter Pointer to an AMOVIESETIJP FI! TER structure; required when
`using filter self-registration services.
`
`m_Name
`
`1491
`
`

`
`CFactoryTemplate Class
`
`Page 2 of3
`
`Member Functions
`Name
`Description
`Createlnstance Calls the object-creation function for the class.
`IsClassID
`Determines whether a CLSID matches this class template.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+;<§1[.]lj,i 111.],.[9 Topic Contents
`
`lfflj(§l 1!1¥1M
`
`+Qij[.jlj,M 111.11119 Topic Contents
`
`l@i§lllMM
`
`CFactoryTemplate: :Createlnsta nee
`
`CFactoryTemplate Class
`
`Calls the object-creation function for the class.
`
`CUnknown *Createlnstance(
`LPUNKNOWN pUnk,
`HRESULT *phr
`);
`
`Parameters
`
`pUnk
`
`phr
`
`Pointer to the IUnknown interface.
`
`Pointer to the HRESULT value into which to place resulting information.
`
`Return Values
`
`Returns an instance of the class object.
`
`Remarks
`
`The implementer of the class code registered using this factory template class is responsible
`for providing the code that creates an instance of the class object and assigning it to the
`m lpfnNew data member. This member function simply calls that function and returns a new
`object of that type.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+Q<@[.jlj,M 111.11119 Topic Contents
`
`l@i§lllMM
`
`1492
`
`

`
`CFactoryTemplate Class
`
`Page 3of3
`
`CFactoryTemplate: :lsClasslD
`
`CFactoryTemplate Class
`
`Determines if the class identifier (CLSID) passed matches the CLSID assigned to this class
`template.
`
`BOOL lsClasslD(
`REFCLSID rclsid
`);
`
`Parameters
`
`rclsid
`CLSID being tested.
`
`Return Values
`
`Returns TRUE if the CLSIDs are the same; otherwise, returns FALSE.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`1493
`
`

`
`CGenericList Class
`
`Page 1 of 10
`
`w4140.111,e 1:1.11119 T op1c Contents
`
`i@IQilt@M
`
`CGenericList Class
`
`CBaseObject
`
`CGenericlist
`
`CGenerlcllst is a template class that allows for a type-specific implementation of a list. It is
`derived from caase! ist and uses that class's typeless implementation. The constructor creates
`a CBaseUst object, and au CGenericUst member functions ca!! CBasellst member functions
`but provide type-checking dependent on the template.
`
`Member Functions
`Name
`Description
`Add After
`Inserts a node or list of nodes after the specified node.
`Add Before
`Inserts a node or list of nodes before the specified node.
`Add Head
`Inserts a node or list of nodes at the front of the list.
`AddTai!
`Appends a node or list of nodes to the end of the list.
`Constructs a CGenerlcllst object.
`CGenericUst
`Returns the first position that contains the specified object.
`f.iD.!J.
`Returns the object at the specified position.
`~
`GetCount
`Returns the number of objects (object count) in the list.
`GetHead
`Returns the object at the head of the list.
`GetHeadPosition Returns a cursor identifying the first element of the liSt.
`Get Next
`Returns the specified object and update position.
`GetTai!Position Returns a cursor identifying the last element of the list.
`Remove
`Removes the specified node from the list.
`RemoveHead
`Removes the first node in the liSt.
`RemoveTai!
`Removes the last node in the list.
`
`+;•; 11.111,+ 111.1111s T op1c Contents
`Topic Contents '@'!'''""
`
`l@i§Mlt§M
`
`CGenericList: :AddAfter
`
`1494
`
`

`
`CGenericList Class
`
`CGenericlist Class
`
`Inserts a node or list of nodes after the specified node.
`
`Page 2of10
`
`POSITION AddAfter(
`POSITION p,
`OBJECT * pObj
`);
`BOOL AddAfter(
`POSITION pos,
`CGenericlist<OBJECT> *pList
`);
`
`Parameters
`
`pos
`
`pObj
`
`pList
`
`Position after which to add the node or list of nodes.
`
`Pointer to the object to add.
`
`Pointer to the list of objects to add.
`
`Return Values
`
`Returns the position of the inserted object in the case of single-object insertion. For list
`insertion, returns TRUE if successful; otherwise, returns FALSE.
`
`Remarks
`
`This member function calls the CBaselist: :AddAfter member function when passed a list of
`nodes. CGenericlist::AddAfter calls the CBaselist: :AddAfterI member function when passed
`a single node.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 111j
`
`Topic Contents
`
`l@i§il!MM
`
`MQ<§i[.jlj,M lh.l:.!j
`
`Topic Contents
`
`i@faii!MM
`
`CGenericlist: :Add Before
`
`CGenericlist Class
`
`Inserts a node or list of nodes before the specified node.
`
`POSITION AddBefore(
`POSITION p,
`OBJECT * pObj
`
`1495
`
`

`
`CGenericList Class
`
`Page 3of10
`
`);
`BOOL AddBefore(
`POSITION pos,
`CGenericlist<OBJECT> *pList
`);
`
`Parameters
`
`pos
`
`pObj
`
`pList
`
`Position before which to add the node or list of nodes.
`
`Pointer to the object to add.
`
`Pointer to the list of objects to add.
`
`Return Values
`
`Returns the position of the inserted object in the case of single-object insertion. For list
`insertion, returns TRUE if successful; otherwise, returns FALSE.
`
`Remarks
`
`This member function calls the CBaseList: :AddBefore member function when passed a list of
`nodes. CGenericlist::AddBefore calls the CBaseList: :AddBeforeI member function when
`passed a single node.
`
`© 1997 Microsoft Corporation . All rights reserved . Terms of Use.
`
`•;<MM+' 111.],.[9
`
`Topic Contents
`
`lmli§lllMM
`
`8 4'41M+• 111.q9
`
`Topic Contents 1@!§111$8
`
`CGenericlist: :Add Head
`
`CGenericList Class
`
`Inserts a node or list of nodes at the front of the list.
`
`POSITION AddHead(
`OBJECT * pObj
`);
`BOOL Add Head (
`CGenericlist<OBJECT> *pList
`);
`
`Parameters
`
`pObj
`
`1496
`
`

`
`CGenericList Class
`
`Page 4of10
`
`Pointer to the object to add.
`
`pList
`
`Pointer to the list of objects to add.
`
`Return Values
`
`Returns the new head position, or NULL if unsuccessful in the case of single-node additions.
`For list insertions, returns TRUE if successful; otherwise, returns FALSE.
`
`Remarks
`
`This member function calls the CBaseList: :AddHead member function when passed a list of
`nodes. CGenericlist::AddHead calls the CBaseList: :AddHeadI member function when passed
`a single node.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+Qi§1H++ 1 !!·HM
`
`Topic Contents
`
`ifflj[§ii!¥M
`
`CGenericlist: :AddTail
`
`CGenericList Class
`
`Appends a node or list of nodes to the end of the list.
`
`POSITION AddTail (
`OBJECT * pObj
`);
`BOOL AddTail(
`CGenericlist<OBJECT> *pList
`);
`
`Parameters
`
`pObj
`
`pList
`
`Pointer to the object to add.
`
`Pointer to the list of objects to add.
`
`Return Values
`
`Returns the new tail position, or NULL if unsuccessful in the case of single-node insertions. For
`list insertions, returns TRUE if successful; otherwise, returns FALSE.
`
`Remarks
`
`This member function calls the CBaseList: :AddTail member function when passed a list of
`nodes. CGenericlist::AddTail calls the CBaseList: :AddTailI member function when passed a
`
`1497
`
`

`
`CGenericList Class
`
`single node.
`
`Page 5of10
`
`© 1997 Microsoft Corporation . All rights reserved . Terms of Use.
`
`MQl§1[.jjj,M Ill.HS
`
`Topic Contents
`
`lmll§lllMM
`
`CGenericlist: :CGenericlist
`
`CGenericList Class
`
`Constructs a CGenericList object.
`
`CGenericlist(
`TCHAR *pName,
`INT iitems,
`BOOL block,
`BOOL bA/ert
`);
`
`CGenericlist(
`TCHAR *pName
`);
`
`Parameters
`
`pName
`Name of the list.
`iitems
`Number of items in the list.
`block
`TRUE if the list is locked and FALSE otherwise. This parameter defaults to TRUE.
`bAlert
`Not used.
`
`Return Values
`
`No return value.
`
`Remarks
`
`This constructor calls the CBaseList constructor.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQ1§1[.jjj,M '!!·HM Topic Contents
`
`l@i§i MUMM
`
`•;<@[.]jj,i 1!1.l:.1¥ Topic Contents
`
`l@i§lllMM
`
`1498
`
`

`
`CGenericList Class
`
`Page 6of10
`
`CGenericlist:: Find
`
`CGenericList Class
`
`Retrieves the first position that contains the specified object.
`
`POSITION Find(
`OBJECT * pObj
`);
`
`Parameters
`
`pObj
`
`Pointer to the object to find.
`
`Return Values
`
`Returns a position cursor.
`
`Remarks
`
`This member function calls the CBaseList:: FindI member function.
`
`© 1997 Microsoft Corooratjon . All rights reserved. Terms of Use.
`
`MQ<§i[.jjj,M MB.HS
`
`Topic Contents
`
`i@faiilMM
`
`CGenericlist: :Get
`
`CGenericList Class
`
`Retrieves the object at the specified position.
`
`OBJECT *Get(
`POSITION pos
`);
`
`Parameters
`
`pos
`
`Position in the list from which to retrieve the object.
`
`Return Values
`
`1499
`
`

`
`CGenericList Class
`
`Page 7of10
`
`Returns a pointer to an object.
`
`Remarks
`
`This member function calls the CBaselist: :Getl member function.
`
`© 1997 Microsoft Corporation . All rights reserved . Terms of Use.
`
`w QIM [.] 11,1 Ill.HM
`
`Topic Contents
`
`l@fa* 1gnw
`
`CGenericlist: :GetCou nt
`
`CGenericlist Class
`
`Retrieves the number of objects (object count) in the list.
`
`int GetCount( );
`
`Return Values
`
`Returns the value of m Count.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M 111.11119
`
`Topic Contents
`
`l@fail!MM
`
`CGenericlist: :GetHead
`
`CGenericlist Class
`
`Retrieves the object at the head of the list.
`
`OBJECT Get Head( ) ;
`
`Return Values
`
`Returns the head of the list by calling CGenericlist: :GetHeadPosition.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use .
`
`• QIM [.] +• I !!·HM Topic Contents
`
`l@fail!MM
`
`1500
`
`

`
`CGenericList Class
`
`Page 8of10
`
`CGenericlist: :GetHead Position
`
`CGenericList Class
`
`Retrieves a cursor identifying the first element of the list.
`
`POSITION GetHeadPosition( );
`
`Return Values
`
`Returns the position cursor held by m pFirst.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 11ij
`
`Topic Contents
`
`l@i§il!MM
`
`CGenericlist: :GetNext
`
`CGenericList Class
`
`Retrieves the specified object and update position.
`
`OBJECT *GetNext(
`POSITION& rp
`);
`
`Parameters
`
`rp
`
`Returned pointer to the next object.
`
`Return Values
`
`Returns a pointer to an object at the next position.
`
`Remarks
`
`This member function calls the CBaseList: :GetNextI member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 11ij Topic Contents
`
`l@i§il!MM
`
`1501
`
`

`
`CGenericList Class
`
`Page 9of10
`
`CGenericlist: :GetTa i I Position
`
`CGenericList Class
`
`Retrieves a cursor identifying the last element of the list.
`
`POSITION GetTailPosition( );
`
`Return Values
`
`Returns the position cursor held by m plast.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 11ij
`
`Topic Contents
`
`l@i§il!MM
`
`CGenericlist:: Remove
`
`CGenericList Class
`
`Removes the specified node from the list.
`
`OBJECT *Remove(
`POSITION pos
`);
`
`Parameters
`
`pos
`
`Position in the list of nodes to remove.
`
`Return Values
`
`Returns the pointer to the object that was removed.
`
`Remarks
`
`This member function calls the CBaseList:: RemoveI member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQij[.jlj,M l!i.! 11ij Topic Contents
`
`l@i§il!MM
`
`1502
`
`

`
`CGenericList Class
`
`Page 10of10
`
`CGenericlist:: RemoveHead
`
`CGenericList Class
`
`Removes the first node in the list.
`
`OBJECT *RemoveHead( );
`
`Return Values
`
`Returns the pointer to the object that was removed.
`
`Remarks
`
`This member function calls the CBaseList:: RemoveHeadI member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+Q'41!.l+' +11.q9
`
`Topic Contents
`
`l@!§il!MM
`
`CGenericlist:: Remove Tai I
`
`CGenericList Class
`
`Removes the last node in the list.
`
`OBJECT *RemoveTail( );
`
`Return Values
`
`Returns the pointer to the object that was removed.
`
`Remarks
`
`This member function calls the CBaseList:: RemoveTailI member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`1503
`
`

`
`CGuidNameList Class
`
`Page 1 of2
`
`w4140.111,e 1:1.11119 T op1c Contents
`
`i@IQilt@M
`
`CGuidNameList Class
`
`( CGuidNamelist
`
`)
`
`This class implements an array of globally unique identifier (m) names base<J on the
`predefined names of GUIDs that come with Microsoft® DirectShow"'. (This might or might not
`inclu<Je user-defined GUIDs.) To get the name used for a GUID, look it up in the GuidNames
`array:
`
`int MyFunc {AM MEDIA TYPE mt)
`-
`-
`{
`DbgLog{{I..CG TRACE, 2, TEXT{"MyFunc: Type :\"s, Subtype :\"s"),
`GuidNames[mt,majortypeJ,
`GuidNames [mt, subtype]
`JJ;
`
`Operators
`Description
`Name
`operatorr J Allows access to the m
`
`name for a given GUID.
`
`Global Data
`Description
`Name
`GuldNaniesArray of CGuidNameList objects describing the predefined names of~ that
`come with DirectShow. (This might or might not include user-defined GUIDs.)
`
`+;14 "·II' a e11.1::•S
`
`Topic Contents i@i§i+t§M
`
`CGuidNameList::operator[ ]
`
`CG11idName! ist C!as.s
`
`Allows access to them name for a given GUID.
`
`TCHAR •operator( j(
`Const GUID& gui<f
`);
`
`1504
`
`

`
`CGuidNameList Class
`
`Page 2 of2
`
`Parameters
`
`guid
`
`Globally unique identifier.
`
`Return Values
`
`Returns the GUID name for the given entry in a GUID name list.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`1505
`
`

`
`CimageAllocator Class
`
`Page 1 of9
`
`e4140.111,e 1:1.11119 T op1c Contents
`
`i@IQilt§jM
`
`CimageAllocator Class
`
`CBaseObject
`
`CCritSec
`
`CBaseAllocator
`
`ClmageAllocator
`
`The (;ImageAllo<:atot class is inherited from the CBaseAllocator class, which allocates sample
`buffers in shared memory. The number, size, and alignment of blocks are determined when the
`connected output pin calls ClmageAllocator::SetProperties (which implements
`lMemAllocator: :SetProperties}. The shared memory blocks are used in subsequent calls to the
`Microsoft® Win32® CreateDIBSectjon function. The output pin can then fill these buffers with
`data, and the buffers wm be handed to GDI using BitBlt.
`
`Protected Data Members
`Name
`Description
`m_pFiltet
`Owning filter of this object.
`m_pMediaType Current media type format.
`
`Membet Functions
`Name
`Description
`~ Allocates the samples through CreateDIBSection.
`CheckSi:zes
`Checks the allocator requirements.
`ClmageAllocator Constructs a ClmageAllocator object.
`CreateDIB
`Creates a device-independent bitmap (DIB).
`~ Releases and deletes the resources for any samples allocated.
`NotifVMediaTupe Notifies the allocator of the agreed media type.
`
`Ovettidable Member Functions
`Name
`Desctiption
`CreatelmageSample Creates a sample.
`
`Implemented INonDelegatingUnknown Methods
`
`1506
`
`

`
`CimageAllocator Class
`
`Page 2 of9
`
`Description
`Name
`NonDelegatingAddRef Increments the reference count for an interface.
`NonDelegatingRelease Decrements the reference count for an interface.
`
`Implemented IMemAllocator Methods
`Name
`Description
`SetProoerties Specifies the buffering requirements for the allocator.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+;<§1[.]jj,i 111.],.[9 Topic Contents
`
`lfflj(§l l!l¥1M
`
`MQl@[.jjj,M 111.l:.!9 Topic Contents
`
`l@i§lllMM
`
`CimageAllocator: :Alloc
`
`ClmageAllocator Class
`
`Creates image samples based around CreateDIBSection.
`
`HRESULT Alloc( );
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`A filter defines the size and number of buffers required through the
`ClmageAllocator: :SetProperties member function. The base allocator class that this allocator
`derives from calls this internal virtual member function when it wants the memory actually
`committed. For each sample it wants to create, this allocator will create a DIBSECTION object
`for it (through the Microsoft Win32 CreateDIBSection function). With the information it gets
`from that call, it will call the virtual CreatelmageSample member function, passing in the
`buffer pointer and length. After successfully creating an image sample, it will then initialize it
`with the DIBSECTION structure, among other information.
`
`This is a protected member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+Qi§1H+1 1 11·1::'¥ Topic Contents
`
`l@i§lllMM
`
`1507
`
`

`
`CimageAllocator Class
`
`Page 3 of9
`
`CimageAllocator: :CheckSizes
`
`ClmageAllocator Class
`
`Internal member function that checks the required buffering properties.
`
`HRESULT CheckSizes(
`ALLOCATOR_PROPE RTIES *pRequest
`);
`
`Parameters
`
`pRequest
`Requested a I locator properties.
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`The image allocator uses the Microsoft Win32 CreateDIBSection function to allocate its
`samples. That function accepts as input a pointer to a BITMAPINFO structure that describes the
`bitmap required. Because the size of the bitmap is therefore fixed according to the
`BITMAPINFO structure for the video, requests to the allocator for a buffer larger than that
`will not be granted. This member function, therefore, adjusts the requested size so that it is no
`larger than the size of the bitmap. If the requested size is smaller than the bitmap size, it
`returns E_INVALIDARG.
`
`This is a protected member function.
`
`© 1997 Microsoft Corooratjon . All rights reserved. Terms of Use.
`
`MQ<§i[.jjj,M MB.HS Topic Contents
`
`i@faiilMM
`
`CimageAI locator: :CimageAI locator
`
`CimageAllocator Class
`
`Constructs a CimageAllocator object.
`
`CimageAllocator(
`CBaseFilter *pFilter,
`TCHAR *pName,
`HRESULT *phr
`);
`
`1508
`
`

`
`CimageAllocator Class
`
`Page 4 of9
`
`Parameters
`
`pFilter
`Owning filter object.
`pName
`Debug-only string description.
`
`phr
`
`COM return code.
`
`Return Values
`
`No return value.
`
`Remarks
`
`The ClmageAllocator, CimageSample, and CDrawimage classes are all tightly associated. The
`buffers that the image allocator creates are made using the Microsoft Win32 CreateDIBSection
`function. The allocator then creates its own samples (based on the CimageSample class). The
`image samples are initialized with the buffer pointer and its length. The sample is also passed
`in a structure (a DIBDATA structure) that holds a number of pieces of information obtained
`from the CreateDIBSection call.
`
`These samples can then be passed to the draw object. The draw object knows the private
`format of the samples and how to get back the DIBDATA structure from them. Once it has
`obtained that information, it can pass a bitmap handle that is stored in the DIBDATA
`structure down into GDI when it draws the image that the sample contains. By using the
`bitmap handle from the sample in the drawing, rather than just the buffer pointer (which is the
`alternative if the sample is not a CimageSample), it gets a modest performance improvement.
`
`This is a protected member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQl@[.jlj,M l!i.! 111j Topic Contents
`
`l@i§lllMM
`
`M QiM [.] ij,+ I !I.HJ Topic Contents
`
`'®'*' 1gnw
`
`ClmageAllocator: :CreateDIB
`
`CimageAllocator Class
`
`Calls the Win32 CreateDIBSection function to create a device-independent bitmap (DIB).
`
`HRESULT CreateDIB(
`LONG InSize,
`DIBDATA &DibData
`);
`
`1509
`
`

`
`CimageAllocator Class
`
`Page 5of9
`
`Parameters
`
`In Size
`Size of the bitmap required.
`DibData
`Structure to fill out with details.
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`This is a protected member function.
`
`© 1997 Microsoft Corooratjon . All rights reserved. Terms of Use.
`
`MQ<§i[.jjj,M MB.HS Topic Contents
`
`i@faiilMM
`
`ClmageAllocator: :CreatelmageSa m pie
`
`ClmaqeAllocator Class
`
`Creates a ClmaqeSample object.
`
`virtual CimageSample *CreateimageSample(
`LPBYTE pData,
`LONG Length
`);
`
`Parameters
`
`pData
`Pointer to the data buffer the sample looks after.
`Length
`Associated length of the buffer.
`
`Return Values
`
`Returns a new ClmaqeSamole sample object.
`
`Remarks
`
`This virtual member function creates the actual sample for the allocator. It is passed the data
`buffer and its length to store. When the sample is subsequently asked for the buffer (through
`IMediaSample: :GetPointer), this is the pointer it will return. The primary reason for having this
`split out into a separate virtual member function is so that derived classes from
`
`1510
`
`

`
`CimageAllocator Class
`
`Page 6 of9
`
`ClmageAllocator can also derive classes from ClmageSample and have a place to create them.
`
`This is a protected member function.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+;<§1[.]lj,i 111.],.[9 Topic Contents
`
`lfflj(§l l!l¥1M
`
`ClmageAllocator::Free
`
`ClmageAllocator Class
`
`Deletes the samples and frees their resources.
`
`void Free( );
`
`Return Values
`
`No return value.
`
`Remarks
`
`The base allocator calls this internal virtual member function when it wants to decommit the
`allocator.
`
`This is a protected member function.
`
`© 1997 Microsoft Corporation . All rights reserved. Terms of Use.
`
`+Qi§i!.l+1 1 !1·HM Topic Contents
`
`l@i§lllMM
`
`ClmageAllocator::NonDelegatingAddRef
`
`ClmageAllocator Class
`
`Increments the reference count for the owning filter.
`
`HRESULT NonDelegatingAddRef( );
`
`Return Values
`
`Returns an HRESULT value.
`
`1511
`
`

`
`CimageAllocator Class
`
`Page 7 of9
`
`Remarks
`
`An allocator is conceptually a separate object from the filter that creates it. However, the
`image allocator is dependent on the filter that created it to supply it with additional information
`(such as the media type that it connected with). Therefore, although the allocator looks after
`its own NonDelegatingQueryinterface function, it delegates all reference counting to the
`owning filter. So, when the allocator is subject to its NonDelegatingAddRef function, for
`example, it is the filter that owns the allocator that will actually be reference counted.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`MQi@[.jlj,M M!i.!111j Topic Contents
`
`l@i§il!MM
`
`ClmageAllocator::NonDelegatingRelease
`
`ClmageAllocator Class
`
`Decrements the reference count for the owning filter.
`
`HRESULT NonDelegatingRelease( );
`
`Return Values
`
`Returns an HRESULT value.
`
`Remarks
`
`An allocator is conceptually a separate object from the filter that creates it. However, the
`image allocator is dependent on the filter that created it to supply it with additional information
`(such as the media type that it connected with). Therefore, although the allocator looks after
`its own NonDelegatingQueryinterface function, it delegates all reference counting to the
`owning filter. So when the allocator is released, for example, it is the filter that owns the
`allocator that will actually be released by the NonDelegatingRelease function.
`
`© 1997 Microsoft Corporation . All rights reserved. Terms of Use.
`
`MQi§i[.jlj,M 1 !1·Hj Topic Contents •@m•11mw
`
`ClmageAllocator:: NotifyMediaType
`
`ClmageAllocator Class
`
`Passes the media type from a filter to the allocator.
`
`1512
`
`

`
`CimageAllocator Class
`
`Page 8 of9
`
`void NotifyMediaType(
`CMediaType *pMediaType
`);
`
`Parameters
`
`pMediaType
`Media type the filter established.
`
`Return Values
`
`No return value.
`
`Remarks
`
`The buffers that the image allocator creates are based around CreateDIBSection, which must
`be told what sort of bitmap the filter requires it to create. The filter does this by calling this
`member function on the allocator. A filter will usually call this member function after agreeing
`on a media type during a pin connection. The media type passed to this member function is a
`pointer; the allocator stores this pointer (not a copy) of the media type it points to (for
`performance reasons, copying media types is relatively slow). Therefore, the filter that calls
`this member function should ensure that the media type is always valid until the media type is
`next set on the allocator (or is called with a NULL type).
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`+Q'41!.l+' +11.q9
`
`Topic Contents
`
`l@!§il!MM
`
`ClmageAllocator: :SetProperties
`
`ClmageAllocator Class
`
`Determines the size, number, and alignment of blocks.
`
`HRESULT SetProperties(
`ALLOCATOR_PROPERTIES * pRequest,
`ALLOCATOR_PROPERTIES * pActual
`);
`
`Parameters
`
`pRequest
`Requested a I locator properties.
`pActual
`Allocator properties actually set.
`
`Return Values
`
`1513
`
`

`
`CimageAllocator Class
`
`Page 9 of9
`
`Returns an HRESULT value.
`
`Remarks
`
`The pRequest parameter is filled in by the caller with the requested values for the count,
`number, and alignment as specified by the ALLOCATOR PROPERTIES structure. The pActual
`parameter is filled in by the allocator with the closest values that it can provide for the
`request. This member function cannot be called unless the allocator has been decommitted by
`using the !MemAllocator:: Decommit method.
`
`© 1997 Microsoft Corporation. All rights reserved. Terms of Use.
`
`1514
`
`

`
`CimageDisplay Class
`
`Page 1of11
`
`e4140.111,e 1:1.11119 T op1c Contents
`
`i@IQilt§jM
`
`CimageDisplay Class
`
`CCritSec
`
`ClmageDisplay
`
`This class initializes itself with a display format so that other objects can query or reset the
`display type. It also provides member functions to check display formats and accept only those
`video formats that can be efficiently rendered by using GDI calls.
`
`Protected Data Members
`Name
`Des<:riptlon
`m_DisplayVIDEOINFOHEADER structure corresponding to the current device display type.
`
`CimageDisplay
`Co1 mt Prefix Bits
`Co! mt Set Bits
`GetBitMasks
`
`Member Functions
`Des<:riptlon
`Name
`Checks that the bit fields on a VIDEOINFOHEADER structure are correct.
`CheckBitfields
`CheckHeaderValidity Determines if a BITMAPINFOH EADER structure is valid.
`CheckMediaTupe
`Determines if the filter can support the media type proposed by the
`output pin.
`Checi.:pa!etteHeader Determines if the palette on a VIDEOINEOHEADER structure is correct.
`CheckVideoTyoo
`Compares a video type to determine if it is compatible with the current
`display mode.
`Constructs a CimageDisplay object.
`Counts the number of prefix bits.
`Counts the total number of bits set in a field.
`Retrieves a set of color element bitmasks for the supplied
`VIDEOINFOHEADER structure.
`Retrieves a set of individual color element masks.
`Retrieves the bit depth of the current display mode.
`Retrieves a VIDEOINFOHEADER structure representing the current
`display mode.
`Determines if the display uses a palette.
`Updates the CimageDisplay object with the current display type.
`Updates the VIDEOINFOHEADER structure to remove implicit
`assumptions.
`
`GetColourMask
`Get Display Depth
`Get Display format
`
`IsPa!ettized
`RefreshDisplayTupe
`UOOateformat
`
`MAI§ "·ii'·' +:1.1 .. 19 T op1c Contents
`
`i@i§Mit§M
`
`1515
`
`

`
`CimageDisplay Class
`
`Page 2of11
`
`+Qi§1[.]++ 1 !!·HM Topic Contents
`
`i@l§ii!MM
`
`ClmageDisplay: :CheckBitFields
`
`ClmageDisplay Class
`
`Checks that the bit fields in the VIDEOINFOHEADER structure are correct.
`
`BOOL CheckBitFields

This document is available on Docket Alarm but you must sign up to view it.


Or .

Accessing this document will incur an additional charge of $.

After purchase, you can access this document again without charge.

Accept $ Charge
throbber

Still Working On It

This document is taking longer than usual to download. This can happen if we need to contact the court directly to obtain the document and their servers are running slowly.

Give it another minute or two to complete, and then try the refresh button.

throbber

A few More Minutes ... Still Working

It can take up to 5 minutes for us to download a document if the court servers are running slowly.

Thank you for your continued patience.

This document could not be displayed.

We could not find this document within its docket. Please go back to the docket page and check the link. If that does not work, go back to the docket and refresh it to pull the newest information.

Your account does not support viewing this document.

You need a Paid Account to view this document. Click here to change your account type.

Your account does not support viewing this document.

Set your membership status to view this document.

With a Docket Alarm membership, you'll get a whole lot more, including:

  • Up-to-date information for this case.
  • Email alerts whenever there is an update.
  • Full text search for other cases.
  • Get email alerts whenever a new case matches your search.

Become a Member

One Moment Please

The filing “” is large (MB) and is being downloaded.

Please refresh this page in a few minutes to see if the filing has been downloaded. The filing will also be emailed to you when the download completes.

Your document is on its way!

If you do not receive the document in five minutes, contact support at support@docketalarm.com.

Sealed Document

We are unable to display this document, it may be under a court ordered seal.

If you have proper credentials to access the file, you may proceed directly to the court's system using your government issued username and password.


Access Government Site

We are redirecting you
to a mobile optimized page.





Document Unreadable or Corrupt

Refresh this Document
Go to the Docket

We are unable to display this document.

Refresh this Document
Go to the Docket