home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
TV Channel code all over the place
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Anonymous" data-source="post: 6625"><p>So I'm looking into the "why do I have to manually enter the frequencies for every channel I want to watch" problem and I'm trying to wrap my head around how the TVChannel object / database / AnalogTVTuningForm / et all works.</p><p></p><p>Q 1: In TV.Recording.TVCaptureDevice.GetChannelNr(), and everywhere channels are needed for that matter, why do we get an untyped ArrayList of TVChannel objects only to try to find one in the list that matches? Wouldn't it make more sense to do[code]</p><p>TVChannel chan = TVDatabase.GetChannelByName(strChannelName);</p><p>if (chan != null)</p><p>{</p><p> if (chan.Number <= 0) ...</p><p> standard = chan.TVStandard;</p><p> return chan.Number;</p><p>}</p><p>...</p><p>TVDatabase:</p><p>static public TVChannel GetChannelByName(string strChannelName)</p><p>{</p><p> ... // similar setup to GetChannels</p><p> strSQL = String.Format("SELECT * FROM channel WHERE strChannel = '{0}'", strChannelName);</p><p>... // execute, build single object and return</p><p>}[/code]</p><p></p><p>Q 2: Couldn't all areas (ChannelUp, ChannelDown, etc) benefit from using TVChannel objects and calling functions like TVDatabase.GetNextChannel(TVChannel chanCurrent). Getting and searching an ArrayList every time seems like overkill when you can just select the single Channel you want to begin with.</p><p></p><p>Q 3: Why does AnalogTVTuningForm not store the frequency into the channels database in while it is adding the channel number? I assume that the frequency in the database is an override rather than what is actually going to be used to tune the channel, right? Would me adding code to store both the channel number and frequency (and also automapping as many as possible before requiring user interaction) mess things up further down the line?</p><p></p><p>I'm currently an XBMC and MythTV user, and a very experienced programmer. If I'm not going to be stepping on any toes, or breaking any future plans, I'd be happy to help out. I just need to make sure I understand why things need to be the way they are if there are reasons.</p></blockquote><p></p>
[QUOTE="Anonymous, post: 6625"] So I'm looking into the "why do I have to manually enter the frequencies for every channel I want to watch" problem and I'm trying to wrap my head around how the TVChannel object / database / AnalogTVTuningForm / et all works. Q 1: In TV.Recording.TVCaptureDevice.GetChannelNr(), and everywhere channels are needed for that matter, why do we get an untyped ArrayList of TVChannel objects only to try to find one in the list that matches? Wouldn't it make more sense to do[code] TVChannel chan = TVDatabase.GetChannelByName(strChannelName); if (chan != null) { if (chan.Number <= 0) ... standard = chan.TVStandard; return chan.Number; } ... TVDatabase: static public TVChannel GetChannelByName(string strChannelName) { ... // similar setup to GetChannels strSQL = String.Format("SELECT * FROM channel WHERE strChannel = '{0}'", strChannelName); ... // execute, build single object and return }[/code] Q 2: Couldn't all areas (ChannelUp, ChannelDown, etc) benefit from using TVChannel objects and calling functions like TVDatabase.GetNextChannel(TVChannel chanCurrent). Getting and searching an ArrayList every time seems like overkill when you can just select the single Channel you want to begin with. Q 3: Why does AnalogTVTuningForm not store the frequency into the channels database in while it is adding the channel number? I assume that the frequency in the database is an override rather than what is actually going to be used to tune the channel, right? Would me adding code to store both the channel number and frequency (and also automapping as many as possible before requiring user interaction) mess things up further down the line? I'm currently an XBMC and MythTV user, and a very experienced programmer. If I'm not going to be stepping on any toes, or breaking any future plans, I'd be happy to help out. I just need to make sure I understand why things need to be the way they are if there are reasons. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
TV Channel code all over the place
Contact us
RSS
Top
Bottom