Jump to content

Channel Change


The Gus

Recommended Posts

Posted

Good morning everybody, here's my question about DVBPro/COM with Delphi:

 

Given the channel name how do I force dvbv to switch to that channel? If ChannelName is 'AChannelName' I suppose I shoudl loop through Channels.dat then retrieve its position then tell dvbv to go to that channel. Am I right? Which property of TChannel should I use to pass to .CurrentChannelNr (imho)?

Thank you very much for you appreciated help!

Posted

You should try ChannelManager. You could loop through the IChannelCollection manually and then pass the index to DVBViewer. Have a look at "GetbyChannelname", too, that returns an integer. I can't read the doc for some strange error, right now, but I could imagen that it's the channel number. :idiot:

Posted

That was correct : FDVBViewer.CurrentChannelNr:=FDVBViewer.ChannelManager.GetbyChannelname(); did the job.

thanks for the tip!

Posted

Btw is it possible to send to DVBViewer the nmeric keystrokes that the software would intpret as a channel digit? i.e a software sends 1-2-3, dvbv waits the timeout the switchs to channel number 123.

thanks all!

Posted

you need to translate the number into the digits and send the according ac constants (-> action.ini) using the sendcommand of the DVBViewer interface. But you have to take care yourself in which state the OSD is. In a osdwindow with a list, sending the numbers will result in selecting entries as example.

Posted

thank you Lars;

a little bit of hrlp please:

if I hook the keyboard and I send the commands one by one, te rogram just switchs after each digit, without waiting for next digits. i.e

FDVBViewer.SendCommand(40+strtointdef(Chr(Key_Hooked),0));

 

By as you suggest splitting the number into digits, which is the syntax with sendcommand?

 

Thank you again!

Posted

IDVBViewer.sendcommand(CMD : Integer).

Channel0=40
Channel1=41
Channel2=42
Channel3=43
Channel4=44
Channel5=45
Channel6=46
Channel7=47
Channel8=48
Channel9=49

These are the constants and the sendcommand definition.

 

For 123 you do:

IDVBViewer.sendcommand(Channel1)
IDVBViewer.sendcommand(Channel2)
IDVBViewer.sendcommand(Channel3)

Posted

Thank you Lars....but that's what I've already tried : the result is that DVBV goes to the last channel number sended. For 123 it goes to the third channel on the list and not on the 123rd. Maybe a problem on timeout?

Posted

well does it work in he DVBViewer directly via keyboard? it's the same mechanism.

Posted

I see and agree with your logic :-) I'll try to increase the delay of channel number input as soon as I get home

Posted

I've solved by putting 1500 on delay between channel numbers in dvbv's options. Great!

 

Tnx for your assistance, ciao

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...