// 构造方法 public VideoModule(VlcPlayer player) { this.mPlayer = player; isMediaOpen = false; isPlaying = false; isFullScreen = false; playSpeed = 0; forwardFlag = false; reverseFlag = false; storeModule = FileStore.getFileStoreInstance(); }
/******************** 视频相关 ********************/ /// <summary> /// 初始化视频交互模块 /// </summary> private void iniVideoModule() { // 初始化VlcPlayer string pluginPath = Environment.CurrentDirectory + "\\plugins\\"; // 将VlcPlayer与panel绑定 mVlcPlayer = new VlcPlayer(pluginPath); IntPtr render_wnd = this.videoPanel.Handle; mVlcPlayer.SetRenderWindow((int)render_wnd); // 用VlcPlayer构造VideoModule mVideoModule = new VideoModule(mVlcPlayer); videoVolumeTrackBar.SetRange(0, 100); videoVolumeTrackBar.Value = 50; }