MythTV  master
CommDetectorFactory.cpp
Go to the documentation of this file.
1 #include "CommDetectorFactory.h"
2 #include "ClassicCommDetector.h"
3 #include "CommDetector2.h"
4 #include "PrePostRollFlagger.h"
5 
6 class MythPlayer;
7 class RemoteEncoder;
8 
11  SkipType commDetectMethod,
12  bool showProgress, bool fullSpeed,
13  MythPlayer* player,
14  int chanid,
15  const QDateTime& startedAt,
16  const QDateTime& stopsAt,
17  const QDateTime& recordingStartedAt,
18  const QDateTime& recordingStopsAt,
19  bool useDB)
20 {
21  if(commDetectMethod & COMM_DETECT_PREPOSTROLL)
22  {
23  return new PrePostRollFlagger(commDetectMethod, showProgress, fullSpeed,
24  player, startedAt, stopsAt,
25  recordingStartedAt, recordingStopsAt);
26  }
27 
28  if ((commDetectMethod & COMM_DETECT_2))
29  {
30  return new CommDetector2(
31  commDetectMethod, showProgress, fullSpeed,
32  player, chanid, startedAt, stopsAt,
33  recordingStartedAt, recordingStopsAt, useDB);
34  }
35 
36  return new ClassicCommDetector(commDetectMethod, showProgress, fullSpeed,
37  player, startedAt, stopsAt, recordingStartedAt, recordingStopsAt);
38 }
39 
40 
41 /* vim: set expandtab tabstop=4 shiftwidth=4: */
SkipType
This is used as a bitmask.
Definition: programtypes.h:91
Abstract base class for all CommDetectors.
static CommDetectorBase * makeCommDetector(SkipType commDetectMethod, bool showProgress, bool fullSpeed, MythPlayer *player, int chanid, const QDateTime &startedAt, const QDateTime &stopsAt, const QDateTime &recordingStartedAt, const QDateTime &recordingStopsAt, bool useDB)