VLC, TV Tuner and Visual Basic

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
dx
New Cone
New Cone
Posts: 9
Joined: 31 May 2007 19:42

VLC, TV Tuner and Visual Basic

Postby dx » 08 Apr 2008 02:24

I've some troubles setting up VLC in Visual Basic with my TV Tuner (Hauppauge WinTV PVR 250). I can get video and audio, but I can't change channel. I've added channels to:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TV System Services\TVAutoTune\TS0-1

It's possible for me to change in VLC, but when I try from Visual Basic 6 nothing happens, it just keep using the last channel I used in VLC - any suggestions?


This is the code I'm trying to use in Visual Basic:
VLC.addTarget "dshow:// :dshow-vdev=""""", Array(":dshow-adev="""" :dshow-size="""" :dshow-caching=200 :dshow-chroma="""" :dshow-fps=0.000000 :no-dshow-config :no-dshow-tuner :dshow-tuner-channel=3 :dshow-tuner-country=0 :dshow-tuner-input=1 :dshow-video-input=0 :dshow-audio-input=4 :dshow-video-output=-1 :dshow-audio-output=-1"), VLCPlayListAppendAndGo, -666

The array is copy/pasted from VLC itself-

the_black_code
New Cone
New Cone
Posts: 1
Joined: 13 Jun 2008 12:56

Re: VLC, TV Tuner and Visual Basic

Postby the_black_code » 13 Jun 2008 13:03

Hi dx,
I used this code and it works with Hauppauge WinTV-HVR 900 USB TV Stick, but I can't change the channels.

You can download a copy of my code from this link:

http://www.planet-source-code.com/vb/sc ... 6&lngWId=1

:wink:

Code: Select all

Dim newTuneStr As String Private Sub cmdExit_Click() VLC.stop End End Sub Private Function BuildTunerSettings(ByVal DShowAdev As String, ByVal DShowSize As String, _ ByVal DShowCaching As Integer, ByVal DShowChroma As String, ByVal DShowFPS As Double, _ ByVal DShowTunerChannel As Integer, ByVal DShowTunerCountry As Integer, _ ByVal DShowTunerInput As Integer, ByVal DShowVideoInput As Integer, _ ByVal DShowAudioInput As Integer, ByVal DShowVideoOutput As Integer, ByVal DShowAudioOutput As Integer) As String BuildTunerSettings = ":dshow-adev=" & DShowAdev & " :dshow-size=" & DShowSize & " :dshow-caching=" & DShowCaching & " :dshow-chroma=" & DShowChroma & " :dshow-fps=" & DShowFPS & " :no-dshow-config :no-dshow-tuner :dshow-tuner-channel=" & DShowTunerChannel & " :dshow-tuner-country=" & DShowTunerCountry & " :dshow-tuner-input=" & DShowTunerInput & " :dshow-video-input=" & DShowVideoInput & " :dshow-audio-input=" & DShowAudioInput & " :dshow-video-output=" & DShowVideoOutput & " :dshow-audio-output=" & DShowAudioOutput End Function Private Sub cmdSet_Click() VLC.stop newtunerstr = BuildTunerSettings(txtdshowadev.Text, txtdshowsize.Text, txtdshowcaching.Text, txtdshowchroma.Text, txtdshowfps.Text, txtdshowtunerchannel.Text, txtdshowtunercountry.Text, txtdshowtunerinput.Text, txtdshowvideoinput.Text, txtdshowaudioinput.Text, txtdshowvideooutput.Text, txtdshowaudiooutput.Text) VLC.addTarget "dshow:// :dshow-vdev=""""", Array(newtunerstr), VLCPlayListAppendAndGo, -666 VLC.play End Sub Private Sub Form_Load() Call cmdSet_Click End Sub


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 14 guests