求教Microsoft.DirectX.AudioVideovideo playbackk.video类解决办法

DirectX里的Video和Audio C#的哦
最简单要求,就是对音频文件和视频文件可以定位查找,本来它的Video和Audio类都提供了Seek方法,但它们根本不能工作,每次Seek后,都回到0的位置上。后来用Reflector来看它的源代码,结果也是不尽人意,很多底层的代码没有办法反射出来。特别是DX里的一些接口,根本无法查看。最后也只好先暂停了。
本来还想着,要是DX在.Net下封装的比较好的话,我就可以少用C++的COM了,直接用C#来写组件也方便多了。没想到MS的托管DX确实还不够完善,我看可能要等以后的版本了。不过它的MediaPlay的SDK还是不错的,有机会也看看。
using System.D&
using System.C&
using System.Windows.F&
using Microsoft.DirectX;&
using Microsoft.DirectX.AudioVideoP&
namespace Webb.DirectX.Debug2&
&&& /**//// &summary&&
&&& /// Summary description for Form1.&
&&& /// &/summary&&
&&& public class AVPlayer : System.Windows.Forms.Form&
&&&&&&& private string filterText = &Video Files (*. *. *. *. *. *.m1v; *.wmv)|*. *. *. *. *. *.m1v; *.wmv|& +&
&&&&&&&&&&& &Audio files (*. *. *.mp2; *.mp3; *. *. *. *. *.wma)|*. *. *.mp2; *.mp3; *. *. *. *. *.wma|& +&
&&&&&&&&&&& &MIDI Files (*.mid, *.midi, *.rmi)|*. *. *.rmi|& +&
&&&&&&&&&&& &Image Files (*.jpg, *.bmp, *.gif, *.tga)|*. *. *. *.tga|& +&
&&&&&&&&&&& &All Files (*.*)|*.*&;&
&&&&&&& private Video ourVideo =&
&&&&&&& private Audio ourAudio =&
&&&&&&& Winforms variables#region Winforms variables&
&&&&&&& /**//// &summary&&
&&&&&&& /// Required designer variable.&
&&&&&&& /// &/summary&&
&&&&&&& ponentModel.Container components =&
&&&&&&& private System.Windows.Forms.MainMenu mnuM&
&&&&&&& private System.Windows.Forms.OpenFileDialog ofdO&
&&&&&&& private System.Windows.Forms.MenuItem menuItem3;&
&&&&&&& private System.Windows.Forms.MenuItem mnuF&
&&&&&&& private System.Windows.Forms.MenuItem mnuO&
&&&&&&& private System.Windows.Forms.MenuItem menuItem1;&
&&&&&&& private System.Windows.Forms.MenuItem mnuP&
&&&&&&& private System.Windows.Forms.MenuItem mnuS&
&&&&&&& private System.Windows.Forms.MenuItem mnuP&
&&&&&&& private System.Windows.Forms.MenuItem menuItem2;&
&&&&&&& private System.Windows.Forms.MenuItem mnuF&
&&&&&&& private System.Windows.Forms.ToolBar toolBar1;&
&&&&&&& private System.Windows.Forms.ToolBarButton toolBarButton1;&
&&&&&&& private System.Windows.Forms.ToolBarButton toolBarButton2;&
&&&&&&& private System.Windows.Forms.ToolBarButton toolBarButton3;&
&&&&&&& private System.Windows.Forms.ToolBarButton toolBarButton4;&
&&&&&&& private System.Windows.Forms.ToolBarButton toolBarButton5;&
&&&&&&& private System.Windows.Forms.MenuItem mnuE&
&&&&&&& #endregion&
&&&&&&& public AVPlayer()&
&&&&&&& {&
&&&&&&&&&&& //&
&&&&&&&&&&& // Required for Windows Form Designer support&
&&&&&&&&&&& //&
&&&&&&&&&&& InitializeComponent();&
&&&&&&&&&&& OpenFile();&
&&&&&&& }&
&&&&&&& private bool _IsVideo =&
&&&&&&& /**//// &summary&&
&&&&&&& /// Clean up any resources being used.&
&&&&&&& /// &/summary&&
&&&&&&& protected override void Dispose( bool disposing )&
&&&&&&& {&
&&&&&&&&&&& CleanupObjects();&
&&&&&&&&&&& if( disposing )&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& if (components != null)&&
&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&& components.Dispose();&
&&&&&&&&&&&&&&& }&
&&&&&&&&&&& }&
&&&&&&&&&&& base.Dispose( disposing );&
&&&&&&& }&
&&&&&&& Windows Form Designer generated code#region Windows Form Designer generated code&
&&&&&&& /**//// &summary&&
&&&&&&& /// Required method for Designer support - do not modify&
&&&&&&& /// the contents of this method with the code editor.&
&&&&&&& /// &/summary&&
&&&&&&& private void InitializeComponent()&
&&&&&&& {&
&&&&&&&&&&& this.mnuMain = new System.Windows.Forms.MainMenu();&
&&&&&&&&&&& this.mnuFile = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuOpen = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.menuItem3 = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuExit = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.menuItem1 = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuPlay = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuStop = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuPause = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.menuItem2 = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.mnuFull = new System.Windows.Forms.MenuItem();&
&&&&&&&&&&& this.ofdOpen = new System.Windows.Forms.OpenFileDialog();&
&&&&&&&&&&& this.toolBar1 = new System.Windows.Forms.ToolBar();&
&&&&&&&&&&& this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();&
&&&&&&&&&&& this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();&
&&&&&&&&&&& this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();&
&&&&&&&&&&& this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();&
&&&&&&&&&&& this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();&
&&&&&&&&&&& this.SuspendLayout();&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuMain&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuMain.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuFile,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.menuItem1});&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuFile&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuFile.Index = 0;&
&&&&&&&&&&& this.mnuFile.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuOpen,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.menuItem3,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuExit});&
&&&&&&&&&&& this.mnuFile.Text = &&File&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuOpen&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuOpen.Index = 0;&
&&&&&&&&&&& this.mnuOpen.Shortcut = System.Windows.Forms.Shortcut.CtrlO;&
&&&&&&&&&&& this.mnuOpen.Text = &&Open Clip&;&
&&&&&&&&&&& this.mnuOpen.Click += new System.EventHandler(this.mnuOpen_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // menuItem3&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.menuItem3.Index = 1;&
&&&&&&&&&&& this.menuItem3.Text = &-&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuExit&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuExit.Index = 2;&
&&&&&&&&&&& this.mnuExit.Text = &E&xit&;&
&&&&&&&&&&& this.mnuExit.Click += new System.EventHandler(this.mnuExit_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // menuItem1&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.menuItem1.Index = 1;&
&&&&&&&&&&& this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuPlay,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuStop,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuPause,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.menuItem2,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.mnuFull});&
&&&&&&&&&&& this.menuItem1.Text = &&Control&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuPlay&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuPlay.Index = 0;&
&&&&&&&&&&& this.mnuPlay.Shortcut = System.Windows.Forms.Shortcut.CtrlP;&
&&&&&&&&&&& this.mnuPlay.Text = &&Play&;&
&&&&&&&&&&& this.mnuPlay.Click += new System.EventHandler(this.mnuPlay_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuStop&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuStop.Index = 1;&
&&&&&&&&&&& this.mnuStop.Shortcut = System.Windows.Forms.Shortcut.CtrlS;&
&&&&&&&&&&& this.mnuStop.Text = &&Stop&;&
&&&&&&&&&&& this.mnuStop.Click += new System.EventHandler(this.mnuStop_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuPause&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuPause.Index = 2;&
&&&&&&&&&&& this.mnuPause.Shortcut = System.Windows.Forms.Shortcut.CtrlA;&
&&&&&&&&&&& this.mnuPause.Text = &P&ause&;&
&&&&&&&&&&& this.mnuPause.Click += new System.EventHandler(this.mnuPause_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // menuItem2&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.menuItem2.Index = 3;&
&&&&&&&&&&& this.menuItem2.Text = &-&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // mnuFull&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.mnuFull.Index = 4;&
&&&&&&&&&&& this.mnuFull.Text = &Toggle Fu&llscreen\t&Alt-Enter&&;&
&&&&&&&&&&& this.mnuFull.Click += new System.EventHandler(this.mnuFull_Click);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBar1&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.toolBarButton1,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.toolBarButton2,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.toolBarButton3,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.toolBarButton4,&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& this.toolBarButton5});&
&&&&&&&&&&& this.toolBar1.DropDownArrows =&
&&&&&&&&&&& this.toolBar1.Location = new System.Drawing.Point(0, 0);&
&&&&&&&&&&& this.toolBar1.Name = &toolBar1&;&
&&&&&&&&&&& this.toolBar1.ShowToolTips =&
&&&&&&&&&&& this.toolBar1.Size = new System.Drawing.Size(536, 42);&
&&&&&&&&&&& this.toolBar1.TabIndex = 0;&
&&&&&&&&&&& this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBarButton1&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBarButton1.Text = &Play&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBarButton2&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBarButton2.Text = &Stop&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBarButton3&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBarButton3.Text = &End&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBarButton4&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBarButton4.Text = &Begin&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // toolBarButton5&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.toolBarButton5.Text = &Next&;&
&&&&&&&&&&& //&&
&&&&&&&&&&& // AVPlayer&
&&&&&&&&&&& //&&
&&&&&&&&&&& this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);&
&&&&&&&&&&& this.ClientSize = new System.Drawing.Size(536, 305);&
&&&&&&&&&&& this.Controls.Add(this.toolBar1);&
&&&&&&&&&&& this.Menu = this.mnuM&
&&&&&&&&&&& this.Name = &AVPlayer&;&
&&&&&&&&&&& this.Text = &Audio Video Player&;&
&&&&&&&&&&& this.ResumeLayout(false);&
&&&&&&& }&
&&&&&&& #endregion&
&&&&&&& private void CleanupObjects()&
&&&&&&& {&
&&&&&&&&&&& if (ourVideo != null)&
&&&&&&&&&&&&&&& ourVideo.Dispose();&
&&&&&&&&&&& if (ourAudio != null)&
&&&&&&&&&&&&&&& ourAudio.Dispose();&
&&&&&&& }&
&&&&&&& private void OpenFile()&
&&&&&&& {&
//&&&&&&&&&&& if ((ofdOpen.InitialDirectory == null) || (ofdOpen.InitialDirectory == string.Empty))&
//&&&&&&&&&&&&&&& ofdOpen.InitialDirectory = DXUtil.SdkMediaP&
&&&&&&&&&&& ofdOpen.Filter = filterT&
&&&&&&&&&&& ofdOpen.Title = &Open media file&;&
&&&&&&&&&&& ofdOpen.ShowDialog(this);&
&&&&&&&&&&& // Now let's try to open this file&
&&&&&&&&&&& if ((ofdOpen.FileName != null) && (ofdOpen.FileName != string.Empty))&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& try&
&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&& if (ourVideo == null)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& // First try to open this as a video file&
&&&&&&&&&&&&&&&&&&&&&&& ourVideo = new Video(ofdOpen.FileName);&
&&&&&&&&&&&&&&&&&&&&&&& ourVideo.Ending += new System.EventHandler(this.ClipEnded);&
&&&&&&&&&&&&&&&&&&&&&&& ourVideo.Owner =&
&&&&&&&&&&&&&&&&&&&&&&& // Start playing now&
&&&&&&&&&&&&&&&&&&&&&&& ourVideo.Play();&
&&&&&&&&&&&&&&&&&&&&&&& this._IsVideo =&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& ourVideo.Open(ofdOpen.FileName, true);&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&& catch&
&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&& try&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& // opening this as a video file failed.. Maybe it's audio only?&
&&&&&&&&&&&&&&&&&&&&&&& ourAudio = new Audio(ofdOpen.FileName);&
&&&&&&&&&&&&&&&&&&&&&&& ourAudio.Ending += new System.EventHandler(this.ClipEnded);&
&&&&&&&&&&&&&&&&&&&&&&& // Start playing now&
&&&&&&&&&&&&&&&&&&&&&&& ourAudio.Play();&
&&&&&&&&&&&&&&&&&&&&&&& this._IsVideo =&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& catch&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& MessageBox.Show(&This file could not be opened.&, &Invalid file.&, MessageBoxButtons.OK, rmation);&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&& }&
&&&&&&&&&&& }&
&&&&&&& }&
&&&&&&& private void ClipEnded(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& // The clip has ended, stop and restart it&
//&&&&&&&&&&& if (ourVideo != null)&
//&&&&&&&&&&& {&
//&&&&&&&&&&&&&&& ourVideo.Stop();&
//&&&&&&&&&&&&&&& ourVideo.Play();&
//&&&&&&&&&&& }&
//&&&&&&&&&&& else&
//&&&&&&&&&&& {&
//&&&&&&&&&&&&&&& if (ourAudio != null)&
//&&&&&&&&&&&&&&& {&
//&&&&&&&&&&&&&&&&&&& ourAudio.Stop();&
//&&&&&&&&&&&&&&&&&&& ourAudio.Play();&
//&&&&&&&&&&&&&&& }&
//&&&&&&&&&&& }&
&&&&&&& }&
&&&&&&& private void mnuOpen_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& this.OpenFile();&
&&&&&&& }&
&&&&&&& private void mnuPlay_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& if (ourVideo != null)&
&&&&&&&&&&&&&&& ourVideo.Play();&
&&&&&&&&&&& else&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& if (ourAudio != null)&
&&&&&&&&&&&&&&&&&&& ourAudio.Play();&
&&&&&&&&&&& }&
&&&&&&& }&
&&&&&&& private void mnuStop_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& if (ourVideo != null)&
&&&&&&&&&&&&&&& ourVideo.Stop();&
&&&&&&&&&&& else&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& if (ourAudio != null)&
&&&&&&&&&&&&&&&&&&& ourAudio.Stop();&
&&&&&&&&&&& }&
&&&&&&& }&
&&&&&&& private void mnuPause_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& if (ourVideo != null)&
&&&&&&&&&&&&&&& ourVideo.Pause();&
&&&&&&&&&&& else&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& if (ourAudio != null)&
&&&&&&&&&&&&&&&&&&& ourAudio.Pause();&
&&&&&&&&&&& }&
&&&&&&& }&
&&&&&&& private void mnuExit_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& this.Dispose();&
&&&&&&& }&
&&&&&&& private void mnuFull_Click(object sender, System.EventArgs e)&
&&&&&&& {&
&&&&&&&&&&& if (ourVideo != null)&
&&&&&&&&&&&&&&& ourVideo.Fullscreen = !ourVideo.F&
&&&&&&& }&
&&&&&&& protected override void OnKeyDown(System.Windows.Forms.KeyEventArgs e)&
&&&&&&& {&
&&&&&&&&&&& if ( (e.Alt) && (e.KeyCode == System.Windows.Forms.Keys.Return))&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& mnuFull_Click(mnuFull, null);&
&&&&&&&&&&& }&
&&&&&&&&&&& // Allow the control to handle the keystroke now&
&&&&&&&&&&& base.OnKeyDown(e);&
&&&&&&& }&
&&&&&&& private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)&
&&&&&&& {&
&&&&&&&&&&&&&
&&&&&&&&&&& switch(e.Button.Text)&
&&&&&&&&&&& {&
&&&&&&&&&&&&&&& case &Play&:&
&&&&&&&&&&&&&&&&&&& if(this._IsVideo)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.Play();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.Play();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& case &End&:&
&&&&&&&&&&&&&&&&&&& if(_IsVideo)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& double m_length = this.ourVideo.D&&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&&&&&&&&&& try&
&&&&&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&&&&&& if(this.ourVideo.SeekingCaps.CanSeekForwards)&
&&&&&&&&&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& double m_result = this.ourVideo.SeekCurrentPosition(5,SeekPositionFlags.AbsolutePositioning);&
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& MessageBox.Show(m_result.ToString());&
&&&&&&&&&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&&&& catch(Exception ex)&
&&&&&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&&&&&& MessageBox.Show(ex.Message);&
&&&&&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& double m_length = this.ourAudio.D&
&&&&&&&&&&&&&&&&&&&&&&& double m_result = this.ourAudio.SeekCurrentPosition(5,SeekPositionFlags.AbsolutePositioning);&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& case &Begin&:&
&&&&&&&&&&&&&&&&&&& if(_IsVideo)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.SeekCurrentPosition(0,SeekPositionFlags.AbsolutePositioning);&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.SeekCurrentPosition(0,SeekPositionFlags.AbsolutePositioning);&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& case &Stop&:&
&&&&&&&&&&&&&&&&&&& if(_IsVideo)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&&&&&& case &Next&:&
&&&&&&&&&&&&&&&&&&& if(_IsVideo)&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourVideo.SeekCurrentPosition(5,SeekPositionFlags.IncrementalPositioning);&
&&&&&&&&&&&&&&&&&&&&&&& //this.ourVideo.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&& else&
&&&&&&&&&&&&&&&&&&& {&
&&&&&&&&&&&&&&&&&&&&&&& this.ourAudio.SeekCurrentPosition(5,SeekPositionFlags.IncrementalPositioning);&
&&&&&&&&&&&&&&&&&&&&&&& //this.ourAudio.Pause();&
&&&&&&&&&&&&&&&&&&& }&
&&&&&&&&&&&&&&&&&&&&
&&&&&&&&&&& }&
&&&&&&& }&
(window.slotbydup=window.slotbydup || []).push({
id: '2467140',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467141',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467143',
container: s,
size: '1000,90',
display: 'inlay-fix'
(window.slotbydup=window.slotbydup || []).push({
id: '2467148',
container: s,
size: '1000,90',
display: 'inlay-fix'&&源码搜搜是一个自动搜索中英文源码的搜索引擎,所以,请仔细阅读搜索到的英文源代码,它们和您的想要的中文有很大的关联。
&&另外,为了保证您得到最全面的结果,建议您直接搜索中文。
&&暂不支持繁体中文,请谅解!
vlc (videolan client) access module for dc1394 cameras.this vlc plugin lets you use firewire digital cameras (for example the apple isight)with vlc. . .http://sourceforge.net/projects/dc1394-vlc/project description. iptv player that is based on vlc library under c#....ge and moetv.tv resources and channels available on the internet. tvali.ge/moetv.tv/other player by flai intended only for familiarization purposes. if you want to watch the flow of fine,Podcast (RSS) to Playlistvlc-lite is a stripped-down, compact version of the vlc media player used for playback of a few select media codecs and containers. .vlc-lite is a stripped-down, compact version of the vlc media player used for playback of a few select media codecs and containers. .http://sourceforge.net/projects/vlc-lite/这是用c#开发的一个多媒体播放器,它采用了托管的directx。为了支持vista,需要下载最新的microsoft directx 9l,然后使用其microsoft.directx.audiovideoplayback程序集。该媒体播放器支持 avi, mpg, mpeg, wmv, divx, xvid等多种格式。./code/Movie-Video-Player-Vista.aspx用directshow实现的视频播放器,很强大的功能,能实现视频播放和抓图等功能。在vc6.0下编译通过用directshow实现的视频播放器,很实现视频播放和截图等功能,在vc6.0下编译通过./Code.aspx?id=2547mplayergui 是一款依赖于 mplayer 的播放器,它可以播放 mpeg, avi, asf/wmv, quicktime/mov, realmedia rm/rmvb, mpeg4, mp3, wma, wav 等文件格式,不需要安装任何解码器到您的系统。而且还是免费软件,您可以将 mplayer 视为内核程序,mplayergui 视为图形界面/code/MPlayerGUI.aspxmp3播放器是利用数字信号处理器dsp(digital sign processer)来完成处理传输和解码mp3文件的任务的。dsp掌管随身听的数据传输,设备接口控制,文件解码回放等活动。dsp能够在非常短的时间里完成多种处理任务,而且此过程所消耗的能量极少(这也是它适合于便携式播放器的一个显著特点)。http://www./Code/interface-implementation.html这个程序和文章描述如何使用c#,实现不调用任何api的音频播放器。很多人实现了比较高层的系统组件,来实现话音/音乐的播放,如基于windows media player或directshow的。不过,这些有很多的缺陷,比如,他们不可以在on the fly情况下操作实际的音频数据。./code/audio-player-no-api.aspx一个播放器的vc6.0很好源代码,可以播h264,pcm等 media player src source code ,visual c++ 6 environment,vc60, h264 ,/code/mediaplayer.aspximprove rm/rmvb video media supported for vlc. vlc can not play rm/rmvb video, and the project will work on it and will submit the related codes to vlc project later. .http://sourceforge.net/projects/realforvlc/一个简单的vc6开发的播放器一个简单的vc6开发的播放器/Code.aspx?id=1972 ability to change scale or media player size proprotionately.... you can smoothly change the size of the media player without the need to create a new region because it ... create cool looking videoskins(TM) & slickskins(TM). my media player is a modeless dialog with a web browser./KB/audio-video/videoskins.aspx这是一个很好的vc++开发的播放器源代码,大家可以研究一下。很好的。这是一个很好的vc++开发的播放器源代码,大家可以研究一下。很好的。/Code.aspx?id=2790download demo project [build with vlc 1.1.4] - 19.72 kb. for the demo, you need to download the actual vlc package and copy the plug-ins in the corresponding ...dll and libvlccore.dll in your path. download source [vlc api 1.1 required!] - 268./KB/audio-video/VLCWrapper.aspx 2.集成ubuntu下的常用应用软件,如eva、skype、gmlive、vlc媒体播放器等等; 3.集成c、c++、gtk+、gtkmm、wxwidget、openmotif、opengl、ruby、glade等程序开发环境。 .http://sourceforge.net/projects/ubundeveloper/in project summary) an aniplayer x based media player....dll). please don't think the player is in alpha state, not in finalized state. the term &...hlp format). plans. vaioplayer will have/get :. vlc media player codecs and its control elements to make him reading almost 自然风音乐播放器源码.rar自然风音乐播放器源码.rar/Code.aspx?id=2883 this is a simple but nice frontend for vlc media player. i have replicated a couple of things i liked about media player classic and others - such as mouse-wheel controlled volume, a nicer slider,download source - 3.65 kb. windows media player playing the channel9 video podcasts as a playlist....it to a playlist file/url that windows media player, windows media center,... background. i use windows media player (wmp) to watch/listen to several video/audio podcasts./KB/aspnet/PodcastToPlaylist.aspx. youtubefisher: smaller and faster youtube's downloader. youtubefisher is a stand-alone application that allows to download media. (video and/or audio) directly from youtube. youtubefisher isn't a converter:. it only retrieves the video download a codecs collection or use vlc media player. .
CopyRight (&)
All Rights Reserved&

我要回帖

更多关于 audiovideoplayback 的文章

 

随机推荐