long AddCustomFormat(IltmmConvert *pConvert){IltmmTargetFormats* pFormats;IltmmTargetFormat* pFormat;BSTR bstr;long count, lStreams;pConvert->get_TargetFormats(&pFormats);// add a new format at the end of the formats listbstr = SysAllocString(L"My Own Format");pFormats->Add(bstr, -1);// get the new formatpFormats->get_Count(&count);pFormats->Item(count-1, &pFormat);/* set the format's sink filter: this example uses "LEAD Network Sink" */bstr = SysAllocString(L"@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\\{E2B7DE05-38C5-11D5-91F6-00104BDB8FF9}");pFormat->put_Sink(bstr);SysFreeString(bstr);/* set the format's mux filter: : this example uses "LEAD Network Multiplexer" */bstr = SysAllocString(L"@device:sw:{083863F1-70DE-11D0-BD40-00A0C911CE86}\\{E2B7DE01-38C5-11D5-91F6-00104BDB8FF9}");pFormat->put_Mux(bstr);SysFreeString(bstr);// specify what streams your new format can havepFormat->put_Streams(ltmmTargetFormat_Stream_Audio|ltmmTargetFormat_Stream_Video);// get the streamspFormat->get_Streams(&lStreams);// verify them as needed ...// thats itpFormat->Release();pFormats->Release();// call put_TargetFormat(count-1) to use your new format.// return the format indexreturn (count-1);}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
