Hi all. So I'm writing a direct-show camera capture class for
WindowsMobile 5. It's only purpose is to establish the filter graph
to capture a camera image and save it to a raw buffer.

So I intend to create a filter graph and attach a camera capture
filter and a custom VideoRenderer filter that I will be creating. The
VideoRenderer won't do anything except copy the captured frame to a
circular queue of raw buffers.

Everything was compiling and working up until I tried to get the
video
renderer to link. Here is my class decleration:

class TVideoRenderer : public CBaseVideoRenderer
{
//
// Member variables
private:
// GUID used to identify the direct show video renederer
static const GUID ms_guidVideoRenderer;


TCaptureDevice& m_rCapDevice;
DWORD m_dwPitch;
DWORD m_dwWidth;
DWORD m_dwHeight;

//
// Construction / Destruction
public:
TVideoRenderer(IUnknown* pUnk, TCaptureDevice& devCamera,
HRESULT*
phResult);
~TVideoRenderer();


//
// Public member functions
public:
HRESULT CheckMediaType(const CMediaType* kpMediaType);
HRESULT SetMediaType(const CMediaType* kpMediaType);
HRESULT DoRenderSample(IMediaSample* pMediaSample);



};


But when I go to link, I get errors galore. I've included the
following libs into my project:

dmoguids.lib
strmiids.lib
strmbase.lib
Uuid.lib


Here are the link errors.. if anyone could point me in the right
direction it would be so much appreciated!


CaptureDevice.obj : error LNK2019: unresolved external symbol
"public:
__cdecl CBaseVideoRenderer::CBaseVideoRenderer(struct _GUID const
&,wchar_t *,struct IUnknown *,long *)" (??
0CBaseVideoRenderer@@QAA@ABU_GUID@@PA_WPAUIUnknown@@PAJ@Z) referenced
in function "public: __cdecl
TCaptureDevice::TVideoRenderer::TVideoRenderer(struct IUnknown
*,class
TCaptureDevice &,long *)" (??
0TVideoRenderer@TCaptureDevice@@QAA@PAUIUnknown@@AAV1@PAJ@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual unsigned long __cdecl
CBaseFilter::NonDelegatingRelease(void)" (?
NonDelegatingRelease@CBaseFilter@@UAAKXZ)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl
TCaptureDevice::TVideoRenderer::SetMediaType(class CMediaType const
*)" (?
SetMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl
TCaptureDevice::TVideoRenderer::DoRenderSample(struct IMediaSample
*)" (?
DoRenderSample@TVideoRenderer@TCaptureDevice@@UAAJPAUIMediaSample@@@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl
TCaptureDevice::TVideoRenderer::CheckMediaType(class CMediaType const
*)" (?
CheckMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl CBaseRenderer::FindPin(wchar_t const *,struct
IPin * *)" (?FindPin@CBaseRenderer@@UAAJPB_WPAPAUIPin@@@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl CBaseVideoRenderer::JoinFilterGraph(struct
IFilterGraph *,wchar_t const *)" (?
JoinFilterGraph@CBaseVideoRenderer@@UAAJPAUIFilterGraph@@PB_W@Z)


CaptureDevice.obj : error LNK2001: unresolved external symbol
"public:
virtual long __cdecl CBaseFilter::QueryVendorInfo(wchar_t * *)" (?
QueryVendorInfo@CBaseFilter@@UAAJPAPA_W@Z)


strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
timeKillEvent referenced in function "public: void __cdecl
CBaseRenderer::ResetEndOfStreamTimer(void)" (?
ResetEndOfStreamTimer@CBaseRenderer@@QAAXXZ)


strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
timeBeginPeriod referenced in function "public: virtual long __cdecl
CBaseRenderer::StartStreaming(void)" (?
StartStreaming@CBaseRenderer@@UAAJXZ)


strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
timeEndPeriod referenced in function "public: virtual long __cdecl
CBaseRenderer::StopStreaming(void)" (?
StopStreaming@CBaseRenderer@@UAAJXZ)


strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
timeSetEvent referenced in function "public: virtual long __cdecl
CBaseRenderer::SendEndOfStream(void)" (?
SendEndOfStream@CBaseRenderer@@UAAJXZ)

RE: CBaseVideoRenderer base class issues by amitranjan

amitranjan
Mon Feb 26 22:51:10 CST 2007

Try setting ProjectSetting->C/C++->Language->Treate wchar_t as built in type
to "NO".
Hope it helps.
--
Thanks and Regards
Amit Ranjan
blog:http://amitranjan.wordpress.com


"Phred" wrote:

> Hi all. So I'm writing a direct-show camera capture class for
> WindowsMobile 5. It's only purpose is to establish the filter graph
> to capture a camera image and save it to a raw buffer.
>
> So I intend to create a filter graph and attach a camera capture
> filter and a custom VideoRenderer filter that I will be creating. The
> VideoRenderer won't do anything except copy the captured frame to a
> circular queue of raw buffers.
>
> Everything was compiling and working up until I tried to get the
> video
> renderer to link. Here is my class decleration:
>
> class TVideoRenderer : public CBaseVideoRenderer
> {
> //
> // Member variables
> private:
> // GUID used to identify the direct show video renederer
> static const GUID ms_guidVideoRenderer;
>
>
> TCaptureDevice& m_rCapDevice;
> DWORD m_dwPitch;
> DWORD m_dwWidth;
> DWORD m_dwHeight;
>
> //
> // Construction / Destruction
> public:
> TVideoRenderer(IUnknown* pUnk, TCaptureDevice& devCamera,
> HRESULT*
> phResult);
> ~TVideoRenderer();
>
>
> //
> // Public member functions
> public:
> HRESULT CheckMediaType(const CMediaType* kpMediaType);
> HRESULT SetMediaType(const CMediaType* kpMediaType);
> HRESULT DoRenderSample(IMediaSample* pMediaSample);
>
>
>
> };
>
>
> But when I go to link, I get errors galore. I've included the
> following libs into my project:
>
> dmoguids.lib
> strmiids.lib
> strmbase.lib
> Uuid.lib
>
>
> Here are the link errors.. if anyone could point me in the right
> direction it would be so much appreciated!
>
>
> CaptureDevice.obj : error LNK2019: unresolved external symbol
> "public:
> __cdecl CBaseVideoRenderer::CBaseVideoRenderer(struct _GUID const
> &,wchar_t *,struct IUnknown *,long *)" (??
> 0CBaseVideoRenderer@@QAA@ABU_GUID@@PA_WPAUIUnknown@@PAJ@Z) referenced
> in function "public: __cdecl
> TCaptureDevice::TVideoRenderer::TVideoRenderer(struct IUnknown
> *,class
> TCaptureDevice &,long *)" (??
> 0TVideoRenderer@TCaptureDevice@@QAA@PAUIUnknown@@AAV1@PAJ@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual unsigned long __cdecl
> CBaseFilter::NonDelegatingRelease(void)" (?
> NonDelegatingRelease@CBaseFilter@@UAAKXZ)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::SetMediaType(class CMediaType const
> *)" (?
> SetMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::DoRenderSample(struct IMediaSample
> *)" (?
> DoRenderSample@TVideoRenderer@TCaptureDevice@@UAAJPAUIMediaSample@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::CheckMediaType(class CMediaType const
> *)" (?
> CheckMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseRenderer::FindPin(wchar_t const *,struct
> IPin * *)" (?FindPin@CBaseRenderer@@UAAJPB_WPAPAUIPin@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseVideoRenderer::JoinFilterGraph(struct
> IFilterGraph *,wchar_t const *)" (?
> JoinFilterGraph@CBaseVideoRenderer@@UAAJPAUIFilterGraph@@PB_W@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseFilter::QueryVendorInfo(wchar_t * *)" (?
> QueryVendorInfo@CBaseFilter@@UAAJPAPA_W@Z)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeKillEvent referenced in function "public: void __cdecl
> CBaseRenderer::ResetEndOfStreamTimer(void)" (?
> ResetEndOfStreamTimer@CBaseRenderer@@QAAXXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeBeginPeriod referenced in function "public: virtual long __cdecl
> CBaseRenderer::StartStreaming(void)" (?
> StartStreaming@CBaseRenderer@@UAAJXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeEndPeriod referenced in function "public: virtual long __cdecl
> CBaseRenderer::StopStreaming(void)" (?
> StopStreaming@CBaseRenderer@@UAAJXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeSetEvent referenced in function "public: virtual long __cdecl
> CBaseRenderer::SendEndOfStream(void)" (?
> SendEndOfStream@CBaseRenderer@@UAAJXZ)
>
>

RE: CBaseVideoRenderer base class issues by amitranjan

amitranjan
Mon Feb 26 23:06:04 CST 2007

Also if only thing that you want to achieve is to Capture raw frame and write
it into some memory buffer then look at sample grabber.Sample grabber should
fit your requirement and also involves lot less work on your part..:-)
Check out the following msdn link:
http://msdn2.microsoft.com/en-us/library/ms867162.aspx
--
Thanks and Regards
Amit Ranjan
blog:http://amitranjan.wordpress.com


"Phred" wrote:

> Hi all. So I'm writing a direct-show camera capture class for
> WindowsMobile 5. It's only purpose is to establish the filter graph
> to capture a camera image and save it to a raw buffer.
>
> So I intend to create a filter graph and attach a camera capture
> filter and a custom VideoRenderer filter that I will be creating. The
> VideoRenderer won't do anything except copy the captured frame to a
> circular queue of raw buffers.
>
> Everything was compiling and working up until I tried to get the
> video
> renderer to link. Here is my class decleration:
>
> class TVideoRenderer : public CBaseVideoRenderer
> {
> //
> // Member variables
> private:
> // GUID used to identify the direct show video renederer
> static const GUID ms_guidVideoRenderer;
>
>
> TCaptureDevice& m_rCapDevice;
> DWORD m_dwPitch;
> DWORD m_dwWidth;
> DWORD m_dwHeight;
>
> //
> // Construction / Destruction
> public:
> TVideoRenderer(IUnknown* pUnk, TCaptureDevice& devCamera,
> HRESULT*
> phResult);
> ~TVideoRenderer();
>
>
> //
> // Public member functions
> public:
> HRESULT CheckMediaType(const CMediaType* kpMediaType);
> HRESULT SetMediaType(const CMediaType* kpMediaType);
> HRESULT DoRenderSample(IMediaSample* pMediaSample);
>
>
>
> };
>
>
> But when I go to link, I get errors galore. I've included the
> following libs into my project:
>
> dmoguids.lib
> strmiids.lib
> strmbase.lib
> Uuid.lib
>
>
> Here are the link errors.. if anyone could point me in the right
> direction it would be so much appreciated!
>
>
> CaptureDevice.obj : error LNK2019: unresolved external symbol
> "public:
> __cdecl CBaseVideoRenderer::CBaseVideoRenderer(struct _GUID const
> &,wchar_t *,struct IUnknown *,long *)" (??
> 0CBaseVideoRenderer@@QAA@ABU_GUID@@PA_WPAUIUnknown@@PAJ@Z) referenced
> in function "public: __cdecl
> TCaptureDevice::TVideoRenderer::TVideoRenderer(struct IUnknown
> *,class
> TCaptureDevice &,long *)" (??
> 0TVideoRenderer@TCaptureDevice@@QAA@PAUIUnknown@@AAV1@PAJ@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual unsigned long __cdecl
> CBaseFilter::NonDelegatingRelease(void)" (?
> NonDelegatingRelease@CBaseFilter@@UAAKXZ)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::SetMediaType(class CMediaType const
> *)" (?
> SetMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::DoRenderSample(struct IMediaSample
> *)" (?
> DoRenderSample@TVideoRenderer@TCaptureDevice@@UAAJPAUIMediaSample@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl
> TCaptureDevice::TVideoRenderer::CheckMediaType(class CMediaType const
> *)" (?
> CheckMediaType@TVideoRenderer@TCaptureDevice@@UAAJPBVCMediaType@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseRenderer::FindPin(wchar_t const *,struct
> IPin * *)" (?FindPin@CBaseRenderer@@UAAJPB_WPAPAUIPin@@@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseVideoRenderer::JoinFilterGraph(struct
> IFilterGraph *,wchar_t const *)" (?
> JoinFilterGraph@CBaseVideoRenderer@@UAAJPAUIFilterGraph@@PB_W@Z)
>
>
> CaptureDevice.obj : error LNK2001: unresolved external symbol
> "public:
> virtual long __cdecl CBaseFilter::QueryVendorInfo(wchar_t * *)" (?
> QueryVendorInfo@CBaseFilter@@UAAJPAPA_W@Z)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeKillEvent referenced in function "public: void __cdecl
> CBaseRenderer::ResetEndOfStreamTimer(void)" (?
> ResetEndOfStreamTimer@CBaseRenderer@@QAAXXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeBeginPeriod referenced in function "public: virtual long __cdecl
> CBaseRenderer::StartStreaming(void)" (?
> StartStreaming@CBaseRenderer@@UAAJXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeEndPeriod referenced in function "public: virtual long __cdecl
> CBaseRenderer::StopStreaming(void)" (?
> StopStreaming@CBaseRenderer@@UAAJXZ)
>
>
> strmbase.lib(renbase.obj) : error LNK2019: unresolved external symbol
> timeSetEvent referenced in function "public: virtual long __cdecl
> CBaseRenderer::SendEndOfStream(void)" (?
> SendEndOfStream@CBaseRenderer@@UAAJXZ)
>
>

Re: CBaseVideoRenderer base class issues by Phred

Phred
Tue Feb 27 14:32:59 CST 2007

On Feb 27, 12:06 am, Amit <amitranjan@nospam-saskendotcom> wrote:
> Also if only thing that you want to achieve is to Capture raw frame and write
> it into some memory buffer then look at sample grabber.Sample grabber should
> fit your requirement and also involves lot less work on your part..:-)
> Check out the following msdn link:http://msdn2.microsoft.com/en-us/library/ms867162.aspx
> --
> Thanks and Regards
> Amit Ranjan
> blog:http://amitranjan.wordpress.com
>

Well the problem now isn't the link errors it's when I go to
instantiate the newly created TVideoRender class. My app crashes
during the constructor which is in turn instantiating the
CBaseVideoRender class. I've read that I should be using the debug
direct show libs - specifically for strmbase.lib but as we all well
know.. there isn't a strmbased.lib under the WindowsMobile 5
platform... or is there? I can't find it if there is.

Here is my constructor code:

TCaptureDevice::TVideoRenderer::TVideoRenderer(IUnknown* pUnk,
TCaptureDevice&
dsDevice,
HRESULT* phResult)
: m_rCapDevice(dsDevice),
m_dwPitch(0),
m_dwHeight(0),
CBaseVideoRenderer(ms_kguidVideoRenderer, NAME("Video Renderer"),
pUnk, phResult)
{
ASSERT(NULL != phResult);

if (phResult)
{
*phResult = S_OK;
}
}



Re: CBaseVideoRenderer base class issues by Sai

Sai
Wed Feb 28 17:22:49 CST 2007

You can try downloading Windows CE 5.0 Evaluation Edition to get access to
shared source and debug and release libraries for your debugging purposes.

Sai




"Phred" <phredo@gmail.com> wrote in message
news:1172608379.612724.309160@j27g2000cwj.googlegroups.com...
> On Feb 27, 12:06 am, Amit <amitranjan@nospam-saskendotcom> wrote:
>> Also if only thing that you want to achieve is to Capture raw frame and
>> write
>> it into some memory buffer then look at sample grabber.Sample grabber
>> should
>> fit your requirement and also involves lot less work on your part..:-)
>> Check out the following msdn
>> link:http://msdn2.microsoft.com/en-us/library/ms867162.aspx
>> --
>> Thanks and Regards
>> Amit Ranjan
>> blog:http://amitranjan.wordpress.com
>>
>
> Well the problem now isn't the link errors it's when I go to
> instantiate the newly created TVideoRender class. My app crashes
> during the constructor which is in turn instantiating the
> CBaseVideoRender class. I've read that I should be using the debug
> direct show libs - specifically for strmbase.lib but as we all well
> know.. there isn't a strmbased.lib under the WindowsMobile 5
> platform... or is there? I can't find it if there is.
>
> Here is my constructor code:
>
> TCaptureDevice::TVideoRenderer::TVideoRenderer(IUnknown* pUnk,
> TCaptureDevice&
> dsDevice,
> HRESULT* phResult)
> : m_rCapDevice(dsDevice),
> m_dwPitch(0),
> m_dwHeight(0),
> CBaseVideoRenderer(ms_kguidVideoRenderer, NAME("Video Renderer"),
> pUnk, phResult)
> {
> ASSERT(NULL != phResult);
>
> if (phResult)
> {
> *phResult = S_OK;
> }
> }
>
>