MythTV
master
|
#include <v4l2util.h>
Public Member Functions | |
V4L2util (void)=default | |
V4L2util (const QString &dev_name) | |
V4L2util (const QString &dev_name, const QString &vbi_dev_name) | |
~V4L2util (void) | |
bool | Open (const QString &dev_name, const QString &vbi_dev_name="") |
void | Close (void) |
int | FD (void) const |
bool | operator! (void) const |
bool | IsOpen (void) const |
bool | GetOptions (DriverOption::Options &options) |
int | GetOptionValue (DriverOption::category_t cat, const QString &desc) |
bool | GetFormats (QStringList &formats) |
bool | GetVideoStandard (QString &name) const |
int | GetSignalStrength (void) const |
bool | GetResolution (int &width, int &height) const |
uint32_t | GetCapabilities (void) const |
QString | GetDeviceName (void) const |
QString | GetDriverName (void) const |
bool | HasTuner (void) const |
bool | HasAudioSupport (void) const |
bool | HasStreaming (void) const |
bool | HasSlicedVBI (void) const |
bool | IsEncoder (void) const |
bool | UserAdjustableResolution (void) const |
QString | DriverName (void) const |
QString | CardName (void) const |
QString | ProfileName (void) const |
int | GetStreamType (void) const |
bool | SetStreamType (int value) |
bool | SetVideoAspect (int value) |
bool | SetVideoBitrateMode (int value) |
bool | SetVideoBitrate (int value) |
bool | SetVideoBitratePeak (int value) |
bool | SetResolution (uint32_t width, uint32_t height) |
bool | SetAudioInput (int value) |
bool | SetAudioCodec (int value) |
bool | SetVolume (int volume) |
bool | SetLanguageMode (int mode) |
bool | SetAudioSamplingRate (int value) |
bool | SetAudioBitrateL2 (int value) |
bool | StartEncoding (void) |
bool | StopEncoding (void) |
bool | PauseEncoding (void) |
bool | ResumeEncoding (void) |
Static Public Member Functions | |
static QString | StreamTypeDesc (int value) |
Protected Member Functions | |
bool | SetSlicedVBI (VBIMode::vbimode_t vbimode) |
int | GetExtControl (int request, const QString &ctrl_desc="") const |
bool | SetExtControl (int request, int value, const QString &ctrl_desc, const QString &value_desc) |
bool | SetEncoderState (int mode, const QString &desc) |
void | SetDefaultOptions (DriverOption::Options &options) |
void | log_qctrl (struct v4l2_queryctrl &queryctrl, DriverOption &drv_opt, QString &msg) |
bool | log_control (struct v4l2_queryctrl &qctrl, DriverOption &drv_opt, QString &msg) |
void | log_controls (bool show_menus) |
Static Protected Member Functions | |
static bool | OpenVBI (const QString &vbi_dev_name) |
static void | bitmask_toString (QString &result, uint32_t flags, uint32_t mask, const QString &desc) |
static QString | ctrlflags_toString (uint32_t flags) |
static QString | queryctrl_toString (int type) |
Private Attributes | |
int | m_fd {-1} |
int | m_vbiFd {-1} |
DriverOption::Options | m_options |
QString | m_deviceName |
QString | m_driverName |
QString | m_cardName |
int | m_version {0} |
uint32_t | m_capabilities {0} |
bool | m_haveQueryExtCtrl {false} |
Definition at line 16 of file v4l2util.h.
|
default |
|
explicit |
Definition at line 17 of file v4l2util.cpp.
V4L2util::V4L2util | ( | const QString & | dev_name, |
const QString & | vbi_dev_name | ||
) |
Definition at line 22 of file v4l2util.cpp.
V4L2util::~V4L2util | ( | void | ) |
Definition at line 28 of file v4l2util.cpp.
bool V4L2util::Open | ( | const QString & | dev_name, |
const QString & | vbi_dev_name = "" |
||
) |
Definition at line 33 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Open(), V4L2encStreamHandler::SetBitrateForResolution(), V4L2encSignalMonitor::V4L2encSignalMonitor(), and V4L2util().
void V4L2util::Close | ( | void | ) |
Definition at line 82 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Close(), V4L2encStreamHandler::Configure(), Open(), V4L2encStreamHandler::Open(), V4L2encStreamHandler::SetBitrateForResolution(), and ~V4L2util().
|
inline |
Definition at line 26 of file v4l2util.h.
Referenced by MythV4L2M2MContext::GetProfiles().
|
inline |
Definition at line 28 of file v4l2util.h.
|
inline |
Definition at line 29 of file v4l2util.h.
Referenced by RecordingProfile::CompleteLoad(), CardUtil::GetInputTypes(), V4L2encSignalMonitor::HasLock(), V4L2encStreamHandler::IsOpen(), RecordingProfile::loadByType(), V4L2encStreamHandler::Open(), V4L2encGroup::probeCard(), and V4L2encSignalMonitor::V4L2encSignalMonitor().
bool V4L2util::GetOptions | ( | DriverOption::Options & | options | ) |
Definition at line 536 of file v4l2util.cpp.
Referenced by AudioCompressionSettings::AudioCompressionSettings(), GetOptionValue(), and VideoCompressionSettings::VideoCompressionSettings().
int V4L2util::GetOptionValue | ( | DriverOption::category_t | cat, |
const QString & | desc | ||
) |
Definition at line 564 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::SetOption().
bool V4L2util::GetFormats | ( | QStringList & | formats | ) |
Definition at line 509 of file v4l2util.cpp.
bool V4L2util::GetVideoStandard | ( | QString & | name | ) | const |
Definition at line 593 of file v4l2util.cpp.
int V4L2util::GetSignalStrength | ( | void | ) | const |
Definition at line 632 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::GetSignalStrength(), and V4L2encSignalMonitor::HasLock().
bool V4L2util::GetResolution | ( | int & | width, |
int & | height | ||
) | const |
Definition at line 653 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::GetResolution(), V4L2encStreamHandler::SetBitrateForResolution(), and V4L2encSignalMonitor::StableResolution().
uint32_t V4L2util::GetCapabilities | ( | void | ) | const |
Definition at line 673 of file v4l2util.cpp.
Referenced by MythV4L2M2MContext::GetProfiles().
QString V4L2util::GetDeviceName | ( | void | ) | const |
Definition at line 678 of file v4l2util.cpp.
Referenced by MythV4L2M2MContext::GetProfiles().
QString V4L2util::GetDriverName | ( | void | ) | const |
Definition at line 683 of file v4l2util.cpp.
Referenced by MythV4L2M2MContext::GetProfiles().
bool V4L2util::HasTuner | ( | void | ) | const |
Definition at line 688 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), V4L2encStreamHandler::HasTuner(), and CardUtil::HasTuner().
bool V4L2util::HasAudioSupport | ( | void | ) | const |
Definition at line 693 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), and V4L2encStreamHandler::HasAudio().
bool V4L2util::HasStreaming | ( | void | ) | const |
Definition at line 93 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::StartEncoding().
bool V4L2util::HasSlicedVBI | ( | void | ) | const |
Definition at line 117 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::HasSlicedVBI(), and V4L2encGroup::probeCard().
bool V4L2util::IsEncoder | ( | void | ) | const |
Definition at line 698 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Open().
bool V4L2util::UserAdjustableResolution | ( | void | ) | const |
Definition at line 707 of file v4l2util.cpp.
Referenced by RecordingProfile::CompleteLoad(), V4L2encStreamHandler::StartEncoding(), and VideoCompressionSettings::VideoCompressionSettings().
|
inline |
Definition at line 48 of file v4l2util.h.
Referenced by RecordingProfile::CompleteLoad(), V4L2encStreamHandler::Driver(), CardUtil::GetInputTypes(), GetStreamType(), V4L2encGroup::probeCard(), SetAudioCodec(), SetAudioSamplingRate(), and SetStreamType().
|
inline |
Definition at line 49 of file v4l2util.h.
Referenced by CardUtil::GetInputTypes(), and V4L2encGroup::probeCard().
|
inline |
Definition at line 50 of file v4l2util.h.
Referenced by RecordingProfile::loadByType().
int V4L2util::GetStreamType | ( | void | ) | const |
Definition at line 798 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::GetStreamType(), and V4L2encSignalMonitor::V4L2encSignalMonitor().
bool V4L2util::SetStreamType | ( | int | value | ) |
Definition at line 817 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetVideoAspect | ( | int | value | ) |
Definition at line 831 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetVideoBitrateMode | ( | int | value | ) |
Definition at line 856 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), and V4L2encStreamHandler::SetBitrate().
bool V4L2util::SetVideoBitrate | ( | int | value | ) |
Definition at line 873 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), and V4L2encStreamHandler::SetBitrate().
bool V4L2util::SetVideoBitratePeak | ( | int | value | ) |
Definition at line 880 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), and V4L2encStreamHandler::SetBitrate().
bool V4L2util::SetResolution | ( | uint32_t | width, |
uint32_t | height | ||
) |
Definition at line 887 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetAudioInput | ( | int | value | ) |
Definition at line 923 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetAudioCodec | ( | int | value | ) |
Definition at line 948 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetVolume | ( | int | volume | ) |
Definition at line 992 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetLanguageMode | ( | int | mode | ) |
Definition at line 1027 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::SetLanguageMode().
bool V4L2util::SetAudioSamplingRate | ( | int | value | ) |
Definition at line 1080 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::SetAudioBitrateL2 | ( | int | value | ) |
Definition at line 1117 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure().
bool V4L2util::StartEncoding | ( | void | ) |
Definition at line 1192 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::StartEncoding().
bool V4L2util::StopEncoding | ( | void | ) |
Definition at line 1197 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::StopEncoding().
bool V4L2util::PauseEncoding | ( | void | ) |
Definition at line 1202 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::StopEncoding().
bool V4L2util::ResumeEncoding | ( | void | ) |
Definition at line 1207 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::StartEncoding().
|
static |
Definition at line 778 of file v4l2util.cpp.
Referenced by V4L2encStreamHandler::Configure(), GetStreamType(), and SetStreamType().
|
staticprotected |
Definition at line 1212 of file v4l2util.cpp.
Referenced by Open().
|
protected |
Definition at line 1217 of file v4l2util.cpp.
|
protected |
Definition at line 715 of file v4l2util.cpp.
Referenced by GetStreamType(), and SetExtControl().
|
protected |
Definition at line 738 of file v4l2util.cpp.
Referenced by SetAudioBitrateL2(), SetAudioCodec(), SetAudioSamplingRate(), SetSlicedVBI(), SetStreamType(), SetVideoAspect(), SetVideoBitrate(), SetVideoBitrateMode(), and SetVideoBitratePeak().
|
protected |
Definition at line 1173 of file v4l2util.cpp.
Referenced by PauseEncoding(), ResumeEncoding(), StartEncoding(), and StopEncoding().
|
protected |
Definition at line 427 of file v4l2util.cpp.
Referenced by GetOptions().
|
staticprotected |
Definition at line 122 of file v4l2util.cpp.
Referenced by ctrlflags_toString().
|
staticprotected |
Definition at line 133 of file v4l2util.cpp.
Referenced by log_qctrl().
|
staticprotected |
Definition at line 161 of file v4l2util.cpp.
Referenced by log_qctrl().
|
protected |
Definition at line 192 of file v4l2util.cpp.
Referenced by log_control().
|
protected |
Definition at line 353 of file v4l2util.cpp.
Referenced by GetOptions().
|
protected |
|
private |
Definition at line 99 of file v4l2util.h.
Referenced by Close(), GetExtControl(), GetFormats(), GetOptions(), GetResolution(), GetSignalStrength(), GetVideoStandard(), HasStreaming(), IsEncoder(), log_control(), log_qctrl(), Open(), SetAudioInput(), SetEncoderState(), SetExtControl(), SetLanguageMode(), SetResolution(), SetSlicedVBI(), and SetVolume().
|
private |
Definition at line 100 of file v4l2util.h.
Referenced by SetSlicedVBI().
|
private |
Definition at line 101 of file v4l2util.h.
Referenced by Close(), GetOptions(), and GetOptionValue().
|
private |
Definition at line 102 of file v4l2util.h.
Referenced by GetDeviceName(), and Open().
|
private |
Definition at line 103 of file v4l2util.h.
Referenced by GetDriverName(), Open(), and UserAdjustableResolution().
|
private |
Definition at line 104 of file v4l2util.h.
Referenced by Open().
|
private |
Definition at line 105 of file v4l2util.h.
Referenced by Open().
|
private |
Definition at line 106 of file v4l2util.h.
Referenced by GetCapabilities(), HasAudioSupport(), HasSlicedVBI(), HasStreaming(), HasTuner(), and Open().
Definition at line 107 of file v4l2util.h.
Referenced by Open().