MythTV  master
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Private Attributes | List of all members
V4L2util Class Reference

#include <v4l2util.h>

Collaboration diagram for V4L2util:
Collaboration graph
[legend]

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 (const 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}
 

Detailed Description

Definition at line 16 of file v4l2util.h.

Constructor & Destructor Documentation

◆ V4L2util() [1/3]

V4L2util::V4L2util ( void  )
default

◆ V4L2util() [2/3]

V4L2util::V4L2util ( const QString &  dev_name)
explicit

Definition at line 16 of file v4l2util.cpp.

◆ V4L2util() [3/3]

V4L2util::V4L2util ( const QString &  dev_name,
const QString &  vbi_dev_name 
)

Definition at line 21 of file v4l2util.cpp.

◆ ~V4L2util()

V4L2util::~V4L2util ( void  )

Definition at line 27 of file v4l2util.cpp.

Member Function Documentation

◆ Open()

bool V4L2util::Open ( const QString &  dev_name,
const QString &  vbi_dev_name = "" 
)

◆ Close()

void V4L2util::Close ( void  )

◆ FD()

int V4L2util::FD ( void  ) const
inline

Definition at line 26 of file v4l2util.h.

Referenced by MythV4L2M2MContext::GetProfiles().

◆ operator!()

bool V4L2util::operator! ( void  ) const
inline

Definition at line 28 of file v4l2util.h.

◆ IsOpen()

bool V4L2util::IsOpen ( void  ) const
inline

◆ GetOptions()

bool V4L2util::GetOptions ( DriverOption::Options options)

◆ GetOptionValue()

int V4L2util::GetOptionValue ( DriverOption::category_t  cat,
const QString &  desc 
)

Definition at line 568 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::SetOption().

◆ GetFormats()

bool V4L2util::GetFormats ( QStringList &  formats)

Definition at line 513 of file v4l2util.cpp.

◆ GetVideoStandard()

bool V4L2util::GetVideoStandard ( QString &  name) const

Definition at line 597 of file v4l2util.cpp.

◆ GetSignalStrength()

int V4L2util::GetSignalStrength ( void  ) const

◆ GetResolution()

bool V4L2util::GetResolution ( int &  width,
int &  height 
) const

◆ GetCapabilities()

uint32_t V4L2util::GetCapabilities ( void  ) const

Definition at line 677 of file v4l2util.cpp.

Referenced by MythV4L2M2MContext::GetProfiles().

◆ GetDeviceName()

QString V4L2util::GetDeviceName ( void  ) const

Definition at line 682 of file v4l2util.cpp.

Referenced by MythV4L2M2MContext::GetProfiles().

◆ GetDriverName()

QString V4L2util::GetDriverName ( void  ) const

Definition at line 687 of file v4l2util.cpp.

Referenced by MythV4L2M2MContext::GetProfiles().

◆ HasTuner()

bool V4L2util::HasTuner ( void  ) const

◆ HasAudioSupport()

bool V4L2util::HasAudioSupport ( void  ) const

◆ HasStreaming()

bool V4L2util::HasStreaming ( void  ) const

Definition at line 91 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::StartEncoding().

◆ HasSlicedVBI()

bool V4L2util::HasSlicedVBI ( void  ) const

Definition at line 115 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::HasSlicedVBI(), and V4L2encGroup::probeCard().

◆ IsEncoder()

bool V4L2util::IsEncoder ( void  ) const

Definition at line 702 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Open().

◆ UserAdjustableResolution()

bool V4L2util::UserAdjustableResolution ( void  ) const

◆ DriverName()

QString V4L2util::DriverName ( void  ) const
inline

◆ CardName()

QString V4L2util::CardName ( void  ) const
inline

Definition at line 49 of file v4l2util.h.

Referenced by CardUtil::GetInputTypes(), and V4L2encGroup::probeCard().

◆ ProfileName()

QString V4L2util::ProfileName ( void  ) const
inline

Definition at line 50 of file v4l2util.h.

Referenced by RecordingProfile::loadByType().

◆ GetStreamType()

int V4L2util::GetStreamType ( void  ) const

◆ SetStreamType()

bool V4L2util::SetStreamType ( int  value)

Definition at line 821 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetVideoAspect()

bool V4L2util::SetVideoAspect ( int  value)

Definition at line 835 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetVideoBitrateMode()

bool V4L2util::SetVideoBitrateMode ( int  value)

◆ SetVideoBitrate()

bool V4L2util::SetVideoBitrate ( int  value)

◆ SetVideoBitratePeak()

bool V4L2util::SetVideoBitratePeak ( int  value)

◆ SetResolution()

bool V4L2util::SetResolution ( uint32_t  width,
uint32_t  height 
)

Definition at line 891 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetAudioInput()

bool V4L2util::SetAudioInput ( int  value)

Definition at line 927 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetAudioCodec()

bool V4L2util::SetAudioCodec ( int  value)

Definition at line 952 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetVolume()

bool V4L2util::SetVolume ( int  volume)

Definition at line 996 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetLanguageMode()

bool V4L2util::SetLanguageMode ( int  mode)

Definition at line 1031 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::SetLanguageMode().

◆ SetAudioSamplingRate()

bool V4L2util::SetAudioSamplingRate ( int  value)

Definition at line 1084 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ SetAudioBitrateL2()

bool V4L2util::SetAudioBitrateL2 ( int  value)

Definition at line 1121 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure().

◆ StartEncoding()

bool V4L2util::StartEncoding ( void  )

Definition at line 1196 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::StartEncoding().

◆ StopEncoding()

bool V4L2util::StopEncoding ( void  )

Definition at line 1201 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::StopEncoding().

◆ PauseEncoding()

bool V4L2util::PauseEncoding ( void  )

Definition at line 1206 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::StopEncoding().

◆ ResumeEncoding()

bool V4L2util::ResumeEncoding ( void  )

Definition at line 1211 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::StartEncoding().

◆ StreamTypeDesc()

QString V4L2util::StreamTypeDesc ( int  value)
static

Definition at line 782 of file v4l2util.cpp.

Referenced by V4L2encStreamHandler::Configure(), GetStreamType(), and SetStreamType().

◆ OpenVBI()

bool V4L2util::OpenVBI ( const QString &  vbi_dev_name)
staticprotected

Definition at line 1216 of file v4l2util.cpp.

Referenced by Open().

◆ SetSlicedVBI()

bool V4L2util::SetSlicedVBI ( const VBIMode::vbimode_t vbimode)
protected

Definition at line 1221 of file v4l2util.cpp.

◆ GetExtControl()

int V4L2util::GetExtControl ( int  request,
const QString &  ctrl_desc = "" 
) const
protected

Definition at line 719 of file v4l2util.cpp.

Referenced by GetStreamType(), and SetExtControl().

◆ SetExtControl()

bool V4L2util::SetExtControl ( int  request,
int  value,
const QString &  ctrl_desc,
const QString &  value_desc 
)
protected

◆ SetEncoderState()

bool V4L2util::SetEncoderState ( int  mode,
const QString &  desc 
)
protected

Definition at line 1177 of file v4l2util.cpp.

Referenced by PauseEncoding(), ResumeEncoding(), StartEncoding(), and StopEncoding().

◆ SetDefaultOptions()

void V4L2util::SetDefaultOptions ( DriverOption::Options options)
protected

Definition at line 431 of file v4l2util.cpp.

Referenced by GetOptions().

◆ bitmask_toString()

void V4L2util::bitmask_toString ( QString &  result,
uint32_t  flags,
uint32_t  mask,
const QString &  desc 
)
staticprotected

Definition at line 120 of file v4l2util.cpp.

Referenced by ctrlflags_toString().

◆ ctrlflags_toString()

QString V4L2util::ctrlflags_toString ( uint32_t  flags)
staticprotected

Definition at line 131 of file v4l2util.cpp.

Referenced by log_qctrl().

◆ queryctrl_toString()

QString V4L2util::queryctrl_toString ( int  type)
staticprotected

Definition at line 159 of file v4l2util.cpp.

Referenced by log_qctrl().

◆ log_qctrl()

void V4L2util::log_qctrl ( struct v4l2_queryctrl &  queryctrl,
DriverOption drv_opt,
QString &  msg 
)
protected

Definition at line 190 of file v4l2util.cpp.

Referenced by log_control().

◆ log_control()

bool V4L2util::log_control ( struct v4l2_queryctrl &  qctrl,
DriverOption drv_opt,
QString &  msg 
)
protected

Definition at line 357 of file v4l2util.cpp.

Referenced by GetOptions().

◆ log_controls()

void V4L2util::log_controls ( bool  show_menus)
protected

Member Data Documentation

◆ m_fd

int V4L2util::m_fd {-1}
private

◆ m_vbiFd

int V4L2util::m_vbiFd {-1}
private

Definition at line 100 of file v4l2util.h.

Referenced by SetSlicedVBI().

◆ m_options

DriverOption::Options V4L2util::m_options
private

Definition at line 101 of file v4l2util.h.

Referenced by Close(), GetOptions(), and GetOptionValue().

◆ m_deviceName

QString V4L2util::m_deviceName
private

Definition at line 102 of file v4l2util.h.

Referenced by GetDeviceName(), and Open().

◆ m_driverName

QString V4L2util::m_driverName
private

Definition at line 103 of file v4l2util.h.

Referenced by GetDriverName(), Open(), and UserAdjustableResolution().

◆ m_cardName

QString V4L2util::m_cardName
private

Definition at line 104 of file v4l2util.h.

Referenced by Open().

◆ m_version

int V4L2util::m_version {0}
private

Definition at line 105 of file v4l2util.h.

Referenced by Open().

◆ m_capabilities

uint32_t V4L2util::m_capabilities {0}
private

Definition at line 106 of file v4l2util.h.

Referenced by GetCapabilities(), HasAudioSupport(), HasSlicedVBI(), HasStreaming(), HasTuner(), and Open().

◆ m_haveQueryExtCtrl

bool V4L2util::m_haveQueryExtCtrl {false}
private

Definition at line 107 of file v4l2util.h.

Referenced by Open().


The documentation for this class was generated from the following files: