Re: How to register TypeLib for DirectShow filter?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
);
}

.



Relevant Pages

  • nullnull to synchronize n video stream ?
    ... i currently write an evolution of Infinite Tee filter in order to have N input to N output. ... I would like that each input send their sample to their corresponding output pin. ... CTeeInputPin(TCHAR *pObjName, CTee *pTee, HRESULT *phr, ... COutputList m_OutputPinsList; // List of the output pins INT m_NextOutputPinNumber; // Increases monotonically. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: WMP read from a buffer?
    ... 'Interface has too many methods to fire events from'), ... was that the decoder filter would call my source filter ... tried to connect to AVI Decompressor's input pin. ... least be able to figure out which media type AVI ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Saving compressed video?
    ... // Find an unconnected pin on a filter ... HRESULT GetUnconnectedPin( ... // This code allows us to find a pin on a filter, ... //specifies what the network source is going to be... ...
    (microsoft.public.multimedia.directx.dshow.programming)
  • Re: How to use the IBDA_SignalStatistics Interface ?
    ... to that node are sent to the pin that the node is attached to. ... one of the pins of your receiver filter. ... > I add 'KSPROPSETID_BdaSignalStats' property in the tuner node of BDA ... > filter to query it's interface, result is 'No such interface supported', ...
    (microsoft.public.development.device.drivers)
  • How to ommit redundant frames?
    ... but i am getting redundant frames in avi file... ... // This code allows us to find a pin on a filter. ... HRESULT FilterGraph::AddGraphToRot(IUnknown *pUnkGraph, DWORD ...
    (microsoft.public.win32.programmer.directx.video)