1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
|
/**
\class CVideoDeviceTuner
\brief Tuner on V4L device
This class sets the frequency and norm on the TV or radio tuner on a
TV/radio card. The frequency is represented as a float number in Hz.
There are three basic TV systems on this planet: PAL, NTSC and SECAM.
There are also small variations in these systems, called <i>norms</i>.
There are norms like PAL-B, -D, -G, -H, -I, M, -N, -MC; NTSC has two
versions, `plain' NTSC (as used in the USA) and NTSC-Japan. SECAM seems
to have only one norm. In practice, these norms are all the same when
viewing a broadcast; as far as I know the main differences lie in the
assignment of the hidden line numbers to services like TeleText, Closed
Captioning, etc.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "VideoDeviceInput.h"
#include "VideoDeviceTuner.h"
#include "VideoDevice.h"
/**
\brief Constructor
\param _video Master VideoDevice object
\param _tuner Tuner number (should rarely be > 0)
*/
CVideoDeviceTuner::CVideoDeviceTuner(CVideoDevice *_video, int _tuner)
{
pVideo = _video;
Tuner = _tuner;
FreqLow = 0;
FreqHigh = 0;
FreqStep = 1;
Flags = 0;
}
const QString CVideoDeviceTuner::GetName()
{
return Name;
}
float CVideoDeviceTuner::GetLowestFrequency() const
{
return FreqLow;
}
float CVideoDeviceTuner::GetHighestFrequency() const
{
return FreqHigh;
}
/**
\brief Return frequency of tuner, in Hz
\return -1.0 in case of failure
*/
float CVideoDeviceTuner::GetFrequency() const
{
return -1.0;
}
/**
\brief Set frequency
\param freq Desired frequency, in Hz
\return FALSE if device refused the frequency or was not able to, TRUE with success
*/
bool CVideoDeviceTuner::SetFrequency(float freq)
{
return true;
}
/**
\brief Returns whether this input can have its norm set.
*/
bool CVideoDeviceTuner::HasNorm() const
{
return false;
}
void CVideoDeviceTuner::SetNorm(int norm)
{
if (norm < MAX)
Norm = norm;
}
int CVideoDeviceTuner::GetNorm() const
{
return Norm;
}
|