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
13#include "v4lrecorder.h"
14#include "dtvrecorder.h"
15
17class V4LChannel;
18class QString;
19class 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:
57};
58
59#endif // V4L2enc_RECORDER_H
This is the coordinating class of the Recorder Subsystem.
Definition: tv_rec.h:143
This is a specialization of DTVRecorder used to handle streams from V4L2 recorders.
void run(void) override
run() starts the recording process, and does not exit until the recording is complete.
V4L2encRecorder(TVRec *rec, V4LChannel *channel)
V4LChannel * m_channel
void SetStrOption(RecordingProfile *profile, const QString &name)
void SetIntOption(RecordingProfile *profile, const QString &name)
V4L2encStreamHandler * m_streamHandler
bool StartEncoding(void)
bool PauseAndWait(std::chrono::milliseconds timeout=500ms) override
If m_requestPause is true, sets pause and blocks up to timeout milliseconds or until unpaused,...
void SetOptionsFromProfile(RecordingProfile *profile, const QString &videodev, const QString &audiodev, const QString &vbidev) override
Sets basic recorder options.
bool StopEncoding(void)
void StartNewFile(void) override
bool IsOpen(void) const
Implements tuning for TV cards using the V4L driver API, both versions 1 and 2.
Definition: v4lchannel.h:32
Abstract base class for Video4Linux based recorders.
Definition: v4lrecorder.h:17