Click here to Skip to main content
15,913,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: is VC.NET a transient technology? Pin
Stephane Rodriguez.30-Oct-02 20:59
Stephane Rodriguez.30-Oct-02 20:59 
QuestionFriend Functions defy OOP,why? Pin
abhinarulkar30-Oct-02 19:27
abhinarulkar30-Oct-02 19:27 
AnswerRe: Friend Functions defy OOP,why? Pin
Chris Losinger30-Oct-02 20:01
professionalChris Losinger30-Oct-02 20:01 
AnswerRe: Friend Functions defy OOP,why? Pin
Christian Graus30-Oct-02 20:14
protectorChristian Graus30-Oct-02 20:14 
GeneralAbout the Apllication using CDaoRecordset Pin
Forlegend30-Oct-02 19:24
Forlegend30-Oct-02 19:24 
GeneralRe: About the Apllication using CDaoRecordset Pin
dabs31-Oct-02 4:17
dabs31-Oct-02 4:17 
QuestionHow to use DirectShow Filters? Pin
sonshiro30-Oct-02 19:09
sonshiro30-Oct-02 19:09 
AnswerRe: How to use DirectShow Filters? Pin
Stephane Rodriguez.30-Oct-02 19:30
Stephane Rodriguez.30-Oct-02 19:30 
Launch the FilterGraphManager, that's one of the .exe provided.

Then Insert this filter in the client area, and right-click Render on its output pin. This should auto-build the necessary filter graph.

That was the get-your-hands-on-it phase.

Now to do it by code, just take any sample movie player in the SDK, and do just this :

// incorporation dans le filter graph (pour l'instant n'importe où)
// du filtre Video Renderer de remplacement
HRESULT CPlayerDoc::AddNewVideoRendererToGraph()
{
HRESULT  hr ;

IBaseFilter *pFilter=NULL;

hr = CoCreateInstance(CLSID_ARST_VIDEORenderer, NULL, CLSCTX_INPROC_SERVER, IID_IBaseFilter, (LPVOID *)&pFilter) ;
if (FAILED(hr))
{
  switch (hr)
  {
    case E_INVALIDARG : TRACE("INVALID_ARG\n");break;
    case REGDB_E_CLASSNOTREG : TRACE ("REGDB_E_CLASSNOTREG\n");break;
    case CLASS_E_NOAGGREGATION : TRACE ("CLASS_E_NOAGGREGATION\n");break;
    default:break;
  }
  return E_FAIL ;
}

hr = m_pGraph->AddFilter(pFilter, L"ARST VIDEO RENDERER") ;
if (FAILED(hr))
{
  pFilter->Release();
  return E_FAIL ;
}
    
return S_OK ;
}



And for the rendering part :
BOOL CPlayerDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
    WCHAR	wPath[MAX_PATH];

    DeleteContents();

    if ( !CreateFilterGraph() ) 
	{
        AfxMessageBox(IDS_CANT_INIT_QUARTZ);
        return FALSE;
    }

    ::MultiByteToWideChar( CP_ACP, 0, lpszPathName,
                         -1, wPath, MAX_PATH );


	// ajoute le filtre de rendu avant de faire le RenderFile,
	// cela permet au FilterGraph de le prendre comme filtre de rendu
	// au lieu d'appliquer le Video Renderer ActiveMovie.
	AddNewVideoRendererToGraph();

    if (FAILED( m_pGraph->RenderFile(wPath, NULL) )) 
	{
        AfxMessageBox(IDS_CANT_RENDER_FILE);
        return FALSE;
    }





How low can you go ?
(MS rant)

GeneralMutex, a simple question. Pin
devvvy30-Oct-02 18:15
devvvy30-Oct-02 18:15 
GeneralRe: Mutex, a simple question. Pin
Scott H. Settlemier30-Oct-02 18:50
Scott H. Settlemier30-Oct-02 18:50 
GeneralRe: Mutex, a simple question. Pin
devvvy30-Oct-02 19:30
devvvy30-Oct-02 19:30 
Generaldetecting server socket reset Pin
Anonymous30-Oct-02 16:53
Anonymous30-Oct-02 16:53 
GeneralRe: detecting server socket reset Pin
Member 1006688325-Jun-14 2:53
Member 1006688325-Jun-14 2:53 
GeneralDisable Item in ListBox Pin
:_Rocket_:30-Oct-02 16:45
:_Rocket_:30-Oct-02 16:45 
GenerallParam vs wParam Pin
stevenson30-Oct-02 16:36
stevenson30-Oct-02 16:36 
GeneralRe: lParam vs wParam Pin
Anatari30-Oct-02 17:05
Anatari30-Oct-02 17:05 
GeneralRe: lParam vs wParam Pin
Paul M Watt30-Oct-02 18:14
mentorPaul M Watt30-Oct-02 18:14 
GeneralRe: lParam vs wParam Pin
devvvy30-Oct-02 18:24
devvvy30-Oct-02 18:24 
GeneralMulti-threading Pin
Gary Kirkham30-Oct-02 16:31
Gary Kirkham30-Oct-02 16:31 
GeneralRe: Multi-threading Pin
Joaquín M López Muñoz30-Oct-02 20:07
Joaquín M López Muñoz30-Oct-02 20:07 
GeneralRe: Multi-threading Pin
Gary Kirkham1-Nov-02 3:35
Gary Kirkham1-Nov-02 3:35 
GeneralIE Pin
candan30-Oct-02 16:11
professionalcandan30-Oct-02 16:11 
GeneralRe: IE Pin
Stephane Rodriguez.30-Oct-02 19:33
Stephane Rodriguez.30-Oct-02 19:33 
GeneralRe: IE Pin
candan30-Oct-02 20:14
professionalcandan30-Oct-02 20:14 
GeneralRe: IE Pin
Stephane Rodriguez.30-Oct-02 20:20
Stephane Rodriguez.30-Oct-02 20:20 

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.