[mythtv] Re: [PATCH] transcoding profiles v4.1

Chris Pinkham cpinkham at bc2va.org
Thu May 5 04:38:32 UTC 2005


> Just to clarify and avoid ambiguity, I've attached a new patch
> attached without any of the unrelated cruft; no changes otherwise.

Couple questions/comments based on my initial observations after
applying the patch.

1) The "UPDATE table1, table2, tabl3 SET table1.column" syntax is not
valid for MySQL v3.x, so this will need to be changed to something
like the following and put after the performActualUpdate() call.

----------------------------------------
        QString thequery;
        int recordid;
        MSqlQuery query(MSqlQuery::InitCon());

        thequery = QString("SELECT r.recordid "
                           "FROM record r, recordingprofiles p, codecparams c "
                           "WHERE c.name = 'autotranscode' "
                               "AND c.value = 1 "
                               "AND c.profile = p.id "
                               "AND r.profile = p.name; ");
        query.prepare(thequery);

        if (query.exec() && query.isActive() && query.size() > 0)
        {
            MSqlQuery query2(MSqlQuery::InitCon());
            while (query.next())
            {
                recordid = query.value(0).toInt();

                thequery = QString("UPDATE record SET autotranscode = 1 "
                                   "WHERE recordid = %1;").arg(recordid);
                query2.prepare(thequery);
                query2.exec();
            }
        }
    }
----------------------------------------

The logic of the above update seems to be flawed anyway.  I set
my recordings to record using the "Default" profile, and have
autotranscode off except for my air2pc recording profile.  The
update changed all my recordings to autotranscode = 1.  This
isn't what I want, I only want recordings to transcode when they
record on my air2pc card, not when they record on my M179 cards.

2) Would it make better sense to just have 1 column rather than
the 2 you created.  The value would indiate one of the following:

	* Do not transcode
	* Transcode using Autodetect
	* Transcode using 'Low Quality'
	* Transcode using 'Medium Quality'
	* Transcode using 'High Quality'

I think it would be nice if this could be wrapped into one
setting on the scheduled recording editor page.  You might not
be able to keep the recording profile ID in the column, but
I think that having the 4 different profiles is enough, the same
as it is with normal recording profiles for bttv and ivtv cards.

-- 
Chris



More information about the mythtv-dev mailing list