Click here to Skip to main content
15,905,136 members
Home / Discussions / C#
   

C#

 
GeneralRe: A question about the "checkboxlist" Pin
shanzy21-Sep-05 4:17
shanzy21-Sep-05 4:17 
Questionhidden info in text files Pin
akshayswaroop21-Sep-05 3:25
akshayswaroop21-Sep-05 3:25 
AnswerRe: hidden info in text files Pin
Dario Solera21-Sep-05 6:29
Dario Solera21-Sep-05 6:29 
QuestionGet access to the current method-context? Pin
Uwe Keim21-Sep-05 2:31
sitebuilderUwe Keim21-Sep-05 2:31 
AnswerRe: Get access to the current method-context? Pin
Andy Brummer21-Sep-05 4:10
sitebuilderAndy Brummer21-Sep-05 4:10 
GeneralRe: Get access to the current method-context? Pin
Uwe Keim21-Sep-05 4:53
sitebuilderUwe Keim21-Sep-05 4:53 
GeneralRe: Get access to the current method-context? Pin
Andy Brummer21-Sep-05 5:35
sitebuilderAndy Brummer21-Sep-05 5:35 
QuestionCapture with Windows Media Encoder SDK Pin
shmarov21-Sep-05 1:48
shmarov21-Sep-05 1:48 
Hi all!

I need to create application to capture video and audio. To do this I use WMEncoder SDK. I use video tape recorder device connected through a COM port using the Sony RS422 protocol. Everything is good - I can capture and control my device. But I have a problem, when I try to change settings of encoder instance. Here is source:

<br />
WMEncoder Encoder;<br />
IWMEncSourceGroupCollection SrcGrpColl;<br />
IWMEncSourceGroup2 SrcGrp;<br />
IWMEncVideoSource2 SrcVid;<br />
IWMEncSource SrcAud;<br />
IWMEncDeviceControlCollection DCColl;<br />
IWMEncDeviceControl DControl;<br />
IWMEncDeviceControlPlugin DCPlugin;<br />
//Create new Encoder instance and add settings<br />
Encoder = new WMEncoder();<br />
SrcGrpColl = Encoder.SourceGroupCollection;<br />
SrcGrp = (IWMEncSourceGroup2) SrcGrpColl.Add("SG_1");<br />
SrcVid = (IWMEncVideoSource2) SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);<br />
SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);<br />
//Bind my video and audio device to Encoder<br />
SrcVid.SetInput(_video, "Device", "" ); //Here _video is name of my videodevice<br />
SrcAud.SetInput(_audio, "Device", "" ); //and _audio is name of audiodevice<br />
//Bind my profile to Encoder, _profile is name of using profile<br />
IWMEncProfileCollection ProColl = Encoder.ProfileCollection;<br />
for (int i=0; i<ProColl.Count; i++)<br />
	if (ProColl.Item(i).Name == _profile)<br />
	{<br />
		SrcGrp.set_Profile(ProColl.Item( i ));<br />
		break;<br />
	}<br />
//Bind my control device to Encoder, _device is name of using control device<br />
DCColl = SrcGrp.DeviceControlCollection;<br />
DControl = DCColl.Add();<br />
DControl.SetInput(_device, "DeviceControl", "");<br />
//Prepare to Encode<br />
Encoder.PrepareToEncode(true);<br />
//Result of previous operator is ok. Now I bind DeviceControlPlugin to Encoder<br />
DCPlugin=(IWMEncDeviceControlPlugin)DControl1.GetDeviceControlPlugin();<br />


So, when I try to change my settings (_video, _audio, _profile or _device) and do Encoder.PrepareToEncode(true) I catch an exception "It was not possible to find a valid source plug-in for the specified source". I try to set null for all of using vars after doing Encoder.PrepareToEncode(false), but have no result. Maybe somebody do something like this? Thanx for all advices.

_sergei
QuestionAvoid stuck while reading a large textfile Pin
Seraphin21-Sep-05 0:14
Seraphin21-Sep-05 0:14 
AnswerRe: Avoid stuck while reading a large textfile Pin
Guffa21-Sep-05 0:41
Guffa21-Sep-05 0:41 
GeneralRe: Avoid stuck while reading a large textfile Pin
Seraphin21-Sep-05 0:48
Seraphin21-Sep-05 0:48 
GeneralRe: Avoid stuck while reading a large textfile Pin
Guffa21-Sep-05 1:24
Guffa21-Sep-05 1:24 
GeneralRe: Avoid stuck while reading a large textfile Pin
Seraphin21-Sep-05 1:49
Seraphin21-Sep-05 1:49 
GeneralRe: Avoid stuck while reading a large textfile Pin
Dan Neely21-Sep-05 1:53
Dan Neely21-Sep-05 1:53 
GeneralRe: Avoid stuck while reading a large textfile Pin
Guffa21-Sep-05 3:37
Guffa21-Sep-05 3:37 
Question.net remoting Pin
Geert van Horrik21-Sep-05 0:04
Geert van Horrik21-Sep-05 0:04 
AnswerRe: .net remoting Pin
S. Senthil Kumar21-Sep-05 4:28
S. Senthil Kumar21-Sep-05 4:28 
GeneralRe: .net remoting Pin
Geert van Horrik21-Sep-05 4:40
Geert van Horrik21-Sep-05 4:40 
Questionenconding style ERROR Pin
Campaniço20-Sep-05 23:44
Campaniço20-Sep-05 23:44 
Questionwindows service Pin
Mridang Agarwalla20-Sep-05 21:54
Mridang Agarwalla20-Sep-05 21:54 
Questionhow to make it work?? Pin
shanzy20-Sep-05 21:52
shanzy20-Sep-05 21:52 
AnswerRe: how to make it work?? Pin
Guffa20-Sep-05 21:55
Guffa20-Sep-05 21:55 
AnswerRe: how to make it work?? Pin
mav.northwind20-Sep-05 22:01
mav.northwind20-Sep-05 22:01 
GeneralRe: how to make it work?? Pin
shanzy20-Sep-05 22:05
shanzy20-Sep-05 22:05 
AnswerRe: how to make it work?? Pin
Luis Alonso Ramos21-Sep-05 5:47
Luis Alonso Ramos21-Sep-05 5:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.