|
Forum for users and developers of NMM
|
| View previous topic :: View next topic |
| Author |
Message |
guahai
Joined: 09 Nov 2009 Posts: 4
|
Posted: Mon Jan 18, 2010 4:03 pm Post subject: Question: Videostreaming over network |
|
|
Hi, i have written a simple application which loads on machine 1 a mpeg video file and it should be displayed on machine 2 (called display, which is in the same network as machine 1 in the CG chair), where serverregistry is runnning. Needed Nodes are all available.
This is the crucial part which is within a try and catch construct (similar to hellonmm examples):
| Code: |
NodeDescription reader("GenericReadNode"); //0
NodeDescription demuxer("MPEGDemuxNode"); //1
NodeDescription videodecoder("MPEGVideoDecodeNode");//3
NodeDescription videoplayer("XDisplayNode"); //4
NodeDescription audiodecoder("MPEGAudioDecodeNode"); //5
NodeDescription audioplayer("ALSAPlaybackNode");//6
videoplayer.setLocation("display");
graph.addEdge(reader, demuxer);
graph.addEdge(demuxer, "mpeg_video0", videodecoder);
graph.addEdge(demuxer, "mpeg_audio0", audiodecoder);
graph.addEdge(videodecoder, videoplayer);
graph.addEdge(audiodecoder, audioplayer);
cerr << "request GraphDescription from registry" << endl;
ClientRegistry& registry = app->getRegistry();
registry.requestGraph(graph);
INode* readfile = graph.getINode(reader);
IFileHandler_var read_filehandler
(readfile->getParentObject()->getCheckedInterface<IFileHandler>());
read_filehandler->setFilename(input_file);
// realize and start graph
cerr << "realizeGraph()" << endl;
graph.realizeGraph();
cerr << "startGraph()" << endl;
graph.startGraph();
// wait ...
cerr << "Playing video ... enter 'q <enter>' to exit." << endl;
string s;
cin >> s;
// stop and release graph
cerr << "stopGraph()" << endl;
graph.stopGraph();
cerr << "releaseGraph()" << endl;
registry.releaseGraph(graph);
|
The videofile is being played back but after some while. Before the playback i get the following Error messages:
| Code: |
NMM ERROR 2: > SockConnector> Connection failed
NMM ERROR 2: > TCPStrategy> Network error during connection setup
NMM ERROR 2: > TCPStrategy> Exception: ConnectionException >Connection refused at server.
NMM ERROR 0: Proxy> Exception during sendConnectToObject: Exception : BindingException : Exception: ConnectionException >Connection refused at server.
NMM ERROR 0: ClientRegistry> Exception : BindingException : Exception: ConnectionException >Connection refused at server.
|
then it tries to request the nodes GenericReadNode, MPEGDemuxNode, MPEGVideoDecodeNode, MPEGAudioDecodeNode, XDisplayNode and the ALSAPlaybackNode but when it tries to request XDisplayNode it throws the following error:
| Code: |
Must request XDisplayNode
Try to request Node from Host
134.96.249.94
NMM ERROR 0: > List> Invalid type assignment
NMM ERROR 0: > List> Current type : list_ObjectID Expected type: list_nmm_int64
NMM ERROR 0: > List> Current namespace : std Expected namespace: std
Invalid Magic Number 78
NMM ERROR 2: > TCPStrategy> Serialization error while receiving event reply
NMM ERROR 2: > TCPStrategy> Exception: Invalid Magic number
NMM ERROR 2: > TCPStrategy> Event: IRegistry::initRequest
NMM ERROR 2: > TCPStrategy> Connection closed while waiting for reply!
NMM ERROR 0: ClientRegistry> Exception : BindingException : Connection closed
NMM ERROR 2: > TCPStrategy> Connection closed while waiting for reply!
NMM WARNING 2: Dispatcher> Unhandled exception in listener for event IObjectAcceptor::connectToObject
NMM WARNING 2: Dispatcher> Exception : BindingException : Connection closed
NMM ERROR 2: > TCPStrategy> Sending request after connection was closed
NMM ERROR 0: ClientRegistry> Error Requesting session from 134.96.249.236:22801
NMM ERROR 0: ClientRegistry> Exception : RegistryException : Exception : BindingException : Connection closed
|
After a while, the nodes are requested again and then no error is thrown anymore and the video is played back on machine 2.
The serverregistry on machine 2 throws the following errors before the playback of the file:
| Code: |
./serverregistry -v
ServerRegistry successfully started!
NMM ERROR 2: > EmptyErrorHandler> Exception : RegistryException : A maximum timout occurs in the Registry. The access control is enabled by another process
NMM ERROR 2: > EmptyErrorHandler> Context:
NMM ERROR 2: > EmptyErrorHandler> OutOfBandBindingErrorContext
NMM ERROR 0: ServerRegistry> sshar: Init a new Session
NMM ERROR 2: > Distributed event listeners may only be removed through a TransportStrategy
NMM ERROR 2: > Distributed event listeners may only be registered through a TransportStrategy
NMM ERROR 0: ValueFactory> No type ISourceFileHandler in namespace NMM available
NMM ERROR 0: ValueFactory> No type ISeekable in namespace NMM available
NMM ERROR 0: ValueFactory> No type IMPEGDemux in namespace NMM available
NMM ERROR 0: ValueFactory> No type IALSADevice in namespace NMM available
NMM ERROR 0: ValueFactory> No type IAudioDevice in namespace NMM available
NMM ERROR 0: ValueFactory> No type IVolumeControl in namespace NMM available
|
What does these errors mean? What am i missing in my code? |
|
| Back to top |
|
 |
guahai
Joined: 09 Nov 2009 Posts: 4
|
Posted: Mon Jan 18, 2010 10:40 pm Post subject: |
|
|
ok, i solved the problem after testing and modifying.
i missed the right headers and libs from NMM. Clic was working without any problems, so i added all the headers and libs that were used by clic.
sorry, if there was some confusion...  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|