Click here to Skip to main content
15,894,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT + THHB Attempt 1 Pin
CPallini21-Jul-08 2:14
mveCPallini21-Jul-08 2:14 
GeneralRe: OT + THHB Attempt 1 Pin
Rajkumar R21-Jul-08 2:20
Rajkumar R21-Jul-08 2:20 
GeneralRe: OT + THHB Attempt 1 Pin
CPallini21-Jul-08 2:23
mveCPallini21-Jul-08 2:23 
QuestionBeep/Audio without speakers using VC++.Net [modified] Pin
Andy Rama19-Jul-08 19:46
Andy Rama19-Jul-08 19:46 
AnswerRe: Beep/Audio without speakers using VC++.Net Pin
Ștefan-Mihai MOGA19-Jul-08 20:50
professionalȘtefan-Mihai MOGA19-Jul-08 20:50 
AnswerRe: Beep/Audio without speakers using VC++.Net Pin
CPallini20-Jul-08 22:09
mveCPallini20-Jul-08 22:09 
QuestionNewbie question, handling form focus messages Pin
kensai19-Jul-08 10:45
kensai19-Jul-08 10:45 
QuestionNo avi file has been stored, when Capturing Video to a File Pin
dwk0019-Jul-08 3:34
dwk0019-Jul-08 3:34 
Hi,

Preview works,
Capture does not work at
//

Problem: RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pBuild, NULL, pMux)

Please help.


void CWebCamDlg::OnStart()
{
// TODO: Add your command handler code here

UpdateData();
IGraphBuilder *pGraph2;
IMediaControl *pControl2;
IVideoWindow *pVidWin3;
ICaptureGraphBuilder2 *pBuild2;


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

pGraph2->QueryInterface(IID_IMediaControl, (void **)&pControl2);

///////////////////////////////////////////////////////////////////////////////////////////////

hr =CoCreateInstance(CLSID_CaptureGraphBuilder2, NULL, CLSCTX_INPROC_SERVER,IID_ICaptureGraphBuilder2,(void**)&pBuild2);



pGraph2->QueryInterface(IID_IVideoWindow, (void **)&pVidWin3);

hr = pBuild2->SetFiltergraph(pGraph2);

//hr = pGraph2->AddFilter(pBase, L"Capture Filter");




IBaseFilter *pMux;

//CoCreateInstance(CLSID_AviDest, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pMux);

//pGraph2->AddFilter(pMux, L"AVI MUX");




IBaseFilter *pWriter;

CoCreateInstance(CLSID_FileWriter, 0, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (void **)&pWriter);



hr =pBuild2->SetOutputFileName(&MEDIASUBTYPE_Avi,L"c:\\dwk.avi",&pMux,0);


////////////////////////////////////////////////////////////////////////
//prolbem
//pBase from preview

hr = pBuild2->RenderStream(&PIN_CATEGORY_CAPTURE, &MEDIATYPE_Video, pBase, NULL, pMux);

//////////////////////////////////////////////////////////////////////////

pControl2->Run();
pVidWin3->put_Owner((OAHWND)m_hWnd);
pVidWin3->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS);

CRect rc;
GetWindowRect(rc);
ScreenToClient(rc);

pVidWin3->SetWindowPosition(0, 0, rc.Width(), rc.Height());

// Release the mux filter.
pMux->Release();

IConfigAviMux *pConfigMux = NULL;

pMux->QueryInterface(IID_IConfigAviMux, (void**)&pConfigMux);


pConfigMux->SetMasterStream(1);
pConfigMux->Release();


IConfigInterleaving *pInterleave = NULL;

pMux->QueryInterface(IID_IConfigInterleaving, (void**)&pInterleave);


pInterleave->put_Mode(INTERLEAVE_CAPTURE);
pInterleave->Release();
}

Please Help!
Thanks
QuestionHow to assign a same icon id to different files programatically? Pin
Priya_Sundar19-Jul-08 1:18
Priya_Sundar19-Jul-08 1:18 
AnswerRe: How to assign a same icon id to different files programatically? Pin
Joe Woodbury19-Jul-08 8:57
professionalJoe Woodbury19-Jul-08 8:57 
QuestionNeed algorithm to find paths Pin
Member 465568519-Jul-08 1:14
Member 465568519-Jul-08 1:14 
AnswerRe: Need algorithm to find paths Pin
CPallini19-Jul-08 9:45
mveCPallini19-Jul-08 9:45 
QuestionPrecendece warning Message! Pin
Priya_Sundar18-Jul-08 23:21
Priya_Sundar18-Jul-08 23:21 
AnswerRe: Precendece warning Message! Pin
Ștefan-Mihai MOGA18-Jul-08 23:46
professionalȘtefan-Mihai MOGA18-Jul-08 23:46 
GeneralRe: Precendece warning Message! Pin
Priya_Sundar19-Jul-08 0:30
Priya_Sundar19-Jul-08 0:30 
GeneralRe: Precendece warning Message! Pin
Ștefan-Mihai MOGA19-Jul-08 0:34
professionalȘtefan-Mihai MOGA19-Jul-08 0:34 
GeneralRe: Precendece warning Message! Pin
Priya_Sundar19-Jul-08 0:43
Priya_Sundar19-Jul-08 0:43 
QuestionRe: Precendece warning Message! Pin
David Crow19-Jul-08 11:10
David Crow19-Jul-08 11:10 
QuestionList Control in MFC Pin
AnithaSubramani18-Jul-08 19:42
AnithaSubramani18-Jul-08 19:42 
AnswerRe: List Control in MFC Pin
Ștefan-Mihai MOGA18-Jul-08 21:44
professionalȘtefan-Mihai MOGA18-Jul-08 21:44 
Questiontab control with dialogs Pin
ani_ikram18-Jul-08 19:33
ani_ikram18-Jul-08 19:33 
QuestionRe: tab control with dialogs Pin
Rajesh R Subramanian18-Jul-08 22:00
professionalRajesh R Subramanian18-Jul-08 22:00 
QuestionHow often should you seed a random number generator? Pin
Sauce!18-Jul-08 19:30
Sauce!18-Jul-08 19:30 
AnswerRe: How often should you seed a random number generator? Pin
bob1697218-Jul-08 19:36
bob1697218-Jul-08 19:36 
QuestionAdd menu in ChilFrame. Pin
lavate malllik18-Jul-08 19:26
lavate malllik18-Jul-08 19:26 

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.