Reading codes of WebRTC: try to implement a common video module wrapper from webrtc 1


My goal here is only to test & research, practise and get to know more about WebRTC & its codes, so here we go.

Wrappering an independent Video Capture class from WebRTC’s video capture module

—————————————-
Wrap base on webrtc.VideoCaptureModule.
—————————————-

Located at: E:\workspace\webrtc\trunk\webrtc\modules\video_capture\include\video_capture.h

—————————————-
Some relavant classes:
—————————————-

webrtc.VideoCaptureExternal
webrtc.VideoCaptureCapability
webrtc.VideoFrameI420
webrtc.VideoCaptureDataCallback
webrtc.VideoCaptureFeedBack
Located at: E:\workspace\webrtc\trunk\webrtc\modules\video_capture\include\video_capture_defines.h

webrtc.VideoCaptureFactory
Located at: E:\workspace\webrtc\trunk\webrtc\modules\video_capture\include\video_capture_factory.h

webrtc.videocapturemodule.VideoCaptureImpl
Located at: E:\workspace\webrtc\trunk\webrtc\modules\video_capture\video_capture_impl.h

webrtc.VideoFrame
webrtc.I420VideoFrame
Located at: E:\workspace\webrtc\trunk\webrtc\modules\interface\module_common_types.h

—————————————-
Wrapped classes & class mapping:
—————————————-

CommonVideoWrapper::VideoCaptureWrapper –> webrtc.VideoCaptureModule
CommonVideoWrapper::VideoCaptureFactory –> webrtc.VideoCaptureFactory
CommonVideoWrapper::VideoFrame –> webrtc.VideoFrame
CommonVideoWrapper::I420VideoFrame –> webrtc.I420VideoFrame

—————————————-
Issues ran into:
—————————————-

1>—— Build started: Project: mediawrapper, Configuration: Debug Win32 —— 1>     Creating library E:\Developer\root\40-platform\mediawrapper_v200\prj_win32

\MediaWrapperDll\Debug\mediawrapper.lib and object E:\Developer\root\40-platform\mediawrapper_v200\prj_win32

\MediaWrapperDll\Debug\mediawrapper.exp
1>video_capture_module.lib(device_info_ds.obj) : error LNK2019: unresolved external symbol “void __stdcall

DeleteMediaType(struct _AMMediaType *)” (?DeleteMediaType@@YGXPAU_AMMediaType@@@Z) referenced in function “protected:

virtual int __thiscall webrtc::videocapturemodule::DeviceInfoDS::CreateCapabilityMap(char const *)” (?

CreateCapabilityMap@DeviceInfoDS@videocapturemodule@webrtc@@MAEHPBD@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall

CBaseInputPin::CBaseInputPin(wchar_t const *,class CBaseFilter *,class CCritSec *,long *,wchar_t const *)” (??

0CBaseInputPin@@QAE@PB_WPAVCBaseFilter@@PAVCCritSec@@PAJ0@Z) referenced in function “public: __thiscall

webrtc::videocapturemodule::CaptureInputPin::CaptureInputPin(int,wchar_t *,class

webrtc::videocapturemodule::CaptureSinkFilter *,class CCritSec *,long *,wchar_t const *)” (??

0CaptureInputPin@videocapturemodule@webrtc@@QAE@HPA_WPAVCaptureSinkFilter@12@PAVCCritSec@@PAJPB_W@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::NonDelegatingQueryInterface(struct _GUID const &,void * *)” (?

NonDelegatingQueryInterface@CBaseInputPin@@UAGJABU_GUID@@PAPAX@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual unsigned

long __stdcall CBasePin::NonDelegatingAddRef(void)” (?NonDelegatingAddRef@CBasePin@@UAGKXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual unsigned

long __stdcall CBasePin::NonDelegatingRelease(void)” (?NonDelegatingRelease@CBasePin@@UAGKXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::GetMediaTypeVersion(void)” (?GetMediaTypeVersion@CBasePin@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::Active(void)” (?Active@CBasePin@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBaseInputPin::Inactive(void)” (?Inactive@CBaseInputPin@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::Run(__int64)” (?Run@CBasePin@@UAEJ_J@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::SetMediaType(class CMediaType const *)” (?SetMediaType@CBasePin@@UAEJPBVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::CheckConnect(struct IPin *)” (?CheckConnect@CBasePin@@UAEJPAUIPin@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBaseInputPin::BreakConnect(void)” (?BreakConnect@CBaseInputPin@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBasePin::CompleteConnect(struct IPin *)” (?CompleteConnect@CBasePin@@UAEJPAUIPin@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBaseInputPin::CheckStreaming(void)” (?CheckStreaming@CBaseInputPin@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::Connect(struct IPin *,struct _AMMediaType const *)” (?

Connect@CBasePin@@UAGJPAUIPin@@PBU_AMMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::ReceiveConnection(struct IPin *,struct _AMMediaType const *)” (?

ReceiveConnection@CBasePin@@UAGJPAUIPin@@PBU_AMMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::Disconnect(void)” (?Disconnect@CBasePin@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::ConnectedTo(struct IPin * *)” (?ConnectedTo@CBasePin@@UAGJPAPAUIPin@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::ConnectionMediaType(struct _AMMediaType *)” (?

ConnectionMediaType@CBasePin@@UAGJPAU_AMMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::QueryPinInfo(struct _PinInfo *)” (?QueryPinInfo@CBasePin@@UAGJPAU_PinInfo@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::QueryDirection(enum _PinDirection *)” (?QueryDirection@CBasePin@@UAGJPAW4_PinDirection@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::QueryId(wchar_t * *)” (?QueryId@CBasePin@@UAGJPAPA_W@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::QueryAccept(struct _AMMediaType const *)” (?QueryAccept@CBasePin@@UAGJPBU_AMMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::EnumMediaTypes(struct IEnumMediaTypes * *)” (?

EnumMediaTypes@CBasePin@@UAGJPAPAUIEnumMediaTypes@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::EndOfStream(void)” (?EndOfStream@CBasePin@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::BeginFlush(void)” (?BeginFlush@CBaseInputPin@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::EndFlush(void)” (?EndFlush@CBaseInputPin@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::NewSegment(__int64,__int64,double)” (?NewSegment@CBasePin@@UAGJ_J0N@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::Notify(struct IBaseFilter *,struct tagQuality)” (?

Notify@CBaseInputPin@@UAGJPAUIBaseFilter@@UtagQuality@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBasePin::SetSink(struct IQualityControl *)” (?SetSink@CBasePin@@UAGJPAUIQualityControl@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::GetAllocator(struct IMemAllocator * *)” (?

GetAllocator@CBaseInputPin@@UAGJPAPAUIMemAllocator@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::NotifyAllocator(struct IMemAllocator *,int)” (?

NotifyAllocator@CBaseInputPin@@UAGJPAUIMemAllocator@@H@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::GetAllocatorRequirements(struct _AllocatorProperties *)” (?

GetAllocatorRequirements@CBaseInputPin@@UAGJPAU_AllocatorProperties@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::ReceiveMultiple(struct IMediaSample * *,long,long *)” (?

ReceiveMultiple@CBaseInputPin@@UAGJPAPAUIMediaSample@@JPAJ@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::ReceiveCanBlock(void)” (?ReceiveCanBlock@CBaseInputPin@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: virtual

__thiscall CBaseInputPin::~CBaseInputPin(void)” (??1CBaseInputPin@@UAE@XZ) referenced in function “public: virtual

__thiscall webrtc::videocapturemodule::CaptureInputPin::~CaptureInputPin(void)” (??

1CaptureInputPin@videocapturemodule@webrtc@@UAE@XZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CMediaType::SetSampleSize(unsigned long)” (?SetSampleSize@CMediaType@@QAEXK@Z) referenced in function “public:

virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class CMediaType *)” (?

GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CMediaType::SetSubtype(struct _GUID const *)” (?SetSubtype@CMediaType@@QAEXPBU_GUID@@@Z) referenced in function

“public: virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class CMediaType *)”

(?GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CMediaType::SetTemporalCompression(int)” (?SetTemporalCompression@CMediaType@@QAEXH@Z) referenced in function

“public: virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class CMediaType *)”

(?GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CMediaType::SetFormatType(struct _GUID const *)” (?SetFormatType@CMediaType@@QAEXPBU_GUID@@@Z) referenced in function

“public: virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class CMediaType *)”

(?GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CMediaType::SetType(struct _GUID const *)” (?SetType@CMediaType@@QAEXPBU_GUID@@@Z) referenced in function “public:

virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class CMediaType *)” (?

GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: unsigned char *

__thiscall CMediaType::AllocFormatBuffer(unsigned long)” (?AllocFormatBuffer@CMediaType@@QAEPAEK@Z) referenced in

function “public: virtual long __thiscall webrtc::videocapturemodule::CaptureInputPin::GetMediaType(int,class

CMediaType *)” (?GetMediaType@CaptureInputPin@videocapturemodule@webrtc@@UAEJHPAVCMediaType@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: virtual long

__stdcall CBaseInputPin::Receive(struct IMediaSample *)” (?Receive@CBaseInputPin@@UAGJPAUIMediaSample@@@Z) referenced

in function “public: virtual long __stdcall webrtc::videocapturemodule::CaptureInputPin::Receive(struct IMediaSample

*)” (?Receive@CaptureInputPin@videocapturemodule@webrtc@@UAGJPAUIMediaSample@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “void __stdcall DbgAssert

(wchar_t const *,wchar_t const *,int)” (?DbgAssert@@YGXPB_W0H@Z) referenced in function “public: virtual long

__stdcall webrtc::videocapturemodule::CaptureInputPin::Receive(struct IMediaSample *)” (?

Receive@CaptureInputPin@videocapturemodule@webrtc@@UAGJPAUIMediaSample@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CCritSec::Lock(void)” (?Lock@CCritSec@@QAEXXZ) referenced in function “public: void __thiscall

webrtc::videocapturemodule::CaptureSinkFilter::LockReceive(void)” (?

LockReceive@CaptureSinkFilter@videocapturemodule@webrtc@@QAEXXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: void __thiscall

CCritSec::Unlock(void)” (?Unlock@CCritSec@@QAEXXZ) referenced in function “public: void __thiscall

webrtc::videocapturemodule::CaptureSinkFilter::UnlockReceive(void)” (?

UnlockReceive@CaptureSinkFilter@videocapturemodule@webrtc@@QAEXXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall

CCritSec::CCritSec(void)” (??0CCritSec@@QAE@XZ) referenced in function “public: __thiscall

webrtc::videocapturemodule::CaptureSinkFilter::CaptureSinkFilter(wchar_t *,struct IUnknown *,long *,class

webrtc::VideoCaptureExternal &,int)” (??

0CaptureSinkFilter@videocapturemodule@webrtc@@QAE@PA_WPAUIUnknown@@PAJAAVVideoCaptureExternal@2@H@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall

CBaseFilter::CBaseFilter(wchar_t const *,struct IUnknown *,class CCritSec *,struct _GUID const &)” (??

0CBaseFilter@@QAE@PB_WPAUIUnknown@@PAVCCritSec@@ABU_GUID@@@Z) referenced in function “public: __thiscall

webrtc::videocapturemodule::CaptureSinkFilter::CaptureSinkFilter(wchar_t *,struct IUnknown *,long *,class

webrtc::VideoCaptureExternal &,int)” (??

0CaptureSinkFilter@videocapturemodule@webrtc@@QAE@PA_WPAUIUnknown@@PAJAAVVideoCaptureExternal@2@H@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::NonDelegatingQueryInterface(struct _GUID const &,void * *)” (?

NonDelegatingQueryInterface@CBaseFilter@@UAGJABU_GUID@@PAPAX@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual unsigned

long __stdcall CUnknown::NonDelegatingAddRef(void)” (?NonDelegatingAddRef@CUnknown@@UAGKXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual unsigned

long __stdcall CBaseFilter::NonDelegatingRelease(void)” (?NonDelegatingRelease@CBaseFilter@@UAGKXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBaseFilter::StreamTime(class CRefTime &)” (?StreamTime@CBaseFilter@@UAEJAAVCRefTime@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__thiscall CBaseFilter::GetPinVersion(void)” (?GetPinVersion@CBaseFilter@@UAEJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::Run(__int64)” (?Run@CBaseFilter@@UAGJ_J@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::GetState(unsigned long,enum _FilterState *)” (?

GetState@CBaseFilter@@UAGJKPAW4_FilterState@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::SetSyncSource(struct IReferenceClock *)” (?

SetSyncSource@CBaseFilter@@UAGJPAUIReferenceClock@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::GetSyncSource(struct IReferenceClock * *)” (?

GetSyncSource@CBaseFilter@@UAGJPAPAUIReferenceClock@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::EnumPins(struct IEnumPins * *)” (?EnumPins@CBaseFilter@@UAGJPAPAUIEnumPins@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::FindPin(wchar_t const *,struct IPin * *)” (?FindPin@CBaseFilter@@UAGJPB_WPAPAUIPin@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::QueryFilterInfo(struct _FilterInfo *)” (?QueryFilterInfo@CBaseFilter@@UAGJPAU_FilterInfo@@@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::JoinFilterGraph(struct IFilterGraph *,wchar_t const *)” (?

JoinFilterGraph@CBaseFilter@@UAGJPAUIFilterGraph@@PB_W@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::QueryVendorInfo(wchar_t * *)” (?QueryVendorInfo@CBaseFilter@@UAGJPAPA_W@Z)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::Register(void)” (?Register@CBaseFilter@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2001: unresolved external symbol “public: virtual long

__stdcall CBaseFilter::Unregister(void)” (?Unregister@CBaseFilter@@UAGJXZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: virtual

__thiscall CBaseFilter::~CBaseFilter(void)” (??1CBaseFilter@@UAE@XZ) referenced in function “public: virtual

__thiscall webrtc::videocapturemodule::CaptureSinkFilter::~CaptureSinkFilter(void)” (??

1CaptureSinkFilter@videocapturemodule@webrtc@@UAE@XZ)
1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall

CCritSec::~CCritSec(void)” (??1CCritSec@@QAE@XZ) referenced in function “public: virtual __thiscall

webrtc::videocapturemodule::CaptureSinkFilter::~CaptureSinkFilter(void)” (??

1CaptureSinkFilter@videocapturemodule@webrtc@@UAE@XZ)
1>E:\Developer\root\40-platform\mediawrapper_v200\prj_win32\MediaWrapperDll\Debug\mediawrapper.dll : fatal error

LNK1120: 66 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

After I added the strmbase.lib which was pre-compiled using the codes/project from baseclasses of DXSDK 2010(JUNE), the errors reduced to three:

1>—— Build started: Project: mediawrapper, Configuration: Debug Win32 ——1>     Creating library E:\Developer\root\40-platform\mediawrapper_v200\prj_win32\MediaWrapperDll\Debug\mediawrapper.lib and object E:\Developer\root\40-platform\mediawrapper_v200\prj_win32\MediaWrapperDll\Debug\mediawrapper.exp1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall CBaseInputPin::CBaseInputPin(wchar_t const *,class CBaseFilter *,class CCritSec *,long *,wchar_t const *)” (??0CBaseInputPin@@QAE@PB_WPAVCBaseFilter@@PAVCCritSec@@PAJ0@Z) referenced in function “public: __thiscall webrtc::videocapturemodule::CaptureInputPin::CaptureInputPin(int,wchar_t *,class webrtc::videocapturemodule::CaptureSinkFilter *,class CCritSec *,long *,wchar_t const *)” (??0CaptureInputPin@videocapturemodule@webrtc@@QAE@HPA_WPAVCaptureSinkFilter@12@PAVCCritSec@@PAJPB_W@Z)1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “void __stdcall DbgAssert(wchar_t const *,wchar_t const *,int)” (?DbgAssert@@YGXPB_W0H@Z) referenced in function “public: virtual long __stdcall webrtc::videocapturemodule::CaptureInputPin::Receive(struct IMediaSample *)” (?Receive@CaptureInputPin@videocapturemodule@webrtc@@UAGJPAUIMediaSample@@@Z)1>video_capture_module.lib(sink_filter_ds.obj) : error LNK2019: unresolved external symbol “public: __thiscall CBaseFilter::CBaseFilter(wchar_t const *,struct IUnknown *,class CCritSec *,struct _GUID const &)” (??0CBaseFilter@@QAE@PB_WPAUIUnknown@@PAVCCritSec@@ABU_GUID@@@Z) referenced in function “public: __thiscall webrtc::videocapturemodule::CaptureSinkFilter::CaptureSinkFilter(wchar_t *,struct IUnknown *,long *,class webrtc::VideoCaptureExternal &,int)” (??0CaptureSinkFilter@videocapturemodule@webrtc@@QAE@PA_WPAUIUnknown@@PAJAAVVideoCaptureExternal@2@H@Z)1>E:\Developer\root\40-platform\mediawrapper_v200\prj_win32\MediaWrapperDll\Debug\mediawrapper.dll : fatal error LNK1120: 3 unresolved externals========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

After double checked with webrtc test projects, I finally managed to drag this out:

#pragma comment(lib, “directshow_baseclasses.lib”)

We need to use the baseclasses.lib by which was compiled by webrtc project.


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “Reading codes of WebRTC: try to implement a common video module wrapper from webrtc

  • Jordan

    “I also believe that Apple will need to open up more services to the developers, such as Siri, to generate additional innovation.”