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 
7 class RemoteEncoder;
8 
11  SkipType commDetectMethod,
12  bool showProgress, bool fullSpeed,
13  MythCommFlagPlayer* 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: */
CommDetectorFactory.h
CommDetectorBase
Abstract base class for all CommDetectors. Please use the CommDetectFactory to make actual instances.
Definition: CommDetectorBase.h:26
ClassicCommDetector.h
PrePostRollFlagger.h
CommDetector2.h
COMM_DETECT_PREPOSTROLL
@ COMM_DETECT_PREPOSTROLL
Definition: programtypes.h:148
RemoteEncoder
Definition: remoteencoder.h:24
MythCommFlagPlayer
Definition: mythcommflagplayer.h:25
ClassicCommDetector
Definition: ClassicCommDetector.h:47
SkipType
SkipType
This is used as a bitmask.
Definition: programtypes.h:128
CommDetectorFactory::makeCommDetector
static CommDetectorBase * makeCommDetector(SkipType commDetectMethod, bool showProgress, bool fullSpeed, MythCommFlagPlayer *player, int chanid, const QDateTime &startedAt, const QDateTime &stopsAt, const QDateTime &recordingStartedAt, const QDateTime &recordingStopsAt, bool useDB)
Definition: CommDetectorFactory.cpp:10
PrePostRollFlagger
Definition: PrePostRollFlagger.h:6
COMM_DETECT_2
@ COMM_DETECT_2
Definition: programtypes.h:140
CommDetector2
Definition: CommDetector2.h:36