[mythtv] [Preliminary patch[ Add profile groups

Geoffrey Hausheer ou401cru02 at sneakemail.com
Fri Sep 12 11:47:07 EDT 2003


On Fri, 12 Sep 2003 11:04:27 -0400, "Matt Zimmerman mdz-at-debian.org
|mythtv/1.0-Allow|" <n4n4hbjjnh0t at sneakemail.com> said:
> On Fri, Sep 12, 2003 at 09:12:34AM -0500, Geoffrey Hausheer wrote:
> 
> > On Fri, 12 Sep 2003 09:46:42 -0400, "Matt Zimmerman mdz-at-debian.org
> > > Are you using Qt 3.0?  If so, try upgrading to 3.1.
> > I don't think that is the problem:
> 
> I got all sorts of unreproducible QString crashes with 3.0 that went away
> with 3.1.
Would it be useful to downgrade from 3.2 to 3.1, and recompile?

I am pretty sure I am just doing something wrong (as I said, the failure
only occurs when I try to do a setName on a LineEdit GUI element), I just
don't know what it is.

I've already tried everything else I could think of, and I'm basically
done with all my changes, so I'll just finish my testing and send the
patch as is.

If you want a head start working on some magic for the database, here are
the changes to cvs.sql:
-------------------------------
CREATE TABLE profilegroups (
  id int(10) unsigned NOT NULL auto_increment,
  name varchar(255) default NULL,
  cardtype varchar(32) NOT NULL default 'V4L',
  is_default int(1) default 0,
  hostname varchar(255) default NULL,
  PRIMARY KEY (id)
);
INSERT INTO profilegroups SET name = "Software Encoders", cardtype =
'V4L',
  is_default = 1;
INSERT INTO profilegroups SET name = "Hardware MPEG Encoders",
  cardtype = 'MPEG', is_default = 1;
INSERT INTO profilegroups SET name = "Hardware MJPEG Encoders",
  cardtype = 'MJPEG', is_default = 1;
INSERT INTO profilegroups SET name = "Transcoders",
  cardtype = 'TRANSCODE', is_default = 1;
DROP TABLE recordingprofiles;
CREATE TABLE recordingprofiles (
  id int(10) unsigned NOT NULL auto_increment,
  name varchar(128) default NULL,
  videocodec varchar(128) default NULL,
  audiocodec varchar(128) default NULL,
  profilegroup int(10) unsigned NOT NULL DEFAULT 0,
  PRIMARY KEY  (id),
) TYPE=MyISAM;
INSERT INTO recordingprofiles SET name = "Default", profilegroup = 1;
INSERT INTO recordingprofiles SET name = "Live TV", profilegroup = 1;
INSERT INTO recordingprofiles SET name = "High-Quality", profilegroup =
1;
INSERT INTO recordingprofiles SET name = "Low-Quality", profilegroup = 1;
INSERT INTO recordingprofiles SET name = "Default", profilegroup = 2;
INSERT INTO recordingprofiles SET name = "Live TV", profilegroup = 2;
INSERT INTO recordingprofiles SET name = "High-Quality", profilegroup =
2;
INSERT INTO recordingprofiles SET name = "Low-Quality", profilegroup = 2;
INSERT INTO recordingprofiles SET name = "Default", profilegroup = 3;
INSERT INTO recordingprofiles SET name = "Live TV", profilegroup = 3;
INSERT INTO recordingprofiles SET name = "High-Quality", profilegroup =
3;
INSERT INTO recordingprofiles SET name = "Low-Quality", profilegroup = 3;
INSERT INTO recordingprofiles SET name = "RTjpeg/MPEG4", profilegroup =
4;
INSERT INTO recordingprofiles SET name = "MPEG2", profilegroup = 4;
DELETE FROM codecparams;

----------------------
In order to keep the original profiles:
a) you can probably only keep 'Default' and 'Live TV'.  'High', and 'Low'
are new, and probably can't be kept.  The transcoder profile can be kept
too, but I really don't think it is worth it.

b) the 'name' field in recordingprofiles needs to be un-marked as UNIQUE.
 The only way I could figure to do that is:
---
alter table recordingprofiles add newname varchar(128) default null after
name;
update recordingprofiles set newname = name;
alter table recordingprofiles drop name;
alter table recordingprofiles change newname name varchar(128);
---

c) the Live TV and Default profiles need to be duplicated twice (3 total
occurances).  each occurance should have the profilegroup field set to
'1', '2', or '3' respectively

c1) If you want to do the transcoder, the transcoder profile should be
copied into "RTjpeg/MPEG4" and "MPEG2", both with profilegroup = 4.

In the end there should be no profiles with profilegroup = 0, and
recording profile should look like this:
+----+--------------+------------+------------+--------------+
| id | name         | videocodec | audiocodec | profilegroup |
+----+--------------+------------+------------+--------------+
|  1 | Default      | NULL       | NULL       |            1 |
|  2 | Live TV      | NULL       | NULL       |            1 |
|  3 | High-Quality | NULL       | NULL       |            1 |
|  4 | Low-Quality  | NULL       | NULL       |            1 |
|  5 | Default      | NULL       | NULL       |            2 |
|  6 | Live TV      | NULL       | NULL       |            2 |
|  7 | High-Quality | NULL       | NULL       |            2 |
|  8 | Low-Quality  | NULL       | NULL       |            2 |
|  9 | Default      | NULL       | NULL       |            3 |
| 10 | Live TV      | NULL       | NULL       |            3 |
| 11 | High-Quality | NULL       | NULL       |            3 |
| 12 | Low-Quality  | NULL       | NULL       |            3 |
| 13 | RTjpeg/MPEG4 | NULL       | NULL       |            4 |
| 14 | MPEG2        | NULL       | NULL       |            4 |
+----+--------------+------------+------------+--------------+

(with videocodec and audiocodec filled in with the values from the
current 'Live TV' and 'Default')

d) the codecparams table needs to be updated to reflect these changes.

.Geoff


More information about the mythtv-dev mailing list