3

I have a Mpeg2 TS should be analyze. I m using a header file introduced in Windows Kit ver 8 (or 8.1) named Dvbsiparser.h.
I know (but not sure) I should build a filter graph and then add tow important filter:
1. Mpeg2 Sections and table 2. Mpeg2 Transport Information After then, I use a IDvbSiParser obj to analyze stream. When I want to instantiate IDvbSiParser:

CoCreateInstance(__uuidof(IDvbSiParser), ..., ..., IID_IDvbSiParser, ...)

I get Link error: Unresolved external IID_IDvbSiParser.

I use Visual stdio 2013, .Net 4.5 and msvc++. I also included stream.h and link winmm.lib, strmbased.lib, msvcrtd.lib and strmiids.lib and set true lib path to windows kit. All other objects are created except IDvbSiParser.

Should I use another lib or include another header file? How can I find proper lib for IID_IDvbSiParser? Thanks.

Erfankam
  • 380
  • 5
  • 15
  • 1
    replace `IID_IDvbSiParser` with `__uuidof(IDvbSiParser)` – Roman R. Jan 11 '16 at 13:35
  • I tried this solution, but I did not get result OK (i.e S_OK). Is there another problem or I must use IID_IDvbSiParser? – Erfankam Jan 11 '16 at 16:02
  • The first arguments is unlikely to be correct. I am not sure where you get this code from and why this value exactly is present there. You need a valid class identifier, typical notation is CLSID_Something. Possibly, `CLSID_DvbSiParser`. – Roman R. Jan 11 '16 at 16:35
  • About using CLSID_Something, you are right, but I could not find any header file including valid CLSID and IID for IDvbSiParser. – Erfankam Jan 12 '16 at 07:14

1 Answers1

2

After all I read MSDN about DvbSiParser2 again and faced this important note:

The IDvbSiParser2 interface inherits from IDvbSiParser. IDvbSiParser2 also has these types of members:

So, we can use IDvbSiParser2 instead of IDvbSiParser, Because we have know have proper and true CLSID for IDvbSiParser have mentioned in IDvbSiParser2 MSDN Doc. Next step including defining new GUID variable like this:

GUID CLSID_IDvbSiParser2 = {0xF6B96EDA, 0x1A94, 0x4476, 0xA8, 0x5F, 0X4D, 0x3D, 0xC7, 0xB3, 0x9C, 0x3F};
IDvbSiParser2 *ppdvbsp;
HRESULT hr = CoCreateInstance(CLSID_IDvbSiParser2, NULL, CLSCTX_INPROC_SERVER, __uuidof(IDvbSiParser2), void **( pDvbsiparser ));
if (SUCCEEDED(hr)) { lab lab lab};

I think you will get S_OK as I did.

Erfankam
  • 380
  • 5
  • 15