Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, November 27, 2007 1:22:26 AM(UTC)
Gr-system

Groups: Registered
Posts: 4


HI, I am using VC6 + +, and the minah application use COM Methods for connection of Pins:
example:
Graph1:
Capture>pin1->Sink
Capture>pin2->Render
Graph2:
Source->MPEG4->file
I would create a server-client this way:

Server:
Source->LMNetMux->LMNetSnk

Client:
LMNetSnk->Render

Using methods COM
Someone help me?

Thanks.

GR.


 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, November 27, 2007 5:26:25 AM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

If you want to an example on how to create a client server application using LEADTOOLS COM objects, take a look at the following 2 sample demos installed with the toolkit:

1-LEAD Technologies\LEADTOOLS 15\Examples\Ltmm\vb\NetServer
2-LEAD Technologies\LEADTOOLS 15\Examples\Ltmm\vb\NetClient
 
#3 Posted : Tuesday, November 27, 2007 8:10:21 AM(UTC)
Gr-system

Groups: Registered
Posts: 4


Thanks but I would like to something done in VC+ +, here is a part of my project:

The problem in this code, and when I try to connect the pin of the mux to sink, an error occurs!!

// initialize COM library
hr = CoInitialize(NULL);
if(FAILED(hr))
{
return hr;
}



// Create the filter graph
hr = CoCreateInstance (CLSID_FilterGraph, NULL, CLSCTX_INPROC,
IID_IGraphBuilder, (void **) &g_pGraph);
if (FAILED(hr))
return hr;

// Create the capture graph builder
hr = CoCreateInstance (CLSID_CaptureGraphBuilder2 , NULL, CLSCTX_INPROC,
IID_ICaptureGraphBuilder2, (void **) &g_pCapture);
if (FAILED(hr))
return hr;

// Obtain interfaces for media control and Video Window
hr = g_pGraph->QueryInterface(IID_IMediaControl,(LPVOID *) &g_pMC);
if (FAILED(hr))
return hr;

hr = g_pGraph->QueryInterface(IID_IVideoWindow, (LPVOID *) &g_pVW);
if (FAILED(hr))
return hr;

hr = g_pGraph->QueryInterface(IID_IMediaEvent, (LPVOID *) &g_pME);
if (FAILED(hr))
return hr;




//hr = CoCreateInstance(CLSID_LMNetMux, 0, CLSCTX_INPROC_SERVER,
//IID_ILMNetMux,(void**)&Mux);
//pMux =Mux;
//pLNDp = pMux;
//g_pGraph->QueryInterface(IID_ILMNetMux, (void**) &Mux);

// hr = g_pGraph->AddFilter(pLNDp, L"LMNetMux");

//___________________________________
hr = CoCreateInstance(CLSID_LMNetSnk, 0, CLSCTX_INPROC_SERVER,
IID_ILMNetSnk,(void**)&Sink);
if (FAILED(hr))
return hr;
pLNSk =Sink;
hr = g_pGraph->AddFilter(pLNSk, L"LMNetSnk");

//=============Conects==============

HRESULT Conectamux()
{
HRESULT hr;
// Conectar LMNetMux
IPin * pOut = GetOutPin( pSrcFilter, 0 );// ponteiro Video Capture
IPin * pIn = GetInPin( iLmn, 0 );// ponteiro LMNetMux
hr = g_pGraph->Connect( pOut, pIn);// conecta, os pinos

return hr;
}

HRESULT ConectaSink()
{

HRESULT hr;
// Conectar LMNetSnk
IPin *pOut = GetOutPin(iLmn, 0 );// ponteiro LMNetMux
IPin * pIn = GetInPin( pLNSk, 0 );// ponteiro LMNetSnk
hr = g_pGraph->Connect( pOut, pIn);// conecta, os pinos
return hr;

}


 
#4 Posted : Tuesday, November 27, 2007 11:29:49 PM(UTC)

Qasem Lubani  
Guest

Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)


We do have C++ and plain C demos,
but they do not use the MS DirectShow SDK directly. The only demos and sample
we have use our own multimedia toolkit, which is based on DirectShow. If you want to see these demos, you can find them in these locations:


1- LEAD Technologies\LEADTOOLS 15\Examples\Ltmm\cpp\NetServer


2-LEAD Technologies\LEADTOOLS 15\Examples\Ltmm\cpp\NetClient
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.079 seconds.