Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#5346 closed task (fixed)

Allow commercial flagger to be run without DB usage.

Reported by: danielk Owned by: danielk
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description


Attachments (1)

5346-v1.patch (16.3 KB) - added by danielk 13 years ago.
Patch to allow blank & logo and logo & scene to be combined in the classic commercial flagger.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by danielk

(In [17308]) Refs #5346. Does three prep steps for allowing commercial flagger to be run on files which are not MythTV recordings.

comment:2 Changed 13 years ago by danielk

(In [17309]) Refs #5346. Adds a --override-settings-file option.

This also adds a MythCommandLineParser? class which is an attempt to start moving common command line parsing code into a single class. I found some bugs in the commflagger command line parsing code last week which had been fixed in the other command line parsers. So far, only the override settings options have been consolidated there, and only mythfrontend and mythcommflag are using the consolidated version.

The override settings file is just a file containing linefeed delimited KEY=VALUE pairs. This makes it easier to test a few different settings without needing to poke the DB or compose a series of command line argument novellas.

comment:3 Changed 13 years ago by danielk

(In [17312]) Refs #5346. Adds an optional ignoreDB param to MythContext init.

This optional param allows you to disable DB access by the GetSettings/SetSettings? code. This allows you can write simple programs that use MythContext, but set the settings via command line parameters.

This setting is also respected by the two classes that create a VideoDisplayProfile?, AvFormatDecoder? and VideoOutput?. (And VideoOutputNull?, which uses the VideoDisplayProfile? created by VideoOutput?).

I'm using this for the commercial flagger to flag videos as a standalone program, but it would also be used for things like a firewire channel changer that used our firewire smarts but didn't touch the DB, or with the command line interface to the channel scanner in the channel scanner branch (which can emulate dvbscan output).

Unfortunately this changes the myth binary revision, so plugins will need to be relinked.

comment:4 Changed 13 years ago by danielk

(In [17313]) Refs #5346. Adds IsDatabaseIgnored?() checking to NVP in the three places that a basic VideoOutputNull? init will touch.

comment:5 Changed 13 years ago by danielk

(In [17314]) Refs #5346. Allows ProgramInfo? position maps to be used without a backing DB by use of a DB replacement QMap.

This allows the commercial flagger to be used in a one-shot on videos without polluting the positionmap DB, by storing the temporary position map in a QMap rather than the DB.

This unfortunately changes the myth binary revision so plugins will need to be recompiled. (Last such commit for #5346.)

comment:6 Changed 13 years ago by danielk

(In [17315]) Refs #5346. Adds basic support for comm flagging mpeg files without touching the DB.

You can now use the --file option along with --skipdb to do commercial flagging without touching the DB. Currently the only non-debug output of value that can be obtained requires a --outputfile spec as well.

comment:7 Changed 13 years ago by danielk

(In [17318]) Refs #5346. Augments output options for commercial flagger.

  • Adds an --outputmethod paramater with two options "full" and "essentials", where full prints out all the information the commercial flagger has

collected, while "essentials" prints only the commercial flagging marks. "essentials" is the default.

  • Adds a --very-quiet paramater which quiets all debugging and status messages.
  • Allows "-" as an output file parameter which prints output to stdout rather than a file.
  • Uncomments CommDetector2 scene change detector (but still leaves it disabled by default.

comment:8 Changed 13 years ago by danielk

(In [17381]) Refs #5346. Gets rid of hardcoded SkipType? integers in the code and adds a db update to convert commercial flagging flags in the DB.

Changed 13 years ago by danielk

Attachment: 5346-v1.patch added

Patch to allow blank & logo and logo & scene to be combined in the classic commercial flagger.

comment:9 Changed 13 years ago by danielk

(In [17382]) Refs #5346. Adds new commflagger options to --help text output.

comment:10 Changed 13 years ago by danielk

Resolution: fixed
Status: newclosed

(In [17388]) Fixes #5346. Applies 5346-v1 patch to allow more combinations of commercial flagging types and adds a README.txt explaining how to use mythcommflag as a command line application.

comment:11 Changed 12 years ago by danielk

(In [17470]) Refs #5346. Fixes bug in ClassicCommDetector? where a negative index was used into an array.

Note this also moves some basic math functions into util.cpp: clamp, lerp, sq

Note: See TracTickets for help on using tickets.