MythTV  master
v4l2encrecorder.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 /*
3  * Copyright (C) John Poet 2013
4  *
5  * Copyright notice is in v4l2recorder.cpp of the MythTV project.
6  */
7 
8 #ifndef V4L2encRecorder_H
9 #define V4L2encRecorder_H
10 
11 // MythTV includes
12 #include "v4l2encstreamhandler.h"
13 #include "v4lrecorder.h"
14 #include "dtvrecorder.h"
15 
16 class RecordingProfile;
17 class V4LChannel;
18 class QString;
19 class TVRec;
20 
30 {
31  public:
32  V4L2encRecorder(TVRec *rec, V4LChannel *channel);
33 
34  void run(void) override; // RecorderBase
35 
36  bool Open(void);
37  bool IsOpen(void) const { return m_streamHandler; }
38  void Close(void);
39  void StartNewFile(void) override; // RecorderBase
40 
41  bool PauseAndWait(std::chrono::milliseconds timeout = 500ms) override; // RecorderBase
42 
43  protected:
44  bool StartEncoding(void);
45  bool StopEncoding(void);
46 
47  void SetIntOption(RecordingProfile *profile, const QString &name);
48  void SetStrOption(RecordingProfile *profile, const QString &name);
50  const QString &videodev,
51  const QString &audiodev,
52  const QString &vbidev) override; // DTVRecorder
53 
54  private:
55  V4LChannel *m_channel {nullptr};
57 };
58 
59 #endif // V4L2enc_RECORDER_H
V4L2encRecorder::PauseAndWait
bool PauseAndWait(std::chrono::milliseconds timeout=500ms) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
Definition: v4l2encrecorder.cpp:283
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:102
V4L2encRecorder::run
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
Definition: v4l2encrecorder.cpp:129
V4L2encStreamHandler
Definition: v4l2encstreamhandler.h:21
dtvrecorder.h
V4LRecorder
Abstract base class for Video4Linux based recorders.
Definition: v4lrecorder.h:25
V4L2encRecorder::SetOptionsFromProfile
void SetOptionsFromProfile(RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev) override
Sets basic recorder options.
Definition: v4l2encrecorder.cpp:72
V4L2encRecorder::StopEncoding
bool StopEncoding(void)
Definition: v4l2encrecorder.cpp:330
V4L2encRecorder::m_channel
V4LChannel * m_channel
Definition: v4l2encrecorder.h:55
V4L2encRecorder::SetIntOption
void SetIntOption(RecordingProfile *profile, const QString &name)
Definition: v4l2encrecorder.cpp:52
v4l2encstreamhandler.h
hardwareprofile.scan.profile
profile
Definition: scan.py:97
v4lrecorder.h
V4L2encRecorder::m_streamHandler
V4L2encStreamHandler * m_streamHandler
Definition: v4l2encrecorder.h:56
V4L2encRecorder::V4L2encRecorder
V4L2encRecorder(TVRec *rec, V4LChannel *channel)
Definition: v4l2encrecorder.cpp:40
V4L2encRecorder::SetStrOption
void SetStrOption(RecordingProfile *profile, const QString &name)
Definition: v4l2encrecorder.cpp:62
V4L2encRecorder::Open
bool Open(void)
Definition: v4l2encrecorder.cpp:233
TVRec
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:142
V4L2encRecorder
This is a specialization of DTVRecorder used to handle streams from V4L2 recorders.
Definition: v4l2encrecorder.h:29
RecordingProfile
Definition: recordingprofile.h:41
V4L2encRecorder::IsOpen
bool IsOpen(void) const
Definition: v4l2encrecorder.h:37
V4LChannel
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:30
V4L2encRecorder::Close
void Close(void)
Definition: v4l2encrecorder.cpp:271
V4L2encRecorder::StartNewFile
void StartNewFile(void) override
Definition: v4l2encrecorder.cpp:119
V4L2encRecorder::StartEncoding
bool StartEncoding(void)
Definition: v4l2encrecorder.cpp:318