PDA

View Full Version : Network Source and Renderer Delph Questions



zkaesberg
September 25, 2012, 21:10:26
Let me first say I can get the Renderer and the source filters to work with no problems using graphedit which is attached if I do the following.
1521

I set the IP address and port via the properties page and then click on the button "Update network connections" The Light goes green and I can then connect the pins in the graph then I can play the graph and it display the video with no problems.

My question is this. In delphi how do I make it so that I can connect the pins? In the below code it makes the graph correct but it is unable to connect the pins. Does calling the UpdateNetworkCOnnections command do the same as pressing the button? What step and code am I missing?



//Make the MonitVision Network Source Filter
AddFilterByCLSID( FFilterGraph, CLSID_MonitoNetworkSource, 'MV Network Source',SourceFilter);

//Make the properties of the Video Source Filter Editable
if(FAILED(SourceFilter.QueryInterface(IID_IMVNetwo rkSourceProperties,RemoteInterface))) then
begin
SourceFilter := nil;
ClearGraph;
exit;
end;

RemoteInterface.Set_ServerAddress(IPAddress);
RemoteInterface.Set_Port(8001);
RemoteInterface.UpdateNetworkConnection;


//Now make the Verint Decoder and connect it with the MV Netowrk Source
if(FAILED(AddFilterByCLSID( FFilterGraph, CLSID_VerintVideoDecoder,'Verint Video Solution Decoder Filter',VerintDecoder))) then
begin
SourceFilter := nil;
ClearGraph;
exit;
end;
RemoteInterface.UpdateNetworkConnection;
ConnectFilters(FFilterGraph,SourceFilter,VerintDec oder);

//Now make the Video Render Filter
if(FAILED(AddFilterByCLSID( FFilterGraph, CLSID_VideoRender,'Video Renderer',VideoRender))) then
begin
SourceFilter := nil;
ClearGraph;
exit;
end;
ConnectFilters(FFilterGraph,VerintDecoder,VideoRen der);

SaveGraphFile(FFilterGraph,'C:\mygraphRemote.grf') ;
result := true;