00001 #include "CommDetectorFactory.h"
00002 #include "ClassicCommDetector.h"
00003 #include "CommDetector2.h"
00004 #include "PrePostRollFlagger.h"
00005
00006 class MythPlayer;
00007 class RemoteEncoder;
00008
00009 CommDetectorBase*
00010 CommDetectorFactory::makeCommDetector(
00011 SkipType commDetectMethod,
00012 bool showProgress, bool fullSpeed,
00013 MythPlayer* player,
00014 int chanid,
00015 const QDateTime& startedAt,
00016 const QDateTime& stopsAt,
00017 const QDateTime& recordingStartedAt,
00018 const QDateTime& recordingStopsAt,
00019 bool useDB)
00020 {
00021 if(commDetectMethod & COMM_DETECT_PREPOSTROLL)
00022 {
00023 return new PrePostRollFlagger(commDetectMethod, showProgress, fullSpeed,
00024 player, startedAt, stopsAt,
00025 recordingStartedAt, recordingStopsAt);
00026 }
00027
00028 if ((commDetectMethod & COMM_DETECT_2))
00029 {
00030 return new CommDetector2(
00031 commDetectMethod, showProgress, fullSpeed,
00032 player, chanid, startedAt, stopsAt,
00033 recordingStartedAt, recordingStopsAt, useDB);
00034 }
00035
00036 return new ClassicCommDetector(commDetectMethod, showProgress, fullSpeed,
00037 player, startedAt, stopsAt, recordingStartedAt, recordingStopsAt);
00038 }
00039
00040
00041