C#视频闪烁 [英] C# video flickering

查看:188
本文介绍了C#视频闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的代码中存在一些问题,该问题使用vlc接口显示视频,同时使用窗体透明功能在视频全屏顶部显示覆盖.但这在我的Windows 7 PC上还可以,在XP机器上也越来越闪烁.

如果您知道解决方案,我们将不胜感激.或者,您可以给我任何符合我要求的解决方案:我需要显示UDP://流,所以我必须使用VLC,同时我需要在视频顶部显示节目信息. class ="h2_lin">解决方案

使用Flash视频文件并将其播放到Flash Player中.


您的视频是否覆盖在表单上.您可以使用以下代码并尝试

 公共 静态  void  SetDoubleBuffered(System.Windows.Forms.Form c)
       {
                      如果(System.Windows.Forms.SystemInformation.TerminalServerSession)
               返回;

           System.Reflection.PropertyInfo aProp =
                  typeof (System.Windows.Forms.Control).GetProperty(
                       " ,
                       System.Reflection.BindingFlags.NonPublic |
                       System.Reflection.BindingFlags.Instance);

           aProp.SetValue(c, true );
       } 



在表单加载中调用此方法.我在表单上叠加了来自网络摄像头的位图图像,这很有帮助.


I am having some issue in my code which is showing video using vlc interfacing and at the same time I''m showing an overlay on the top of video full screen using Form transparency capability. But this is fine in my Windows 7 PC and it is getting flickering in XP machine.

If you know the solution for it I would appreciate your cooperation. Or you can give me any solution that matches to my requirements: I need to show a UDP:// stream so I have to go for the VLC and at the same time I need to show program information on top of the video.

解决方案

Use flash video file and play it into flash player.


Is your video overlayed on your form. You can use the following code and try

public static void SetDoubleBuffered(System.Windows.Forms.Form c)
       {
                      if (System.Windows.Forms.SystemInformation.TerminalServerSession)
               return;

           System.Reflection.PropertyInfo aProp =
                 typeof(System.Windows.Forms.Control).GetProperty(
                       "DoubleBuffered",
                       System.Reflection.BindingFlags.NonPublic |
                       System.Reflection.BindingFlags.Instance);

           aProp.SetValue(c, true, null);
       }



call this in Form load. I was overlaying bitmap image from a webcam on my form and this helped.


这篇关于C#视频闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆