MythTV  master
cutter.h
Go to the documentation of this file.
1 #ifndef CUTTER_H
2 #define CUTTER_H
3 
4 #include <cstdint> // for int64_t
5 #include "deletemap.h" // for DeleteMap
6 #include "programtypes.h" // for frm_dir_map_t
7 
8 // Cutter object is used in performing clean cutting. The
9 // act of cutting is shared between the player and the
10 // transcode loop. The player performs the initial part
11 // of the cut by seeking, and the transcode loop handles
12 // the remaining part by discarding data.
13 class Cutter
14 {
15  public:
16  Cutter() = default;
17  void SetCutList(frm_dir_map_t &deleteMap, PlayerContext *ctx);
19  void Activate(float v2a, int64_t total);
20  void NewFrame(int64_t currentFrame);
21  bool InhibitUseVideoFrame(void);
22  bool InhibitUseAudioFrames(int64_t frames, long *totalAudio);
23  bool InhibitDummyFrame(void);
24  bool InhibitDropFrame(void);
25 
26  private:
27  bool m_active {false};
30  int64_t m_totalFrames {0};
31  int64_t m_videoFramesToCut {0};
32  int64_t m_audioFramesToCut {0};
34  enum
35  {
36  MAXLEADIN = 200,
37  MINCUT = 20
38  };
39 
40 };
41 
42 #endif
43 /* vim: set expandtab tabstop=4 shiftwidth=4: */
44 
Cutter()=default
bool InhibitDropFrame(void)
Definition: cutter.cpp:163
int64_t m_audioFramesToCut
Definition: cutter.h:32
bool m_active
Definition: cutter.h:27
void SetCutList(frm_dir_map_t &deleteMap, PlayerContext *ctx)
Definition: cutter.cpp:11
bool InhibitUseAudioFrames(int64_t frames, long *totalAudio)
Definition: cutter.cpp:118
QMap< uint64_t, MarkTypes > frm_dir_map_t
Frame # -> Mark map.
Definition: programtypes.h:81
void NewFrame(int64_t currentFrame)
Definition: cutter.cpp:73
DeleteMap m_tracker
Definition: cutter.h:29
bool InhibitUseVideoFrame(void)
Definition: cutter.cpp:100
int64_t m_totalFrames
Definition: cutter.h:30
bool InhibitDummyFrame(void)
Definition: cutter.cpp:151
float m_audioFramesPerVideoFrame
Definition: cutter.h:33
void Activate(float v2a, int64_t total)
Definition: cutter.cpp:63
frm_dir_map_t AdjustedCutList() const
Definition: cutter.cpp:58
frm_dir_map_t m_foreshortenedCutList
Definition: cutter.h:28
Definition: cutter.h:13
int64_t m_videoFramesToCut
Definition: cutter.h:31
const char * frames[3]
Definition: element.c:46