Streaming video

Hola Diego, tengo que hacer un programa en visual basic cliente servidor llamado video bajo demanda. Para esto tengo que utilizar la técnica llamada streaming. Ya se como pasar el avi a frames jpg, pero estos frames jpg tengo que pasarlos por la red con el control winsock y no me aclaro muy bien. Una vez pasado el jpg al cliente tengo que ir mostrando el jpg en un picturebox para que de la sensación de video. ¿Tienes información de como hacer esto?
¿Algún programilla que se parezca a esto?
Te agradeceré cualquier tipo de información.
Gracias.

1 Respuesta

Respuesta
1
En su momento hice un programilla que permitía enviar ficheros a través de winsock en una intranet, la idea era realizar un programa control remoto que permitiera controlar remotamente otra máquina dentro de una intranet. He de decirte que la velocidad de transmisión no fue muy alentadora. Posteriormente he realizado una aplicación que permite el uso de ftp y la verdad es que me parece mucha mejor solución... pruébalas y si prefieres todavía la solución con winsock dame tu email y te la envío:
Este es el código para un proyecto con el componente inet.
En el formulario pon el siguiente texto:
Option Explicit
Private msCurrentFile As String
Friend Sub FTPFile(ByVal sFTPServer As String, _
ByVal sFTPCommand As String, _
ByVal sFTPUser As String, _
ByVal sFTPPwd As String, _
ByVal sFTPSrcFileName As String, _
ByVal sFTPTgtFileName As String)
Dim oFS As Scripting.FileSystemObject
Dim sURL As String
On Error GoTo FTPFileExit
Me.HRG True
msCurrentFile = ""
Set oFS = New Scripting.FileSystemObject
sURL = "ftp://" & sFTPUser & ":" & sFTPPwd & "@" & sFTPServer
Inet1.Protocol = icFTP
Inet1.RequestTimeout = 60
Inet1.RemotePort = 21
'Inet1.AccessType = icDirect
Inet1.URL = sURL
Select Case sFTPCommand
Case "PUT"
msCurrentFile = sFTPSrcFileName
If oFS.FileExists(sFTPSrcFileName) = False Then GoTo FTPFileExit
Inet1.Execute sURL, sFTPCommand & Space(1) & sFTPSrcFileName & " " & sFTPTgtFileName
Case "GET"
msCurrentFile = sFTPTgtFileName
If oFS.FileExists(sFTPTgtFileName) = True Then
oFS.DeleteFile sFTPTgtFileName, True
End If
Inet1.Execute sURL, sFTPCommand & Space(1) & sFTPSrcFileName & " " & sFTPTgtFileName
End Select
Me.WaitForResponse
Inet1.Execute sURL, "salir"
Me.WaitForResponse
FTPFileExit:
Set oFS = Nothing
HRG False
End Sub
Friend Sub WaitForResponse()
Dim fWait As Boolean
On Error GoTo ErrHandler
fWait = True
Do Until fWait = False
DoEvents
fWait = Inet1.StillExecuting
Loop
ErrHandler:
Err.Clear
End Sub
Private Sub Inet1_StateChanged(ByVal State As Integer)
On Error Resume Next
Select Case State
Case icNone
Case icResolvingHost: Me.lblRESPONSE.Caption = "Conectando servidor"
Case icHostResolved: Me.lblRESPONSE.Caption = "Servidor conectado"
Case icConnecting: Me.lblRESPONSE.Caption = "Conectando..."
Case icConnected: Me.lblRESPONSE.Caption = "Conectado"
Case icResponseReceived: Me.lblRESPONSE.Caption = "Enviando el Fichero..."
Case icDisconnecting: Me.lblRESPONSE.Caption = "Desconectando..."
Case icDisconnected: Me.lblRESPONSE.Caption = "Desconectado"
Case icError: MsgBox "Error:" & Inet1.ResponseCode & " " & Inet1.ResponseInfo
Case icResponseCompleted: Me.lblRESPONSE.Caption = "Proceso Completado."
End Select
Me.lblRESPONSE.Refresh
Err.Clear
End Sub
Friend Sub HRG(fShowHourGlass As Boolean)
If fShowHourGlass = True Then
Screen.MousePointer = 11
Else
Screen.MousePointer = 0
End If
Screen.MousePointer = 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set frmFTP = Nothing
End Sub
en el módulo pon el siguiente:
Public Sub Main()
Load frmFTP
frmFTP.Show
frmFTP.FTPFile "200.52.67.92/isaram.hostingdeprueba.com/www", "PUT", "prueba043", "2003030", "C:\pftp.exe", "/isaram.hostingdeprueba.com/www/pftp.exe"
FrmFTP. FTPFile "mi direccion ip", "GET", "miusuario", "miwd", "test.txt", "c:\temp\test2.txt"
Unload frmFTP
End Sub
¿El principal debe ser el sub main del módulo vale? Y necesitas como referencia el microsoft scripting runtime.
Encantado de ayudarte.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas