#include "ltmm.h"
#include "ILMNetDmx2.h"
void main()
{
IltmmPlay* pPlay ;
IUnknown* pUnk = NULL;
ILMNetDmx* pDmx;
long bitrate = 0;
BSTR Message;
BSTR sServer;
BSTR szFileName;
CoInitialize(NULL);
CoCreateInstance(CLSID_ltmmPlay, NULL, CLSCTX_INPROC_SERVER, IID_IltmmPlay, (void**) &pPlay);
// set the player source:
sServer = SysAllocString(L"ltsf://10.0.4.23");
pPlay->put_SourceFile(sServer);
SysFreeString(sServer);
// you can monitor the incoming bit rate by checking the BitRate property of
// the demultiplexer object:
pPlay->GetSubObject(ltmmPlay_Object_Splitter, &pUnk);
pUnk->QueryInterface(IID_ILMNetDmx, (void**) &pDmx);
pUnk->Release();
pDmx->get_BitRate(&bitrate); // you may display the value
// Get the output file name
pDmx->get_OutputFileName(&szFileName);
if (szFileName == NULL)
{
// Set the output file name to record the incoming stream
szFileName = SysAllocString(MAKE_MEDIA_PATH("output.avi"));
pDmx->put_OutputFileName(szFileName);
}
SysFreeString(szFileName);
// if the AutoStart property is not TRUE, you need to run the player:
pPlay->Run();
// To give a chance to receive some data
Sleep(20000);
/* to receive a text message sent by the server, use the ReadMessage method: */
/* first, get the demux interface again (you might want to keep it for the life of
the communication session:
read the message: */
pDmx->ReadMessage(&Message);
pDmx->Release();
pPlay->Release();
CoUninitialize();
/* do something with the message. */
/* You need to call ReadMessage continuously to check for new messages.*/
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.