Click here to Skip to main content
15,902,114 members
Home / Discussions / COM
   

COM

 
GeneralRe: regenerate wrappers for ocx library Pin
eusto10-Jun-10 21:14
eusto10-Jun-10 21:14 
GeneralRe: regenerate wrappers for ocx library Pin
Stephen Hewitt11-Jun-10 18:46
Stephen Hewitt11-Jun-10 18:46 
Questioncom local server Pin
vasuvasanth7-Jun-10 23:06
vasuvasanth7-Jun-10 23:06 
AnswerRe: com local server Pin
Stephen Hewitt8-Jun-10 14:29
Stephen Hewitt8-Jun-10 14:29 
GeneralRe: com local server Pin
vasuvasanth8-Jun-10 21:40
vasuvasanth8-Jun-10 21:40 
GeneralRe: com local server Pin
Stephen Hewitt9-Jun-10 15:21
Stephen Hewitt9-Jun-10 15:21 
Questionwant article for com and dcom Pin
Honeyboy_206-Jun-10 16:35
Honeyboy_206-Jun-10 16:35 
QuestionDirectshow Audio Question Pin
godspeed1233-Jun-10 8:07
godspeed1233-Jun-10 8:07 
Hi
I have successfully got Directshow outputing a video from C++ MFC using Sample Grabber, but I can not figure out how to play the audio with this.

I have attached code snippet of what I have done currently, can anyone tell me what I need to do to get audio stream to work. I have added the sound renderer filter, just dont know how to connect it with the rest of the graph.

Thanks

HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, IID_IGraphBuilder, (void **)&pGraph);

hr = pGraph->QueryInterface(IID_IMediaControl, (void **)&pControl);
hr = pGraph->QueryInterface(IID_IMediaEventEx, (void **)&pEvent);
hr = pGraph->QueryInterface(IID_IBasicAudio, reinterpret_cast<void**>(&m_pAudio));
hr = pGraph->QueryInterface(IID_IMediaSeeking, reinterpret_cast<void**>(&pSeeking));

hr = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&pGrabberF);

if (FAILED(hr))
{
// Return an error.
}
hr = pGraph->AddFilter(pGrabberF, L"Sample Grabber");

CoCreateInstance(CLSID_DSoundRender, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&g_pSoundRenderer);
hr = pGraph->AddFilter(g_pSoundRenderer, NULL);

// hr = CoCreateInstance(CLSID_SampleGrabber, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void**)&pGrabberF);

// hr = pGraph->AddFilter(
if (FAILED(hr) )
{
// Return an error.
}

pGrabberF->QueryInterface(IID_ISampleGrabber, (void**)&pGrabber);

//ZeroMemory(&mt, sizeof(AM_MEDIA_TYPE));
mt.majortype = MEDIATYPE_Stream;
//mt.subtype = GUID_NULL;//MEDIASUBTYPE_RGB24;
hr = pGrabber->SetMediaType(&mt);


hr = pGraph->AddSourceFilter(fileName.AllocSysString(), L"Source", &pSrc);
if (FAILED(hr))
{
// Return an error code.
}
hr = ConnectFilters(pGraph, pSrc, pGrabberF);

// Create the NULL renderer and connect

hr = CoCreateInstance(CLSID_NullRenderer, NULL, CLSCTX_INPROC_SERVER,
IID_IBaseFilter, reinterpret_cast<void**>(&m_pNullRenderer));
hr = pGraph->AddFilter(m_pNullRenderer, L"NullRenderer");
hr = ConnectFilters(pGraph, pGrabberF, m_pNullRenderer);
QuestionMIDL2020 : error generating type library [modified] Pin
forexsurfr29-May-10 19:09
forexsurfr29-May-10 19:09 
AnswerRe: MIDL2020 : error generating type library Pin
forexsurfr30-May-10 7:29
forexsurfr30-May-10 7:29 
QuestionWindows 7 starting new app instance from Visual Studio 2005 Pin
StevenS_Dev21-May-10 9:42
StevenS_Dev21-May-10 9:42 
QuestionRe: Windows 7 starting new app instance from Visual Studio 2005 Pin
Randor 28-May-10 4:17
professional Randor 28-May-10 4:17 
AnswerRe: Windows 7 starting new app instance from Visual Studio 2005 Pin
StevenS_Dev28-May-10 7:38
StevenS_Dev28-May-10 7:38 
QuestionGetting COM Error: Scalar deleting destructor. Pin
KTTransfer20-May-10 21:10
KTTransfer20-May-10 21:10 
AnswerRe: Getting COM Error: Scalar deleting destructor. Pin
Stephen Hewitt20-May-10 21:54
Stephen Hewitt20-May-10 21:54 
GeneralRe: Getting COM Error: Scalar deleting destructor. Pin
KTTransfer20-May-10 22:34
KTTransfer20-May-10 22:34 
GeneralRe: Getting COM Error: Scalar deleting destructor. Pin
Stephen Hewitt22-May-10 22:09
Stephen Hewitt22-May-10 22:09 
QuestionApplication attempted to perform an operation not allowed by the security policy Pin
NarVish19-May-10 1:38
NarVish19-May-10 1:38 
QuestionTROUBLE Passing BYTE Array from Client to COM OUTPROC Server [modified] Pin
K ARUN KUMAR17-May-10 18:22
K ARUN KUMAR17-May-10 18:22 
AnswerRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
Stephen Hewitt17-May-10 19:59
Stephen Hewitt17-May-10 19:59 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
K ARUN KUMAR17-May-10 21:07
K ARUN KUMAR17-May-10 21:07 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
Stephen Hewitt17-May-10 22:33
Stephen Hewitt17-May-10 22:33 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
K ARUN KUMAR17-May-10 23:30
K ARUN KUMAR17-May-10 23:30 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
Stephen Hewitt18-May-10 0:14
Stephen Hewitt18-May-10 0:14 
GeneralRe: TROUBLE Passing BYTE Array from Client to COM OUTPROC Server Pin
K ARUN KUMAR18-May-10 0:32
K ARUN KUMAR18-May-10 0:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.