Re: How to register TypeLib for DirectShow filter?
- From: ziphnor@xxxxxxxxx
- Date: 13 Feb 2007 06:05:06 -0800
See the regtlib utility.
I caught a reference to that earlier, but didnt seem to be able to
find it anywhere even though i have Visual Studio installed. Do you
need to have VB support installed? (i only use C++ and C#).
I'm not familiar with DirectShow, but it wouldn't surprise me if you
discover that the interface you are interested in using in this manner
cannot be marshaled. Not all interfaces have marshaling support.
Uh oh. How can i tell if this is the case or not? The interface in
question is IBaseFilter. Its interface is defined in axcore.idl, i
have included the definition at the end of my post.
In case i cannot achieve thread marshalling is there then any way of
avoiding it? After all its an STA thread accessing a local MTA object
so i cant really see why its necessary? Is there any way to force a
direct call?
If i cant get this working the only solution seems to be to create the
filter in the STA thread and then use standard DLL exported methods in
place of the other interface thus circumventing the whole apartment
thing. But thats just too ugly to contemplate....
-------------------------------
IBaseFilter Definition:
[
AM_LOCAL
object,
uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
pointer_default(unique)
]
interface IBaseFilter : IMediaFilter {
// enumerate all the pins available on this filter
// allows enumeration of all pins only.
//
HRESULT EnumPins(
[out AM_ANNOTATION("__out")] IEnumPins ** ppEnum // enum
interface returned here
);
// Convert the external identifier of a pin to an IPin *
// This pin id is quite different from the pin Name in CreatePin.
// In CreatePin the Name is invented by the caller. In FindPin
the Id
// must have come from a previous call to IPin::QueryId. Whether
or not
// this operation would cause a pin to be created depends on the
filter
// design, but if called twice with the same id it should
certainly
// return the same pin both times.
HRESULT FindPin(
[in, string] LPCWSTR Id,
[out AM_ANNOTATION("__out")] IPin ** ppPin
);
// find out information about this filter
typedef struct _FilterInfo {
WCHAR achName[MAX_FILTER_NAME]; // maybe null if not part of graph
IFilterGraph * pGraph; // null if not part
of graph
} FILTER_INFO;
HRESULT QueryFilterInfo(
[out AM_ANNOTATION("__out")] FILTER_INFO * pInfo
);
// notify a filter that it has joined a filter graph. It is
permitted to
// refuse. The filter should addref and store this interface for
later use
// since it may need to notify events to this interface. A null
pointer indicates
// that the filter is no longer part of a graph.
HRESULT JoinFilterGraph(
[in AM_ANNOTATION("__in_opt")] IFilterGraph * pGraph,
[in, string AM_ANNOTATION("__in_opt")] LPCWSTR pName
);
// return a Vendor information string. Optional - may return
E_NOTIMPL.
// memory returned should be freed using CoTaskMemFree
HRESULT QueryVendorInfo(
[out, string AM_ANNOTATION("__out")] LPWSTR* pVendorInfo
);
}
.
- Follow-Ups:
- Re: How to register TypeLib for DirectShow filter?
- From: Igor Tandetnik
- Re: How to register TypeLib for DirectShow filter?
- References:
- How to register TypeLib for DirectShow filter?
- From: ziphnor
- Re: How to register TypeLib for DirectShow filter?
- From: Brian Muth
- How to register TypeLib for DirectShow filter?
- Prev by Date: How to Get Specyfic Object from ROT
- Next by Date: Re: How to Get Specyfic Object from ROT
- Previous by thread: Re: How to register TypeLib for DirectShow filter?
- Next by thread: Re: How to register TypeLib for DirectShow filter?
- Index(es):
Relevant Pages
|