Mailing List Archive

buglet in cvs?
I've updated my install from CVS, and now when I delete a recording
the file goes away, but the db entry remains. The listboxes then show
0bytes and hang in confusion when you select the missing-file entry.

Did the transition from normal strings to QStrings break the query in
deletebox somehow? It's not clear that the resulting query is any
different than it was, yet it no longer works...

--
Grant Taylor - gtaylor<at>picante.com - http://www.picante.com/~gtaylor/
Linux Printing Website and HOWTO: http://www.linuxprinting.org/
Re: buglet in cvs? [ In reply to ]
On Friday 13 September 2002 10:43 pm, Grant Taylor wrote:
> I've updated my install from CVS, and now when I delete a recording
> the file goes away, but the db entry remains. The listboxes then show
> 0bytes and hang in confusion when you select the missing-file entry.
>
> Did the transition from normal strings to QStrings break the query in
> deletebox somehow? It's not clear that the resulting query is any
> different than it was, yet it no longer works...

Does what I just committed fix that?

Isaac
Re: buglet in cvs? [ In reply to ]
>> hang in confusion when you select the missing-file entry.
> Does what I just committed fix that?

Undoubtedly! Reminds me why I prefer printf-alikes: the compiler will
parse the string and check argument counts, types, etc...

Unfortunately I erased all my recordings by hand just now as part of
switching back from 32000 to 44100 khz audio, so now I have nothing to
delete and check :(

Oh, below are my local changes, one or two of which you might want to
adopt or not. They implement:

- Larger fonts in several places I wanted them. It's not a setting,
just a different hard-coded font here and there. The time format
in the listbox is also changed to go with this. And in one place
the font scaling calculation broke for skinny non-square sizes.

- The delete and playbox show the oldest or newest recordings first
as appropriate. Before it was apparently sorting on either channel
or date as a string, neither of which worked quite right. I guess
you could mouse around the dialog and change the sorting, but best
for it to just do what I want ;)



Index: libNuppelVideo/osd.cpp
===================================================================
RCS file: /var/lib/cvs/MC/libNuppelVideo/osd.cpp,v
retrieving revision 1.20
diff -u -r1.20 osd.cpp
--- libNuppelVideo/osd.cpp 18 Aug 2002 19:16:01 -0000 1.20
+++ libNuppelVideo/osd.cpp 14 Sep 2002 03:30:01 -0000
@@ -130,7 +130,7 @@
usingtheme = LoadTheme();
}

- if (vid_width < 400 || vid_height < 400)
+ if (vid_height < 400)
{
infofontsize /= 2;
channumfontsize /= 2;
@@ -201,7 +201,7 @@
dialogRect.setLeft(vid_width / 8);
dialogRect.setRight(vid_width * 7 / 8);

- infofontsize = 16;
+ infofontsize = 18;
channumfontsize = 40;

usepause = false;
Index: mythepg/guidegrid.cpp
===================================================================
RCS file: /var/lib/cvs/MC/mythepg/guidegrid.cpp,v
retrieving revision 1.25
diff -u -r1.25 guidegrid.cpp
--- mythepg/guidegrid.cpp 4 Sep 2002 06:53:54 -0000 1.25
+++ mythepg/guidegrid.cpp 14 Sep 2002 03:30:02 -0000
@@ -39,8 +39,8 @@
setCursor(QCursor(Qt::BlankCursor));

setPalette(QPalette(QColor(250, 250, 250)));
- m_font = new QFont("Arial", 11 * hmult, QFont::Bold);
- m_largerFont = new QFont("Arial", 13 * hmult, QFont::Bold);
+ m_font = new QFont("Arial", 18 * hmult, QFont::Bold);
+ m_largerFont = new QFont("Arial", 20 * hmult, QFont::Bold);

m_originalStartTime = QDateTime::currentDateTime();
m_currentStartTime = m_originalStartTime;
Index: mythfrontend/deletebox.cpp
===================================================================
RCS file: /var/lib/cvs/MC/mythfrontend/deletebox.cpp,v
retrieving revision 1.15
diff -u -r1.15 deletebox.cpp
--- mythfrontend/deletebox.cpp 14 Sep 2002 03:10:58 -0000 1.15
+++ mythfrontend/deletebox.cpp 14 Sep 2002 03:30:02 -0000
@@ -74,7 +74,7 @@
listview->setColumnWidth(2, 435 * wmult);
listview->setColumnWidth(3, 90 * wmult);

- listview->setSorting(1, false);
+ listview->setSorting(-1, false);
listview->setAllColumnsShowFocus(TRUE);

connect(listview, SIGNAL(returnPressed(QListViewItem *)), this,
@@ -91,7 +91,7 @@
ProgramListItem *item;

thequery = "SELECT channum,starttime,endtime,title,subtitle,description "
- "FROM recorded;";
+ "FROM recorded ORDER BY starttime DESC;";

query = db->exec(thequery);

Index: mythfrontend/playbackbox.cpp
===================================================================
RCS file: /var/lib/cvs/MC/mythfrontend/playbackbox.cpp,v
retrieving revision 1.13
diff -u -r1.13 playbackbox.cpp
--- mythfrontend/playbackbox.cpp 4 Sep 2002 06:53:54 -0000 1.13
+++ mythfrontend/playbackbox.cpp 14 Sep 2002 03:30:02 -0000
@@ -48,7 +48,7 @@
setGeometry(0, 0, screenwidth, screenheight);
setFixedSize(QSize(screenwidth, screenheight));

- setFont(QFont("Arial", 16 * hmult, QFont::Bold));
+ setFont(QFont("Arial", 20 * hmult, QFont::Bold));
setCursor(QCursor(Qt::BlankCursor));

QVBoxLayout *vbox = new QVBoxLayout(this, 20 * wmult);
@@ -67,7 +67,7 @@
listview->setColumnWidthMode(0, QListView::Manual);
listview->setColumnWidthMode(1, QListView::Manual);

- listview->setSorting(1, false);
+ listview->setSorting(-1, false);
listview->setAllColumnsShowFocus(TRUE);

connect(listview, SIGNAL(returnPressed(QListViewItem *)), this,
@@ -84,7 +84,7 @@
ProgramListItem *item;

thequery = "SELECT channum,starttime,endtime,title,subtitle,description "
- "FROM recorded;";
+ "FROM recorded ORDER BY starttime;";
query = db->exec(thequery);

if (query.isActive() && query.numRowsAffected() > 0)
Index: mythfrontend/programlistitem.cpp
===================================================================
RCS file: /var/lib/cvs/MC/mythfrontend/programlistitem.cpp,v
retrieving revision 1.11
diff -u -r1.11 programlistitem.cpp
--- mythfrontend/programlistitem.cpp 9 Aug 2002 06:48:29 -0000 1.11
+++ mythfrontend/programlistitem.cpp 14 Sep 2002 03:30:03 -0000
@@ -41,7 +41,7 @@
pixmap = NULL;

setText(0, pginfo->channum);
- setText(1, pginfo->startts.toString("MMMM d h:mm AP"));
+ setText(1, pginfo->startts.toString("ddd MMM d h:mmap"));
setText(2, pginfo->title);

if (numcols == 4)


--
Grant Taylor - gtaylor<at>picante.com - http://www.picante.com/~gtaylor/
Linux Printing Website and HOWTO: http://www.linuxprinting.org/
Re: buglet in cvs? [ In reply to ]
On Friday 13 September 2002 11:39 pm, Grant Taylor wrote:
> >> hang in confusion when you select the missing-file entry.
> >
> > Does what I just committed fix that?
>
> Undoubtedly! Reminds me why I prefer printf-alikes: the compiler will
> parse the string and check argument counts, types, etc...

Well, the qt stuff should've warned you run-time about the extra arg. It's
also length safe and handles all that utf-8 junk automatically -- previously
I was being lazy and using an unchecked sprintf to generate the query =)

> Unfortunately I erased all my recordings by hand just now as part of
> switching back from 32000 to 44100 khz audio, so now I have nothing to
> delete and check :(

Yeah -- fixing that audio stuff's on my TODO list for before the next release.
Going to have to break the existing file format, which is why I haven't done
it yet.

> Oh, below are my local changes, one or two of which you might want to
> adopt or not. They implement:
>
> - Larger fonts in several places I wanted them. It's not a setting,
> just a different hard-coded font here and there. The time format
> in the listbox is also changed to go with this. And in one place
> the font scaling calculation broke for skinny non-square sizes.
>
> - The delete and playbox show the oldest or newest recordings first
> as appropriate. Before it was apparently sorting on either channel
> or date as a string, neither of which worked quite right. I guess
> you could mouse around the dialog and change the sorting, but best
> for it to just do what I want ;)

I'm just applied everything but the font size changes. Ordering the
recordings like that makes sense, and I do like that date format better.

Isaac
Re: buglet in cvs? [ In reply to ]
>> switching back from 32000 to 44100 khz audio, so now I have nothing to

> Yeah -- fixing that audio stuff's on my TODO list for before the
> next release. Going to have to break the existing file format,
> which is why I haven't done it yet.

Yes, I went looking earlier and there was no apparent audio rate
stored in the myth-nuv header. Unless it's readily visible in the
mp3/ogg stream itself, I guess that's that.

While you're breaking things, you might want to put some pad and a
version in the header or something for next time.

> I'm just applied everything but the font size changes.

Yeah, it should definitely be a bunch of proper settings, or maybe in
the theme, but I was too lazy ;)

Speaking of bugs, the only two substantive bugs I've seen are:

- Watching the thing being recorded fails when you ffw off the end or
the recording stops and you're watching in the middle. In both
cases the mythtv menu pops up. The ffw/rew/pause progress
indicator also has a gibberish total length number for in-progress
recordings. In Tv it looks like the watching a recording state is
the same for finished and in-progress recordings; maybe there are
one or two places where it has to know the difference?

- The ffw/rew hang bug. You said you thought it might be an audio
sync problem, and it does act like it: if I wait between ffw button
press for the audio to seek and start again, it never hangs. If I
just spew ffw buttons at it, then it'll stop keeping up with the
audio and will hang in short order. It appears to always hang for
about 1 minute or so.


--
Grant Taylor - gtaylor<at>picante.com - http://www.picante.com/~gtaylor/
Linux Printing Website and HOWTO: http://www.linuxprinting.org/
Re: buglet in cvs? [ In reply to ]
On Saturday 14 September 2002 12:58 am, Grant Taylor wrote:
> Yes, I went looking earlier and there was no apparent audio rate
> stored in the myth-nuv header. Unless it's readily visible in the
> mp3/ogg stream itself, I guess that's that.
>
> While you're breaking things, you might want to put some pad and a
> version in the header or something for next time.

Yup.

So, went and did this, just added another frame header that gets parsed out.
Left enough room that it should be useable for s'more data as well -- I'm
currently storing most of the useful encode quality data in the new frame,
too.

Anyway, no more problems recording at one sampling rate and then changing to
another rate. I'm still not doing any resampling, though, so if the output
device isn't capable of doing what the recorded rate is, stuff'll break.
Shouldn't be too important, though, I wouldn't think.

The player's still capable of reading the old style files, and I'm pretty sure
the new files will play on old players, though with the same limitations as
the old files.

> Speaking of bugs, the only two substantive bugs I've seen are:
>
> - Watching the thing being recorded fails when you ffw off the end or
> the recording stops and you're watching in the middle. In both
> cases the mythtv menu pops up. The ffw/rew/pause progress
> indicator also has a gibberish total length number for in-progress
> recordings. In Tv it looks like the watching a recording state is
> the same for finished and in-progress recordings; maybe there are
> one or two places where it has to know the difference?

Probably. I think I've tested playing the in-progress recording a grand total
of twice. I'll check it out sometime.

> - The ffw/rew hang bug. You said you thought it might be an audio
> sync problem, and it does act like it: if I wait between ffw button
> press for the audio to seek and start again, it never hangs. If I
> just spew ffw buttons at it, then it'll stop keeping up with the
> audio and will hang in short order. It appears to always hang for
> about 1 minute or so.

Can you update your cvs checkout again? I _may_ have fixed this.. There was
a small space in time after a seek where the calculated audio position could
be really off, and if the math worked out wrong, it could lead to what you
describe.

Isaac
Re: buglet in cvs? [ In reply to ]
> Can you update your cvs checkout again? I _may_ have fixed this..
> There was a small space in time after a seek where the calculated
> audio position could be really off, and if the math worked out
> wrong, it could lead to what you describe.

Alas, it still hangs sometimes.

--
Grant Taylor - gtaylor<at>picante.com - http://www.picante.com/~gtaylor/
Linux Printing Website and HOWTO: http://www.linuxprinting.org/