Mailing List Archive

Database question/problem
Hi all,

I finally got the latest CVS (tarball from 10/10) to compile and run, but
I run into a couple of problems which I believe are related to the
database.

1) I cannot change channels. This appears to be a classic database
problem. Pause live TV works, mythepg works with the correct channel
names and program schedule.

2) When I schedule a recording the wrong channel is recorded. Actually it
appears to always be one less than the channel I would like to record. For
example if I want to record channel 12 then it records channel 11.

I recreated the database then reran setup and mythfilldatabase with no
errors. The records for program, channel and single*record looked OK
(chanid matched, channel number was correct, etc.).

Any suggestions?

John
Re: Database question/problem [ In reply to ]
On Thu, 2002-10-10 at 10:16, johns@dvt-inc.com wrote:
> Hi all,
>
> I finally got the latest CVS (tarball from 10/10) to compile and run, but
> I run into a couple of problems which I believe are related to the
> database.
>
> 1) I cannot change channels. This appears to be a classic database
> problem. Pause live TV works, mythepg works with the correct channel
> names and program schedule.
>
> 2) When I schedule a recording the wrong channel is recorded. Actually it
> appears to always be one less than the channel I would like to record. For
> example if I want to record channel 12 then it records channel 11.

I've found that the channel index starts at 0, also, if a channel scan
is performed, it can also skew the numbers, since not all channels are
accounted for. Just my 0.02.


> I recreated the database then reran setup and mythfilldatabase with no
> errors. The records for program, channel and single*record looked OK
> (chanid matched, channel number was correct, etc.).

Did this start happenening after using Mythtv for a while, or was it all
of a sudden?

> Any suggestions?
>
> John
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev@snowman.net
> http://www.snowman.net/mailman/listinfo/mythtv-dev
Re: Database question/problem [ In reply to ]
On Thursday 10 October 2002 12:15 pm, GrandMasterLee wrote:
> On Thu, 2002-10-10 at 10:16, johns@dvt-inc.com wrote:
> > Hi all,
> >
> > I finally got the latest CVS (tarball from 10/10) to compile and run, but
> > I run into a couple of problems which I believe are related to the
> > database.
> >
> > 1) I cannot change channels. This appears to be a classic database
> > problem. Pause live TV works, mythepg works with the correct channel
> > names and program schedule.

For this, make sure that you have a cardinput that matches to the proper
capture card and the proper channel source.. If you crack open the source,
try to see why libs/libmythtv/tv.cpp:TV::CheckChannel() (starting at line
1656) returns false.

> > 2) When I schedule a recording the wrong channel is recorded. Actually
> > it appears to always be one less than the channel I would like to record.
> > For example if I want to record channel 12 then it records channel 11.

Pretty much the same thing, really.. Take a look at
libs/libmythtv/tv.cpp:TV::SetChannel() (line 884), and see if you can figure
out why it's changing to the wrong channel. I'd like to know the main query
in both cases (stick something like a cout << thequery << endl; after it gets
setup), and the results from the databae.

> I've found that the channel index starts at 0, also, if a channel scan
> is performed, it can also skew the numbers, since not all channels are
> accounted for. Just my 0.02.

That's no longer the case with the current database structure -- the internal
channel ids are 1000 + channel number.

> > I recreated the database then reran setup and mythfilldatabase with no
> > errors. The records for program, channel and single*record looked OK
> > (chanid matched, channel number was correct, etc.).
>
> Did this start happenening after using Mythtv for a while, or was it all
> of a sudden?
>
> > Any suggestions?
> >
> > John
Re: Database question/problem [ In reply to ]
OK, Here is what I found last night.

1) I could not change channels because of a problem with my sound card.
The NuppelVideoPlayer::GetPause was never returning correctly, therefore libs/libmythtv/tv.cpp:TV::ChangeChannel (around line 1380) was getting stuck in the while loop.
I hardcoded the value of disableaudio to true in NuppelVideoPlayer.cpp and
I can change channels (without audio). I'll work on the live audio later.
I am really interested in recording for now anyway.

Just a thought. Do I need two sound cards to watch live TV? One to do
the recording and one to play back?

2) Once I was able to change channels I can see that the program guide and
channel number on the screen were as expected, for example if I manually
change to channel 21 I get the program information for channel 21 and 21
shows in the upper right hand corner of the screen, but it tunes to
channel 20. My quick fix was to change a line in
libs/libmythtv/channel.cpp:Channel::SetChannel (line 165) adding one to
the index.

int frequency = curList[i].freq * 16 / 1000 + finetune;

was changed to

int frequency = curList[i+1].freq * 16 / 1000 + finetune;

This is the only pace where I needed to add one to the index. Am I using
the wrong frequency table? I verified that curList is set to ntsc_cable in
Channel::SetFrequencyTable.

With the mod to SetChannel it records the correct channel and the program
guide displays the correct information for the channel being
watched/recorded.

John





Isaac Richards <ijr@po.cwru.edu>
Sent by: mythtv-dev-admin@snowman.net
10/10/02 12:31 PM
Please respond to mythtv-dev


To: mythtv-dev@snowman.net
cc:
Subject: Re: [mythtv] Database question/problem


On Thursday 10 October 2002 12:15 pm, GrandMasterLee wrote:
> On Thu, 2002-10-10 at 10:16, johns@dvt-inc.com wrote:
> > Hi all,
> >
> > I finally got the latest CVS (tarball from 10/10) to compile and run,
but
> > I run into a couple of problems which I believe are related to the
> > database.
> >
> > 1) I cannot change channels. This appears to be a classic database
> > problem. Pause live TV works, mythepg works with the correct channel
> > names and program schedule.

For this, make sure that you have a cardinput that matches to the proper
capture card and the proper channel source.. If you crack open the
source,
try to see why libs/libmythtv/tv.cpp:TV::CheckChannel() (starting at line
1656) returns false.

> > 2) When I schedule a recording the wrong channel is recorded. Actually
> > it appears to always be one less than the channel I would like to
record.
> > For example if I want to record channel 12 then it records channel 11.

Pretty much the same thing, really.. Take a look at
libs/libmythtv/tv.cpp:TV::SetChannel() (line 884), and see if you can
figure
out why it's changing to the wrong channel. I'd like to know the main
query
in both cases (stick something like a cout << thequery << endl; after it
gets
setup), and the results from the databae.

> I've found that the channel index starts at 0, also, if a channel scan
> is performed, it can also skew the numbers, since not all channels are
> accounted for. Just my 0.02.

That's no longer the case with the current database structure -- the
internal
channel ids are 1000 + channel number.

> > I recreated the database then reran setup and mythfilldatabase with no
> > errors. The records for program, channel and single*record looked OK
> > (chanid matched, channel number was correct, etc.).
>
> Did this start happenening after using Mythtv for a while, or was it all
> of a sudden?
>
> > Any suggestions?
> >
> > John
_______________________________________________
mythtv-dev mailing list
mythtv-dev@snowman.net
http://www.snowman.net/mailman/listinfo/mythtv-dev
Re: Database question/problem [ In reply to ]
On Friday 11 October 2002 10:29 am, johns@dvt-inc.com wrote:
> OK, Here is what I found last night.
>
> 1) I could not change channels because of a problem with my sound card.
> The NuppelVideoPlayer::GetPause was never returning correctly, therefore
> libs/libmythtv/tv.cpp:TV::ChangeChannel (around line 1380) was getting
> stuck in the while loop. I hardcoded the value of disableaudio to true in
> NuppelVideoPlayer.cpp and I can change channels (without audio). I'll work
> on the live audio later. I am really interested in recording for now
> anyway.
>
> Just a thought. Do I need two sound cards to watch live TV? One to do
> the recording and one to play back?

No, you shouldn't need two cards -- what kind of card are you using, which
driver?

> 2) Once I was able to change channels I can see that the program guide and
> channel number on the screen were as expected, for example if I manually
> change to channel 21 I get the program information for channel 21 and 21
> shows in the upper right hand corner of the screen, but it tunes to
> channel 20. My quick fix was to change a line in
> libs/libmythtv/channel.cpp:Channel::SetChannel (line 165) adding one to
> the index.

Can you stick this line in libs/libmythtv/tv.cpp at line 911 for me and let
me know what it says? Should be triggered by a recording..

cout << thequery << " " << chanstr << " " << inputname << endl;

And I'd also like to see your capturecard, cardinput, videosource, and a few
lines from your channel tables from the database..

Isaac
Re: Database question/problem [ In reply to ]
>On Friday 11 October 2002 10:29 am, johns@dvt-inc.com wrote:
>> OK, Here is what I found last night.
>>
>> 1) I could not change channels because of a problem with my sound card.
>> The NuppelVideoPlayer::GetPause was never returning correctly, therefore
>> libs/libmythtv/tv.cpp:TV::ChangeChannel (around line 1380) was getting
>> stuck in the while loop. I hardcoded the value of disableaudio to true in
>> NuppelVideoPlayer.cpp and I can change channels (without audio). I'll
>work
>> on the live audio later. I am really interested in recording for now
>> anyway.
>>
>> Just a thought. Do I need two sound cards to watch live TV? One to do
>> the recording and one to play back?

>No, you shouldn't need two cards -- what kind of card are you using, which
>driver?

I use the ATI TV Wonder VE video capture and a soundblaster AWE64 sound card.

Capture Device ATI TV Wonder VE Driver: bttv

Sound Creative SB AEW64 Driver: sb

Video nVidia GeForce2 MX Driver: Card:NVIDIA GeForce 2 MX (generic)

During setup I use /dev/video0 and /dev/dsp

>> 2) Once I was able to change channels I can see that the program guide
>and
>> channel number on the screen were as expected, for example if I manually
>> change to channel 21 I get the program information for channel 21 and 21
>> shows in the upper right hand corner of the screen, but it tunes to
>> channel 20. My quick fix was to change a line in
>> libs/libmythtv/channel.cpp:Channel::SetChannel (line 165) adding one to
>> the index.
>
>Can you stick this line in libs/libmythtv/tv.cpp at line 911 for me and
>let
>me know what it says? Should be triggered by a recording..
>
>cout << thequery << " " << chanstr << " " << inputname << endl;
>

I scheduled a recording of channel 25. Here is the entire output from
mythfrontend:

Probed: Television
Probed: Composite1
8 8 670
SELECT channel.channum,cardinput.inputname FROM
channel,capturecard,cardinput WHERE channel.chanid = 1025 AND
cardinput.cardid = capturecard.cardid AND cardinput.sourceid = 1 AND
capturecard.cardid = 1; 25 Television
Changing from None to RecordingOnly
strange error flushing buffer ...
Changing from RecordingOnly to None

>And I'd also like to see your capturecard, cardinput, videosource, and a
>few
>lines from your channel tables from the database..
>

I hope this comes out readable. If not let me know and I will post it to
a web site.

+--------+-------------+-------------+----------+----------------+
| cardid | videodevice | audiodevice | cardtype | audioratelimit |
+--------+-------------+-------------+----------+----------------+
| 1 | /dev/video0 | /dev/dsp | V4L | 0 |
+--------+-------------+-------------+----------+----------------+
1 row in set (0.00 sec)

+-------------+--------+----------+------------+-----------------+------------+-----------+
| cardinputid | cardid | sourceid | inputname | externalcommand |
preference | shareable |
+-------------+--------+----------+------------+-----------------+------------+-----------+
| 1 | 1 | 1 | Television | NULL |
NULL | N |
+-------------+--------+----------+------------+-----------------+------------+-----------+
1 row in set (0.00 sec)

+----------+-------+
| sourceid | name |
+----------+-------+
| 1 | cable |
+----------+-------+
1 row in set (0.00 sec)


+--------+---------+----------+----------+-----------------+------------------------------------+----------+--------------+---------+
| chanid | channum | sourceid | callsign | name | icon
| finetune | videofilters | xmltvid |
+--------+---------+----------+----------+-----------------+------------------------------------+----------+--------------+---------+
| 1025 | 25 | 1 | ESPN | Channel 25 ESPN |
/root/.mythtv/channels/espn_30.jpg | 0 | NULL | 25 |
+--------+---------+----------+----------+-----------------+------------------------------------+----------+--------------+---------+
1 row in set (0.00 sec)

+--------+----------------+----------------+------------------+----------+---------------------------------------+
| chanid | starttime | endtime | title | subtitle |
description |
+--------+----------------+----------------+------------------+----------+---------------------------------------+
| 1025 | 20021011120000 | 20021011123000 | Baseball Tonight | |
Nightly baseball news and highlights. |
+--------+----------------+----------------+------------------+----------+---------------------------------------+
1 row in set (0.00 sec)


>Isaac

Thanks for your help Isaac!

John
Re: Database question/problem [ In reply to ]
On Friday 11 October 2002 12:35 pm, johnsteele.john@thunder.dvt-inc.com wrote:
> I use the ATI TV Wonder VE video capture and a soundblaster AWE64 sound
> card.
>
> Capture Device ATI TV Wonder VE Driver: bttv
>
> Sound Creative SB AEW64 Driver: sb
>
> Video nVidia GeForce2 MX Driver: Card:NVIDIA GeForce 2 MX (generic)
>
> During setup I use /dev/video0 and /dev/dsp

Might want to try using alsa and seeing if that clears up the sound problems.

> I scheduled a recording of channel 25. Here is the entire output from
> mythfrontend:
>
> Probed: Television
> Probed: Composite1
> 8 8 670
> SELECT channel.channum,cardinput.inputname FROM
> channel,capturecard,cardinput WHERE channel.chanid = 1025 AND
> cardinput.cardid = capturecard.cardid AND cardinput.sourceid = 1 AND
> capturecard.cardid = 1; 25 Television
> Changing from None to RecordingOnly
> strange error flushing buffer ...
> Changing from RecordingOnly to None

Ok, so that's perfectly correct..

> >And I'd also like to see your capturecard, cardinput, videosource, and a
> >few
> >lines from your channel tables from the database..
>
> I hope this comes out readable. If not let me know and I will post it to
> a web site.

Readable enough, thanks. Again, there's nothing wrong there.. Just to
verify, can you stick this line in channel.cpp, right above the line you
modified (165):

cout << channame << " " << i << " " << curList[i].freq << endl;

And just send me the output when you tune to channel 25 or whatever.. By
chance, xawtv isn't also off-by-one like this, is it?

Isaac
Re: Database question/problem [ In reply to ]
> Might want to try using alsa and seeing if that clears up the sound
> problems.

OK, I am working on getting that installed.

> Readable enough, thanks. Again, there's nothing wrong there.. Just to
> verify, can you stick this line in channel.cpp, right above the line you
> modified (165):
>
> cout << channame << " " << i << " " << curList[i].freq << endl;
>
> And just send me the output when you tune to channel 25 or whatever..
> By chance, xawtv isn't also off-by-one like this, is it?
>

This is the line printed when I change to channel 25 from mythtv:

25 24 229250


This is the entire output from mythfrontend. The initial channel is 21 in
my theme.txt. I then changed to channel 25 directly, then I hit the down
arrow once. And yes xawtv is also off-by-one.

mythfrontend
Probed: Television
Probed: Composite1
21 20 163250
Changing from None to WatchingLiveTV
strange error flushing buffer ...
Using XV port 56
25 24 229250
24 23 223250
Changing from WatchingLiveTV to None



John
Re: Database question/problem [ In reply to ]
On Friday 11 October 2002 02:28 pm, John wrote:
> > Might want to try using alsa and seeing if that clears up the sound
> > problems.
>
> OK, I am working on getting that installed.
>
> This is the line printed when I change to channel 25 from mythtv:
>
> 25 24 229250
>
>
> This is the entire output from mythfrontend. The initial channel is 21 in
> my theme.txt. I then changed to channel 25 directly, then I hit the down
> arrow once. And yes xawtv is also off-by-one.

Have you tried using canada-cable instead of us-cable?

Isaac