The Gus Posted November 2, 2007 Share Posted November 2, 2007 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! Quote Link to comment
Moses Posted November 3, 2007 Share Posted November 3, 2007 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. Quote Link to comment
The Gus Posted November 3, 2007 Author Share Posted November 3, 2007 That was correct : FDVBViewer.CurrentChannelNr:=FDVBViewer.ChannelManager.GetbyChannelname(); did the job. thanks for the tip! Quote Link to comment
The Gus Posted November 3, 2007 Author Share Posted November 3, 2007 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! Quote Link to comment
Lars_MQ Posted November 3, 2007 Share Posted November 3, 2007 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. Quote Link to comment
The Gus Posted November 3, 2007 Author Share Posted November 3, 2007 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! Quote Link to comment
The Gus Posted November 6, 2007 Author Share Posted November 6, 2007 Any1 pls help? Quote Link to comment
Lars_MQ Posted November 6, 2007 Share Posted November 6, 2007 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) Quote Link to comment
The Gus Posted November 6, 2007 Author Share Posted November 6, 2007 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? Quote Link to comment
Lars_MQ Posted November 6, 2007 Share Posted November 6, 2007 well does it work in he DVBViewer directly via keyboard? it's the same mechanism. Quote Link to comment
The Gus Posted November 6, 2007 Author Share Posted November 6, 2007 I see and agree with your logic :-) I'll try to increase the delay of channel number input as soon as I get home Quote Link to comment
The Gus Posted November 7, 2007 Author Share Posted November 7, 2007 I've solved by putting 1500 on delay between channel numbers in dvbv's options. Great! Tnx for your assistance, ciao Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.