Page 1 of 1

How Select specifiec PID(Program) on from C#

Posted: 15 Aug 2015 17:03
by mhheydarchi
Hi
This is my Code i want to select specific program when play a file.
This code play file but i want to select program number = 203 from file to play.
is there any incorrect argument.
please help me.

var argument = new string[] { "--program=203"};
IMediaPlayerFactory factory = new MediaPlayerFactory();
IMediaFromFile media = factory.CreateMedia<IMediaFromFile>("C:\\Test.ts", argument);
player = factory.CreatePlayer<IVideoPlayer>();
player.WindowHandle = tabControlPanelTV2.Handle;
player.Open(media);
media.Parse(true);
player.Play();

Re: How Select specifiec PID(Program) on from C#

Posted: 17 Aug 2015 10:04
by mhheydarchi
Hi
This is my Code i want to select specific program when play a file.
This code play file but i want to select program number = 203 from file to play.
is there any incorrect argument.
please help me.

var argument = new string[] { "--program=203"};
IMediaPlayerFactory factory = new MediaPlayerFactory();
IMediaFromFile media = factory.CreateMedia<IMediaFromFile>("C:\\Test.ts", argument);
player = factory.CreatePlayer<IVideoPlayer>();
player.WindowHandle = tabControlPanelTV2.Handle;
player.Open(media);
media.Parse(true);
player.Play();
I solved it.
i correct option to this : var argument = new string[] { "program=203"};