public MediaPlayInfo(string session, string url, STREAM_TYPE stream, ushort port) { mediaType = MEDIA_TYPE.STREAMING; serverSession = session; mediaURL = url; streamType = stream; serverPort = port; }
/// <summary> /// Set Callback play type select menu /// </summary> /// <param name="stmTp"></param> private void SetCallBackTypeCheck(STREAM_TYPE stmTp) { bool blnChecked = false; mnuCallBack_Audio.Checked = blnChecked; mnuCallBack_Audio.Image = imlMain.Images["AUDIO_ENABLE"]; mnuCallBack_Mix.Checked = blnChecked; mnuCallBack_Mix.Image = imlMain.Images["MIX_ENABLE"]; mnuCallBack_Video.Checked = blnChecked; mnuCallBack_Video.Image = imlMain.Images["VIDEO_ENABLE"]; mnuCallBack_WithOut.Checked = blnChecked; mnuCallBack_WithOut.Image = imlMain.Images["WITHOUT_ENABLE"]; blnChecked = true; switch (stmTp) { case STREAM_TYPE.STREAM_WITHOUT: mnuCallBack_WithOut.Checked = blnChecked; mnuCallBack_WithOut.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_AUDIO: mnuCallBack_Audio.Checked = blnChecked; mnuCallBack_Audio.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_VIDEO: mnuCallBack_Video.Checked = blnChecked; mnuCallBack_Video.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_MIX: mnuCallBack_Mix.Checked = blnChecked; mnuCallBack_Mix.Image = imlMain.Images["CHECKED_ENABLE"]; break; } }
public MediaPlayInfo(MEDIA_TYPE type, string url, STREAM_TYPE stream) { mediaType = type; mediaURL = url; streamType = stream; }
public MediaPlayInfo(MEDIA_TYPE type, string url, STREAM_TYPE stream) { mediaType = type; mediaURL = url; streamType = stream; }
public int Initialize(STREAM_TYPE streamType, int dwFlags, IGraphBuilder pFilterGraph) { if (IsValid) { throw new InvalidOperationException("Instance is already active."); } AMMultiMediaStream amms = new AMMultiMediaStream(); _pMMS = (IAMMultiMediaStream)amms; int hr = _pMMS.Initialize(streamType, dwFlags, pFilterGraph); if (hr == MSStatus.MS_S_OK) { hr = _pMMS.GetFilterGraph(out _pGB); } return hr; }
private void OpenStreamingSession(string session, string strURL, STREAM_TYPE streamType, ushort port) { ClosePlayer(); string username = "", passwd = "", url = ""; if (ParseURL(strURL, ref username, ref passwd, ref url) == false) { MessageBox.Show("잘못된 URL 입니다", "에러"); return; } dxPlayer.Test(0x9635371); int ret = dxPlayer.OpenLiveServerSession(session, strURL, (int)streamType, 2); if (ret == -9) { LoginWindow login = new LoginWindow(); login.Owner = this; if (login.ShowDialog() == true) { strURL = "rtsp://" + login.txtBoxID.Text + ":" + login.passwd.Password + "@" + url; OpenStreamingSession(session, strURL, streamType, port); } return; } if (ret < 0) { MessageBox.Show(strURL + " 을(를) 열지 못했습니다", "에러"); return; } ret = dxPlayer.Play(0.0); if (ret < 0) { ClosePlayer(); MessageBox.Show(strURL + " 을(를) 열지 못했습니다", "에러"); return; } ret = dxPlayer.StartServer(port); if (ret < 0) { ClosePlayer(); MessageBox.Show(strURL + "서버를 시작하지 못했습니다", "에러"); return; } sliderTimeline.Value = 0; sliderTimeline.IsEnabled = false; mediaInfo.Reset(); this.mediaType = MEDIA_TYPE.STREAMING; this.strURI = strURL; this.serverSession = session; this.streamType = streamType; State = PLAYER_STATE.STATE_PLAYING; AddRecentMediaList(new MediaPlayInfo(session, strURI, streamType, port)); }
/// <summary> /// Decode callback flow-hybrid menu dispose /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Mix_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_MIX; SetCallBackTypeCheck(stmType); }
/// <summary> /// 设置解码回调的流类型 /// </summary> /// <param name="nPort">播放通道号</param> /// <param name="streamType">解码回调流类型</param> /// <returns>true:成功;false:失败</returns> public static bool DHSetDecCBStream(int nPort, STREAM_TYPE streamType) { bool returnValue = false; if (streamType != STREAM_TYPE.STREAM_WITHOUT) { returnValue= PLAY_SetDecCBStream(nPort, (uint)streamType); } DHThrowLastError(nPort); return returnValue; }
/// <summary> /// Decode callback flow-audio menu dispose /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Audio_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_AUDIO; SetCallBackTypeCheck(stmType); }
/// <summary> /// Decode callback flow-video menu dispose /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Video_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_VIDEO; SetCallBackTypeCheck(stmType); }
/// <summary> /// Callback play type: none /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_WithOut_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_WITHOUT; SetCallBackTypeCheck(stmType); }
public MediaPlayInfo(string session, string url, STREAM_TYPE stream, ushort port) { mediaType = MEDIA_TYPE.STREAMING; serverSession = session; mediaURL = url; streamType = stream; serverPort = port; }
/// <summary> /// 设置播放回调类型选择菜单 /// </summary> /// <param name="stmTp"></param> private void SetCallBackTypeCheck(STREAM_TYPE stmTp) { bool blnChecked = false; mnuCallBack_Audio.Checked = blnChecked; mnuCallBack_Audio.Image = imlMain.Images["AUDIO_ENABLE"]; mnuCallBack_Mix.Checked = blnChecked; mnuCallBack_Mix.Image = imlMain.Images["MIX_ENABLE"]; mnuCallBack_Video.Checked = blnChecked; mnuCallBack_Video.Image = imlMain.Images["VIDEO_ENABLE"]; mnuCallBack_WithOut.Checked = blnChecked; mnuCallBack_WithOut.Image = imlMain.Images["WITHOUT_ENABLE"]; blnChecked=true; switch (stmTp) { case STREAM_TYPE.STREAM_WITHOUT: mnuCallBack_WithOut.Checked = blnChecked; mnuCallBack_WithOut.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_AUDIO: mnuCallBack_Audio.Checked = blnChecked; mnuCallBack_Audio.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_VIDEO: mnuCallBack_Video.Checked = blnChecked; mnuCallBack_Video.Image = imlMain.Images["CHECKED_ENABLE"]; break; case STREAM_TYPE.STREAM_MIX: mnuCallBack_Mix.Checked = blnChecked; mnuCallBack_Mix.Image = imlMain.Images["CHECKED_ENABLE"]; break; } }
/// <summary> /// 播放回调类型:无 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_WithOut_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_WITHOUT; SetCallBackTypeCheck(stmType); }
/// <summary> /// 解码回调流-视频菜单处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Video_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_VIDEO; SetCallBackTypeCheck(stmType); }
/// <summary> /// 解码回调流-混合菜单处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Mix_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_MIX; SetCallBackTypeCheck(stmType); }
/// <summary> /// 解码回调流-音频菜单处理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuCallBack_Audio_Click(object sender, EventArgs e) { stmType = STREAM_TYPE.STREAM_AUDIO; SetCallBackTypeCheck(stmType); }