I code a prgram to play TV Tuner and other Video files with flash and WMP, I render the TV video with:
hr = captureGraphBuilder.RenderStream(PinCategory.Preview, MediaType.Video, theDevice, null, null);
when the program run, it can play TV, but after 3-10 minutes, The TV was stop and keep the playboard black. how can catch an event or check a status to know the TV has been stopped and let me restart it?
Thanks,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I did. My program do not need record the video. so I do not use mux and sink variable in dxtuner.cs. I coded it as a user control. it is working well in my test application. but when I add to my real application that plays movie files and TV Tuner together. the tv tuner will worked for 3-10 minutes then it will stop and keep the area in black.
when the TV stops, the CPU/Memory usage in task management performance tab will drop at once, besides, I found an icon showing "ActiveMovie window" will disappear when you click it. how can we catch the activemovie window lost event or check the status of the activeMovie window has changed , then let me play the TV again? how can we get the activeMovie window object?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I check the status of MidiaControl:
FilterState pfs;
int hr = mediaControl.GetState(10, out pfs);
if (pfs != FilterState.Running)
{
//Todo: stop playing TV and release memory at once, then replay it
}
I found the status is FilterState.Stopped. How can I stop playing TV and release memory at once, then replay it ? Thanks for any ideas.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I code a prgram to play TV Tuner and other Video files with flash and WMP, I render the TV video with:
hr = captureGraphBuilder.RenderStream(PinCategory.Preview, MediaType.Video, theDevice, null, null);
when the program run, it can play TV, but after 3-10 minutes, The TV was stop and keep the playboard black. how can catch an event or check a status to know the TV has been stopped and let me restart it?
Thanks,
Yes, I did. My program do not need record the video. so I do not use mux and sink variable in dxtuner.cs. I coded it as a user control. it is working well in my test application. but when I add to my real application that plays movie files and TV Tuner together. the tv tuner will worked for 3-10 minutes then it will stop and keep the area in black.
when the TV stops, the CPU/Memory usage in task management performance tab will drop at once, besides, I found an icon showing "ActiveMovie window" will disappear when you click it. how can we catch the activemovie window lost event or check the status of the activeMovie window has changed , then let me play the TV again? how can we get the activeMovie window object?
Thanks
It sounds like your graph variable has gone out of scope and the GC is coming along and freeing it.
I check the status of MidiaControl:
FilterState pfs;
int hr = mediaControl.GetState(10, out pfs);
if (pfs != FilterState.Running)
{
//Todo: stop playing TV and release memory at once, then replay it
}
I found the status is FilterState.Stopped. How can I stop playing TV and release memory at once, then replay it ? Thanks for any ideas.
I add the code as:
FilterState pfs;
int hr = mediaControl.GetState(10, out pfs);
if (pfs != FilterState.Running)
{
theDevice.Stop();
The Tv Tuner was working, but after about 2 minutes, other movie(swf, wmv, avi) were stop, how to fix it? any advice will be appreciated.
Did you look at the dxtuner sample?