Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ MFC COM directshow
My DirectShow code have some problens.
 
I want to create the DirectShow filters by coCreateInstance funtion.
WINOLEAPI CoCreateInstance(__in     REFCLSID rclsid, 
                           __in_opt LPUNKNOWN pUnkOuter,
                           __in     DWORD dwClsContext, 
                           __in     REFIID riid, 
                           __deref_out LPVOID FAR* ppv);
and it needs the filters clsid.
 
I don't know how to get the filter's clsid given by SDK like CLSID_VideoMixingRenderer. So I copy the macro and replace the numbers with my.
For example:
//@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\{D3588AB0-0781-11CE-B03A-0020AF0BA770}
//this is the avi/wmv file source filter moniker numbers  that comes form my graphedit.

OUR_GUID_ENTRY(CLSID_Sourcefilter_AVI_WAV,
      0xd3588ab0, 0x0781,0x11ce, 0xb0,0x3a, 0x00 ,0x20, 0xaf ,0x0b,0xa7,0x70);
x0b,0xa7,0x70);
i put these code in my player.cpp
 
and the complier reports error.
 
Can you help me?
thanks
 
<Edit>Fixed the formatting (Fredrik Bornander)</Edit>
Posted 27-Mar-12 6:35am
lanhxg467
Edited 27-Mar-12 6:42am
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Take out one of the close brackets and change the semicolon to a comma:
OUR_GUID_ENTRY(CLSID_Sourcefilter_AVI_WAV,
      0xd3588ab0, 0x0781,0x11ce, 0xb0,0x3a, 0x00 ,0x20, 0xaf ,0x0b,0xa7,0x70);
x0b,0xa7,0x70);
Becomes:
OUR_GUID_ENTRY(CLSID_Sourcefilter_AVI_WAV,
      0xd3588ab0, 0x0781,0x11ce, 0xb0,0x3a, 0x00 ,0x20, 0xaf ,0x0b,0xa7,0x70,
x0b,0xa7,0x70);
  Permalink  
v2
Comments
lanhxg at 27-Mar-12 12:21pm
   
sorry i have got some mistake in my posts.
so
OUR_GUID_ENTRY(CLSID_Sourcefilter_AVI_WAV,
0xd3588ab0, 0x0781,0x11ce, 0xb0,0x3a, 0x00 ,0x20, 0xaf ,0x0b,0xa7,0x70);
x0b,0xa7,0x70);
shoul be
OUR_GUID_ENTRY(CLSID_Sourcefilter_AVI_WAV,
0xd3588ab0, 0x0781,0x11ce, 0xb0,0x3a, 0x00 ,0x20, 0xaf ,0x0b,0xa7,0x70);
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

i have solve by myslf!
sorry for my poor english
and i have write this code i my .h
 

/MyClsid.h
#ifndef OUR_GUID_ENTRY
#define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8);
#endif
 
#define MEDIATYPE_NULL GUID_NULL
#define MEDIASUBTYPE_NULL GUID_NULL
 
//add by dxshow
//{4A69B442-28BE-4991-969C-B500ADF5D8A8} MPEG4s decoder
OUR_GUID_ENTRY(CLSID_MPEG4s_decoder,
0x4a69e442,0x28be,0x4991, 0x96, 0x9c,0xb5, 0x00, 0xad ,0xf5,0xd8,0xa8);
 
//57F2DB8B-E6BB-4513-9D43-DCD2A6593125 mp3 decoder DMO
OUR_GUID_ENTRY(CLSID_Mp3_Decoder_demo,
0x57f2db8b,0xe6bb,0x4513,0x9d,0x43,0xdc,0xd2,0xa6,0x59,0x31,0x25);
 
and the problem solved!
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 505
1 Maciej Los 325
2 Richard MacCutchan 265
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web04 | 2.8.1411028.1 | Last Updated 28 Mar 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100