elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Como proteger una cartera - billetera de Bitcoin


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP) (Moderador: kub0x)
| | | |-+  Puedo descomponer un video con vb.Net?
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: 1 [2] 3 Ir Abajo Respuesta Imprimir
Autor Tema: Puedo descomponer un video con vb.Net?  (Leído 15,322 veces)
seba123neo


Desconectado Desconectado

Mensajes: 3.621



Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #10 en: 24 Agosto 2009, 03:39 am »

Capturar video??
No no... al archivo lo tengo en mi PC.. por ejemplo: C:/VIDEOS
Y al programa le doy el link de donde está en mi PC y que lo analice..

tampoco se como lo queres ahcer, si con un control, con codigo o con que...porque con el mismo control de windows media player tenes para ir avanzando de fotogramas...cualqueir forma de reproduccion de video que puedas encontrar para .NET debe tener seguro la opcion para elegir el fotograma.

saludos.


En línea

Skeletron


Desconectado Desconectado

Mensajes: 1.731


A long way to go


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #11 en: 24 Agosto 2009, 04:50 am »

Mira.. se me ha ocurrido hacer un formato de video.. PROPIO.. PERSONAL... para transformar cualquier video a mi formato, necesito simplemente VER cada fotograma y tomarle sus pixeles...

Me entiendo??
Lo que necesito, es darle un LINK de la ruta del vide.. ejemplo: C:/VIdeos/elputovideo.avi
Apreto el botoncito: "TRASFORMATE YA!!!" y luego viene el codigo... dentro de ese codigo, necesito tener la forma de tomar cada fotograma y analizarlo como si fuese una imagen sola...

Aun no me he puesto a ver nada... estoy con tiempos de mucho estudio... por eso no vi todavia lo que  Vertex me ha dicho... pero ay lo probaré...
Igualmente, en mi VIsual Studio, no aparece nada de DirectX o DirectShow.. veré que puedo hacer..



AGREGO:
Espero que se haya entendido que al video no lo quiero reproducir.. sino que quiero ver sus fotogramas.. :)


En línea

raul338


Desconectado Desconectado

Mensajes: 2.633


La sonrisa es la mejor forma de afrontar las cosas


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #12 en: 24 Agosto 2009, 19:31 pm »

no te va a aparecer nada de directx nunca tampoco jejeje


primero que nada, te tienes que instalar el DirectX 9.0c SDK(o posterior, pero asegurate de que sea 9.0 C!!!! o posterior, no vale la version 9.0b). Luego podras agregar las referencias a Microsoft.DirectX y varias mas (Direct3d, DirectShow, etc)

 :P
En línea

Skeletron


Desconectado Desconectado

Mensajes: 1.731


A long way to go


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #13 en: 24 Agosto 2009, 20:22 pm »

Esperemos que funcione... Gracias por la informacion..

Tambien programo en Java... Desde Java se puede hacer algo???
En línea

raul338


Desconectado Desconectado

Mensajes: 2.633


La sonrisa es la mejor forma de afrontar las cosas


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #14 en: 24 Agosto 2009, 20:38 pm »

no es el foro de java  ;D :laugh: jaja

si supiera te ayudaria, pero no tengo la mas minima idea de java :huh:.....solo javascript  ;D
En línea

Skeletron


Desconectado Desconectado

Mensajes: 1.731


A long way to go


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #15 en: 30 Agosto 2009, 20:02 pm »

http://www.microsoft.com/downloads/details.aspx?FamilyId=4B78A58A-E672-4B83-A28E-72B5E93BD60A&displaylang=en
y
http://www.comunidadp2p.net/showthread.php?t=803

Esos 2 links tienes descargas del DirectX... Cual de las 2 recomienda??
El 2º link tiene la version que Raul recomienda... Pero la 1º es de Microsoft...
En línea

Skeletron


Desconectado Desconectado

Mensajes: 1.731


A long way to go


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #16 en: 30 Agosto 2009, 20:32 pm »

Acabo de descargar ésto:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9226a611-62fe-4f61-aba1-914185249413&DisplayLang=es

Está bien?
En línea

seba123neo


Desconectado Desconectado

Mensajes: 3.621



Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #17 en: 30 Agosto 2009, 20:45 pm »


me aprece que es esa, "me parece" , proba instalarlo, y fijate si te aparecen las referencias.seguro tendras que reiniciar la pc.
En línea

Skeletron


Desconectado Desconectado

Mensajes: 1.731


A long way to go


Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #18 en: 30 Agosto 2009, 20:56 pm »

Eu Eu eu eu...

Miren ésto...
Yo no habia terminado de instalar el Microsft DirectX SDK.. pero descargué un Source de una aplicacion que utiliza DIrectShow (en teoria)
Y funciona bien.. o sea.. tiene un PLAY, STOP y PAUSE...
Ahora mismo estoy estudiando el codigo..

Si me pueden dar una ayuda, será genial...

Aca les dejo el codigo:.   (En C#)

Código
  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7.  
  8. using QuartzTypeLib;
  9.  
  10. namespace DirectShow
  11. {
  12. /// <summary>
  13. /// Zusammendfassende Beschreibung für Form1.
  14. /// </summary>
  15.    public class Form1 : Form
  16.    {
  17.        private System.Windows.Forms.MainMenu mainMenu1;
  18.        private System.Windows.Forms.MenuItem menuItem1;
  19.        private System.Windows.Forms.MenuItem menuItem2;
  20.        private System.Windows.Forms.MenuItem menuItem3;
  21.        private System.Windows.Forms.MenuItem menuItem4;
  22.        private System.Windows.Forms.ToolBar toolBar1;
  23.        private System.Windows.Forms.ToolBarButton toolBarButton1;
  24.        private System.Windows.Forms.ToolBarButton toolBarButton2;
  25.        private System.Windows.Forms.ToolBarButton toolBarButton3;
  26.        private System.Windows.Forms.ImageList imageList1;
  27.        private System.Windows.Forms.StatusBar statusBar1;
  28.        private System.Windows.Forms.Panel panel1;
  29.        private System.Windows.Forms.Timer timer1;
  30.        private System.Windows.Forms.StatusBarPanel statusBarPanel1;
  31.        private System.Windows.Forms.StatusBarPanel statusBarPanel2;
  32.        private System.Windows.Forms.StatusBarPanel statusBarPanel3;
  33.        private System.ComponentModel.IContainer components;
  34.  
  35.        private const int WM_APP = 0x8000;
  36.        private const int WM_GRAPHNOTIFY = WM_APP + 1;
  37.        private const int EC_COMPLETE = 0x01;
  38.        private const int WS_CHILD = 0x40000000;
  39.        private const int WS_CLIPCHILDREN = 0x2000000;
  40.  
  41.        private FilgraphManager m_objFilterGraph = null;
  42.        private IBasicAudio m_objBasicAudio = null;
  43.        private IVideoWindow m_objVideoWindow = null;
  44.        private IMediaEvent m_objMediaEvent = null;
  45.        private IMediaEventEx m_objMediaEventEx = null;
  46.        private IMediaPosition m_objMediaPosition = null;
  47.        private IMediaControl m_objMediaControl = null;
  48.        private System.Windows.Forms.MenuItem menuItem5;
  49.  
  50.        enum MediaStatus { None, Stopped, Paused, Running };
  51.  
  52.        private MediaStatus m_CurrentStatus = MediaStatus.None;
  53.  
  54.        public Form1()
  55.        {
  56.            //
  57.            // Erforderlich für die Windows Form-Designerunterstützung
  58.            //
  59.            InitializeComponent();
  60.  
  61.            //
  62.            // TODO: Fügen Sie den Konstruktorcode nach dem Aufruf von InitializeComponent hinzu
  63.            //
  64.            UpdateStatusBar();
  65.            UpdateToolBar();
  66.        }
  67.  
  68.        /// <summary>
  69.        /// Die verwendeten Ressourcen bereinigen.
  70.        /// </summary>
  71.        protected override void Dispose( bool disposing )
  72.        {
  73.            CleanUp();
  74.  
  75.            if( disposing )
  76.            {
  77.                if (components != null)
  78.                {
  79.                    components.Dispose();
  80.                }
  81.            }
  82.            base.Dispose( disposing );
  83.        }
  84.  
  85. #region Windows Form Designer generated code
  86.        /// <summary>
  87.        /// Erforderliche Methode für die Designerunterstützung.
  88.        /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
  89.        /// </summary>
  90.        private void InitializeComponent()
  91.        {
  92.            this.components = new System.ComponentModel.Container();
  93.            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
  94.            this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
  95.            this.menuItem1 = new System.Windows.Forms.MenuItem();
  96.            this.menuItem2 = new System.Windows.Forms.MenuItem();
  97.            this.menuItem3 = new System.Windows.Forms.MenuItem();
  98.            this.menuItem4 = new System.Windows.Forms.MenuItem();
  99.            this.menuItem5 = new System.Windows.Forms.MenuItem();
  100.            this.toolBar1 = new System.Windows.Forms.ToolBar();
  101.            this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
  102.            this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
  103.            this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
  104.            this.imageList1 = new System.Windows.Forms.ImageList(this.components);
  105.            this.statusBar1 = new System.Windows.Forms.StatusBar();
  106.            this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
  107.            this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
  108.            this.statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
  109.            this.panel1 = new System.Windows.Forms.Panel();
  110.            this.timer1 = new System.Windows.Forms.Timer(this.components);
  111.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
  112.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
  113.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).BeginInit();
  114.            this.SuspendLayout();
  115.            //
  116.            // mainMenu1
  117.            //
  118.            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  119.            this.menuItem1,
  120.            this.menuItem5});
  121.            //
  122.            // menuItem1
  123.            //
  124.            this.menuItem1.Index = 0;
  125.            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  126.            this.menuItem2,
  127.            this.menuItem3,
  128.            this.menuItem4});
  129.            this.menuItem1.Text = "&File";
  130.            //
  131.            // menuItem2
  132.            //
  133.            this.menuItem2.Index = 0;
  134.            this.menuItem2.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
  135.            this.menuItem2.Text = "&Open...";
  136.            this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
  137.            //
  138.            // menuItem3
  139.            //
  140.            this.menuItem3.Index = 1;
  141.            this.menuItem3.Text = "-";
  142.            //
  143.            // menuItem4
  144.            //
  145.            this.menuItem4.Index = 2;
  146.            this.menuItem4.Text = "E&xit";
  147.            this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
  148.            //
  149.            // menuItem5
  150.            //
  151.            this.menuItem5.Index = 1;
  152.            this.menuItem5.Text = "&Info";
  153.            this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
  154.            //
  155.            // toolBar1
  156.            //
  157.            this.toolBar1.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
  158.            this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
  159.            this.toolBarButton1,
  160.            this.toolBarButton2,
  161.            this.toolBarButton3});
  162.            this.toolBar1.DropDownArrows = true;
  163.            this.toolBar1.ImageList = this.imageList1;
  164.            this.toolBar1.Location = new System.Drawing.Point(0, 0);
  165.            this.toolBar1.Name = "toolBar1";
  166.            this.toolBar1.ShowToolTips = true;
  167.            this.toolBar1.Size = new System.Drawing.Size(442, 28);
  168.            this.toolBar1.TabIndex = 0;
  169.            this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
  170.            //
  171.            // toolBarButton1
  172.            //
  173.            this.toolBarButton1.Enabled = false;
  174.            this.toolBarButton1.ImageIndex = 0;
  175.            this.toolBarButton1.Name = "toolBarButton1";
  176.            //
  177.            // toolBarButton2
  178.            //
  179.            this.toolBarButton2.Enabled = false;
  180.            this.toolBarButton2.ImageIndex = 1;
  181.            this.toolBarButton2.Name = "toolBarButton2";
  182.            //
  183.            // toolBarButton3
  184.            //
  185.            this.toolBarButton3.Enabled = false;
  186.            this.toolBarButton3.ImageIndex = 2;
  187.            this.toolBarButton3.Name = "toolBarButton3";
  188.            //
  189.            // imageList1
  190.            //
  191.            this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
  192.            this.imageList1.TransparentColor = System.Drawing.Color.Red;
  193.            this.imageList1.Images.SetKeyName(0, "");
  194.            this.imageList1.Images.SetKeyName(1, "");
  195.            this.imageList1.Images.SetKeyName(2, "");
  196.            //
  197.            // statusBar1
  198.            //
  199.            this.statusBar1.Location = new System.Drawing.Point(0, 424);
  200.            this.statusBar1.Name = "statusBar1";
  201.            this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
  202.            this.statusBarPanel1,
  203.            this.statusBarPanel2,
  204.            this.statusBarPanel3});
  205.            this.statusBar1.ShowPanels = true;
  206.            this.statusBar1.Size = new System.Drawing.Size(442, 19);
  207.            this.statusBar1.TabIndex = 2;
  208.            //
  209.            // statusBarPanel1
  210.            //
  211.            this.statusBarPanel1.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
  212.            this.statusBarPanel1.BorderStyle = System.Windows.Forms.StatusBarPanelBorderStyle.None;
  213.            this.statusBarPanel1.Name = "statusBarPanel1";
  214.            this.statusBarPanel1.Text = "Ready";
  215.            this.statusBarPanel1.Width = 309;
  216.            //
  217.            // statusBarPanel2
  218.            //
  219.            this.statusBarPanel2.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
  220.            this.statusBarPanel2.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
  221.            this.statusBarPanel2.Name = "statusBarPanel2";
  222.            this.statusBarPanel2.Text = "00:00:00";
  223.            this.statusBarPanel2.Width = 58;
  224.            //
  225.            // statusBarPanel3
  226.            //
  227.            this.statusBarPanel3.Alignment = System.Windows.Forms.HorizontalAlignment.Center;
  228.            this.statusBarPanel3.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents;
  229.            this.statusBarPanel3.Name = "statusBarPanel3";
  230.            this.statusBarPanel3.Text = "00:00:00";
  231.            this.statusBarPanel3.Width = 58;
  232.            //
  233.            // panel1
  234.            //
  235.            this.panel1.BackColor = System.Drawing.Color.Black;
  236.            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  237.            this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
  238.            this.panel1.Location = new System.Drawing.Point(0, 28);
  239.            this.panel1.Name = "panel1";
  240.            this.panel1.Size = new System.Drawing.Size(442, 396);
  241.            this.panel1.TabIndex = 3;
  242.            //
  243.            // timer1
  244.            //
  245.            this.timer1.Enabled = true;
  246.            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  247.            //
  248.            // Form1
  249.            //
  250.            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  251.            this.ClientSize = new System.Drawing.Size(442, 443);
  252.            this.Controls.Add(this.panel1);
  253.            this.Controls.Add(this.statusBar1);
  254.            this.Controls.Add(this.toolBar1);
  255.            this.Menu = this.mainMenu1;
  256.            this.Name = "Form1";
  257.            this.Text = "DirectShow";
  258.            this.Load += new System.EventHandler(this.Form1_Load);
  259.            this.SizeChanged += new System.EventHandler(this.Form1_SizeChanged);
  260.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
  261.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
  262.            ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).EndInit();
  263.            this.ResumeLayout(false);
  264.            this.PerformLayout();
  265.  
  266.        }
  267. #endregion
  268.  
  269.        /// <summary>
  270.        /// Der Haupteinstiegspunkt für die Anwendung.
  271.        /// </summary>
  272.        [STAThread]
  273.        static void Main()
  274.        {
  275.            Application.Run(new Form1());
  276.        }
  277.  
  278.        private void menuItem2_Click(object sender, System.EventArgs e)
  279.        {
  280.            OpenFileDialog openFileDialog = new OpenFileDialog();
  281.  
  282.            openFileDialog.Filter = "Media Files|*.mpg;*.avi;*.wma;*.mov;*.wav;*.mp2;*.mp3|All Files|*.*";
  283.  
  284.            if (DialogResult.OK == openFileDialog.ShowDialog())
  285.            {
  286.                CleanUp();
  287.  
  288.                m_objFilterGraph = new FilgraphManager();
  289.                m_objFilterGraph.RenderFile(openFileDialog.FileName);
  290.  
  291.                m_objBasicAudio = m_objFilterGraph as IBasicAudio;
  292.  
  293.                try
  294.                {
  295.                    m_objVideoWindow = m_objFilterGraph as IVideoWindow;
  296.                    m_objVideoWindow.Owner = (int) panel1.Handle;
  297.                    m_objVideoWindow.WindowStyle = WS_CHILD | WS_CLIPCHILDREN;
  298.                    m_objVideoWindow.SetWindowPosition(panel1.ClientRectangle.Left,
  299.                        panel1.ClientRectangle.Top,
  300.                        panel1.ClientRectangle.Width,
  301.                        panel1.ClientRectangle.Height);
  302.                }
  303.                catch (Exception)
  304.                {
  305.                    m_objVideoWindow = null;
  306.                }
  307.  
  308.                m_objMediaEvent = m_objFilterGraph as IMediaEvent;
  309.  
  310.                m_objMediaEventEx = m_objFilterGraph as IMediaEventEx;
  311.                m_objMediaEventEx.SetNotifyWindow((int) this.Handle,WM_GRAPHNOTIFY, 0);
  312.  
  313.                m_objMediaPosition = m_objFilterGraph as IMediaPosition;
  314.  
  315.                m_objMediaControl = m_objFilterGraph as IMediaControl;
  316.  
  317.                this.Text = "DirectShow - [" + openFileDialog.FileName + "]";
  318.  
  319.                m_objMediaControl.Run();
  320.                m_CurrentStatus = MediaStatus.Running;
  321.  
  322.                UpdateStatusBar();
  323.                UpdateToolBar();
  324.            }
  325.        }
  326.  
  327.        private void CleanUp()
  328.        {
  329.            if (m_objMediaControl != null)
  330.                m_objMediaControl.Stop();
  331.  
  332.            m_CurrentStatus = MediaStatus.Stopped;
  333.  
  334.            if (m_objMediaEventEx != null)
  335.                m_objMediaEventEx.SetNotifyWindow(0, 0, 0);
  336.  
  337.            if (m_objVideoWindow != null)
  338.            {
  339.                m_objVideoWindow.Visible = 0;
  340.                m_objVideoWindow.Owner = 0;
  341.            }
  342.  
  343.            if (m_objMediaControl != null) m_objMediaControl = null;
  344.            if (m_objMediaPosition != null) m_objMediaPosition = null;
  345.            if (m_objMediaEventEx != null) m_objMediaEventEx = null;
  346.            if (m_objMediaEvent != null) m_objMediaEvent = null;
  347.            if (m_objVideoWindow != null) m_objVideoWindow = null;
  348.            if (m_objBasicAudio != null) m_objBasicAudio = null;
  349.            if (m_objFilterGraph != null) m_objFilterGraph = null;
  350.        }
  351.  
  352.        private void menuItem4_Click(object sender, System.EventArgs e)
  353.        {
  354.            this.Close();
  355.        }
  356.  
  357.        private void Form1_SizeChanged(object sender, System.EventArgs e)
  358.        {
  359.            if (m_objVideoWindow != null)
  360.            {
  361.                m_objVideoWindow.SetWindowPosition(panel1.ClientRectangle.Left,
  362.                    panel1.ClientRectangle.Top,
  363.                    panel1.ClientRectangle.Width,
  364.                    panel1.ClientRectangle.Height);
  365.            }
  366.        }
  367.  
  368.        private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
  369.        {
  370.            switch(toolBar1.Buttons.IndexOf(e.Button))
  371.            {
  372.                case 0: m_objMediaControl.Run();
  373.                        m_CurrentStatus = MediaStatus.Running;
  374.                        break;
  375.  
  376.                case 1: m_objMediaControl.Pause();
  377.                        m_CurrentStatus = MediaStatus.Paused;
  378.                        break;
  379.  
  380.                case 2: m_objMediaControl.Stop();
  381.                        m_objMediaPosition.CurrentPosition = 0;
  382.                        m_CurrentStatus = MediaStatus.Stopped;
  383.                        break;
  384.            }
  385.  
  386.            UpdateStatusBar();
  387.            UpdateToolBar();                        
  388.        }
  389.  
  390.        protected override void WndProc( ref Message m)
  391.        {
  392.            if (m.Msg == WM_GRAPHNOTIFY)
  393.            {
  394.                int lEventCode;
  395.                int lParam1, lParam2;
  396.  
  397.                while (true)
  398.                {
  399.                    try
  400.                    {
  401.                        m_objMediaEventEx.GetEvent(out lEventCode,
  402.                            out lParam1,
  403.                            out lParam2,
  404.                            0);
  405.  
  406.                        m_objMediaEventEx.FreeEventParams(lEventCode, lParam1, lParam2);
  407.  
  408.                        if (lEventCode == EC_COMPLETE)
  409.                        {
  410.                            m_objMediaControl.Stop();
  411.                            m_objMediaPosition.CurrentPosition = 0;
  412.                            m_CurrentStatus = MediaStatus.Stopped;
  413.                            UpdateStatusBar();
  414.                            UpdateToolBar();
  415.                        }
  416.                    }
  417.                    catch (Exception)
  418.                    {
  419.                        break;
  420.                    }
  421.                }
  422.            }
  423.  
  424.            base.WndProc(ref m);
  425.        }
  426.  
  427.        private void timer1_Tick(object sender, System.EventArgs e)
  428.        {
  429.            if (m_CurrentStatus == MediaStatus.Running)
  430.            {
  431.                UpdateStatusBar();
  432.            }
  433.        }
  434.  
  435.        private void UpdateStatusBar()
  436.        {
  437.            switch (m_CurrentStatus)
  438.            {
  439.                case MediaStatus.None   : statusBarPanel1.Text = "Stopped"; break;
  440.                case MediaStatus.Paused : statusBarPanel1.Text = "Paused "; break;
  441.                case MediaStatus.Running: statusBarPanel1.Text = "Running"; break;
  442.                case MediaStatus.Stopped: statusBarPanel1.Text = "Stopped"; break;
  443.            }
  444.  
  445.            if (m_objMediaPosition != null)
  446.            {
  447.                int s = (int) m_objMediaPosition.Duration;
  448.                int h = s / 3600;
  449.                int m = (s  - (h * 3600)) / 60;
  450.                s = s - (h * 3600 + m * 60);
  451.  
  452.                statusBarPanel2.Text = String.Format("{0:D2}:{1:D2}:{2:D2}", h, m, s);
  453.  
  454.                s = (int) m_objMediaPosition.CurrentPosition;
  455.                h = s / 3600;
  456.                m = (s  - (h * 3600)) / 60;
  457.                s = s - (h * 3600 + m * 60);
  458.  
  459.                statusBarPanel3.Text = String.Format("{0:D2}:{1:D2}:{2:D2}", h, m, s);
  460.            }
  461.            else
  462.            {
  463.                statusBarPanel2.Text = "00:00:00";
  464.                statusBarPanel3.Text = "00:00:00";
  465.            }
  466.        }
  467.  
  468.        private void UpdateToolBar()
  469.        {
  470.            switch (m_CurrentStatus)
  471.            {
  472.                case MediaStatus.None   : toolBarButton1.Enabled = false;
  473.                                          toolBarButton2.Enabled = false;
  474.                                          toolBarButton3.Enabled = false;
  475.                                          break;
  476.  
  477.                case MediaStatus.Paused : toolBarButton1.Enabled = true;
  478.                                          toolBarButton2.Enabled = false;
  479.                                          toolBarButton3.Enabled = true;
  480.                                          break;
  481.  
  482.                case MediaStatus.Running: toolBarButton1.Enabled = false;
  483.                                          toolBarButton2.Enabled = true;
  484.                                          toolBarButton3.Enabled = true;
  485.                                          break;
  486.  
  487.                case MediaStatus.Stopped: toolBarButton1.Enabled = true;
  488.                                          toolBarButton2.Enabled = false;
  489.                                          toolBarButton3.Enabled = false;
  490.                                          break;
  491.            }
  492.        }
  493.  
  494.        private void menuItem5_Click(object sender, System.EventArgs e)
  495.        {
  496.            Form2 dlg = new Form2();
  497.            dlg.ShowDialog();
  498.        }
  499.  
  500.    }
  501. }
  502.  
En línea

seba123neo


Desconectado Desconectado

Mensajes: 3.621



Ver Perfil WWW
Re: Puedo descomponer un video con vb.Net?
« Respuesta #19 en: 30 Agosto 2009, 21:28 pm »

ese ejemplo usa una libreria DirectShowLib-2005.dll  DirectShow la podes bajar de aca:

DirectShow.NET

« Última modificación: 30 Agosto 2009, 21:30 pm por seba123neo » En línea

Páginas: 1 [2] 3 Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Que programa usar para descomponer video de fotos VOB
Multimedia
Pandy1978 2 6,251 Último mensaje 25 Enero 2012, 20:04 pm
por Songoku
Descomponer en factores primos
.NET (C#, VB.NET, ASP)
juanlulete 5 7,179 Último mensaje 7 Agosto 2012, 21:33 pm
por Keyen Night
Descomponer numero en factores.. « 1 2 »
Programación C/C++
ThePinkPanther 13 8,831 Último mensaje 21 Febrero 2013, 01:12 am
por 85
Descomponer en unidades
Programación C/C++
85 0 1,731 Último mensaje 30 Marzo 2013, 12:31 pm
por 85
Descomponer una cadena
Programación Visual Basic
oscarmoal 3 2,663 Último mensaje 13 Diciembre 2013, 19:47 pm
por MCKSys Argentina
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines