MythTV  master
Macros | Functions | Variables
vbi.c File Reference
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdarg.h>
#include <linux/videodev.h>
#include <linux/videodev2.h>
#include "vt.h"
#include "vbi.h"
#include "hamm.h"
Include dependency graph for vbi.c:

Go to the source code of this file.

Macros

#define FAC   (1<<16)
 
#define BTTV_VBISIZE   _IOR('v' , BASE_VIDIOCPRIVATE+8, int)
 
#define PLL_SAMPLES   4
 
#define PLL_ERROR   4
 

Functions

static void error (const char *str,...)
 
static void out_of_sync (struct vbi *vbi)
 
static void vbi_send (struct vbi *vbi, int type, int i1, int i2, int i3, void *p1)
 
static void vbi_send_page (struct vbi *vbi, struct raw_page *rvtp, int page)
 
static void pll_add (struct vbi *vbi, int n, int err)
 
void vbi_pll_reset (struct vbi *vbi, int fine_tune)
 
static int vt_line (struct vbi *vbi, unsigned char *p)
 
static int vbi_line (struct vbi *vbi, const unsigned char *p)
 
void vbi_handler (struct vbi *vbi, int fd)
 
int vbi_add_handler (struct vbi *vbi, void *handler, void *data)
 
void vbi_del_handler (struct vbi *vbi, void *handler, void *data)
 
static int set_decode_parms (struct vbi *vbi, struct v4l2_vbi_format *p)
 
static int setup_dev (struct vbi *vbi)
 
struct vbivbi_open (const char *vbi_dev_name, struct cache *ca, int fine_tune, int big_buf)
 
void vbi_close (struct vbi *vbi)
 
struct vt_pagevbi_query_page (struct vbi *vbi, int pgno, int subno)
 
void vbi_reset (struct vbi *vbi)
 

Variables

static unsigned char * rawbuf
 
static int rawbuf_size
 

Macro Definition Documentation

◆ FAC

#define FAC   (1<<16)

Definition at line 30 of file vbi.c.

◆ BTTV_VBISIZE

#define BTTV_VBISIZE   _IOR('v' , BASE_VIDIOCPRIVATE+8, int)

Definition at line 38 of file vbi.c.

◆ PLL_SAMPLES

#define PLL_SAMPLES   4

Definition at line 105 of file vbi.c.

◆ PLL_ERROR

#define PLL_ERROR   4

Definition at line 106 of file vbi.c.

Function Documentation

◆ error()

static void error ( const char *  str,
  ... 
)
static

Definition at line 42 of file vbi.c.

Referenced by MythVTBSurfaceInterop::Acquire(), MHIText::AddText(), HistogramAnalyzer::analyzeFrame(), TemplateFinder::analyzeFrame(), TemplateMatcher::analyzeFrame(), AudioConvertInternal::AudioConvertInternal(), avcodec_encode_audio(), nv_python_libs.common.common_api.Common::callCommandLine(), MythContextPrivate::ChooseBackend(), BackendSelection::ConnectBackend(), MythTerminal::Create(), ChannelScannerGUIScanPane::Create(), StandardSettingDialog::Create(), MythCodecContext::CreateDevice(), MHIBitmap::CreateFromMPEG(), MusicPlayer::customEvent(), AudioOutputUtil::DecodeAudio(), AudioOutput::DecodeAudio(), NuppelDecoder::DecodeFrame(), MythContextPrivate::DefaultUPnP(), MythDownloadManager::downloadFinished(), MythDownloadManager::downloadQNetworkRequest(), MHIDLA::DrawLineSub(), AudioOutputDigitalEncoder::Encode(), Search::executeSearch(), TemplateMatcher::finished(), ExternIO::Fork(), hardwareprofile.distros.mythtv_data.uuiddb._UuidDb::get_pub_uuid(), MHIText::GetBounds(), AVFormatWriter::GetCodecTimeBase(), PGMConverter::getImage(), ChannelScannerCLI::HandleEvent(), ChannelScannerGUI::HandleEvent(), GalleryThumbView::Import(), ChannelScannerCLI::InformUser(), ChannelScannerGUI::InformUser(), AudioOutputDXPrivate::InitDirectSound(), LCDProcClient::LCDProcClient(), VideoDisplayProfile::LoadDB(), hardwareprofile.deleteProfile::main(), hardwareprofile.getLink::main(), hardwareprofile.sendProfile::main_request_new_public_uuid(), MHIContext::MHIContext(), MythSocket::MythSocket(), ASIStreamHandler::Open(), MythRAOPConnection::OpenAudioDevice(), AvFormatDecoder::OpenAVCodec(), AvFormatDecoder::OpenFile(), PaneError::PaneError(), pgm_read(), pgm_write(), hardwareprofile.sendProfile::present_and_require_confirmation(), ASIConfigurationGroup::probeCard(), MythUDPListener::Process(), UPNPSubscription::ProcessRequest(), AvFormatDecoder::ProcessVideoPacket(), MythContextPrivate::PromptForDatabaseParams(), RemoteFile::Read(), MetadataDownload::readNFO(), MythControls::ResolveConflict(), IPTVStreamHandler::run(), ScanMonitor::ScanErrored(), hardwareprofile.sendProfile::send_profile(), SendAppleEventToSystemProcess(), ZMServer::sendError(), SendMessage(), set_decode_parms(), OSD::SetRegions(), setup_dev(), setupTVs(), ShowNotification(), NetStream::slotFinished(), WeatherSource::startUpdate(), TV::timerEvent(), BackendSelection::TryDBfromURL(), HDHRStreamHandler::TunerGet(), HDHRStreamHandler::TunerSet(), TVRec::TuningFrequency(), MythContextPrivate::UPnPconnect(), vbi_open(), RemoteFile::Write(), and AVFormatWriter::WriteAudioFrame().

◆ out_of_sync()

static void out_of_sync ( struct vbi vbi)
static

Definition at line 53 of file vbi.c.

Referenced by vbi_handler(), and vbi_open().

◆ vbi_send()

static void vbi_send ( struct vbi vbi,
int  type,
int  i1,
int  i2,
int  i3,
void *  p1 
)
static

Definition at line 66 of file vbi.c.

Referenced by vbi_query_page(), vbi_reset(), vbi_send_page(), and vt_line().

◆ vbi_send_page()

static void vbi_send_page ( struct vbi vbi,
struct raw_page rvtp,
int  page 
)
static

Definition at line 84 of file vbi.c.

Referenced by vt_line().

◆ pll_add()

static void pll_add ( struct vbi vbi,
int  n,
int  err 
)
static

Definition at line 110 of file vbi.c.

Referenced by vbi_line(), and vt_line().

◆ vbi_pll_reset()

void vbi_pll_reset ( struct vbi vbi,
int  fine_tune 
)

Definition at line 146 of file vbi.c.

Referenced by vbi_open().

◆ vt_line()

static int vt_line ( struct vbi vbi,
unsigned char *  p 
)
static

Definition at line 168 of file vbi.c.

Referenced by vbi_line().

◆ vbi_line()

static int vbi_line ( struct vbi vbi,
const unsigned char *  p 
)
static

Definition at line 326 of file vbi.c.

Referenced by vbi_handler().

◆ vbi_handler()

void vbi_handler ( struct vbi vbi,
int  fd 
)

Definition at line 401 of file vbi.c.

Referenced by V4LRecorder::RunVBIDevice().

◆ vbi_add_handler()

int vbi_add_handler ( struct vbi vbi,
void *  handler,
void *  data 
)

Definition at line 444 of file vbi.c.

Referenced by V4LRecorder::OpenVBIDevice().

◆ vbi_del_handler()

void vbi_del_handler ( struct vbi vbi,
void *  handler,
void *  data 
)

Definition at line 462 of file vbi.c.

Referenced by V4LRecorder::CloseVBIDevice().

◆ set_decode_parms()

static int set_decode_parms ( struct vbi vbi,
struct v4l2_vbi_format *  p 
)
static

Definition at line 476 of file vbi.c.

Referenced by setup_dev().

◆ setup_dev()

static int setup_dev ( struct vbi vbi)
static

Definition at line 537 of file vbi.c.

Referenced by vbi_open().

◆ vbi_open()

struct vbi* vbi_open ( const char *  vbi_dev_name,
struct cache *  ca,
int  fine_tune,
int  big_buf 
)

Definition at line 607 of file vbi.c.

Referenced by V4LRecorder::OpenVBIDevice().

◆ vbi_close()

void vbi_close ( struct vbi vbi)

Definition at line 658 of file vbi.c.

Referenced by V4LRecorder::CloseVBIDevice().

◆ vbi_query_page()

struct vt_page* vbi_query_page ( struct vbi vbi,
int  pgno,
int  subno 
)

Definition at line 669 of file vbi.c.

◆ vbi_reset()

void vbi_reset ( struct vbi vbi)

Definition at line 696 of file vbi.c.

Referenced by vbi_handler().

Variable Documentation

◆ rawbuf

unsigned char* rawbuf
static

Definition at line 32 of file vbi.c.

Referenced by setup_dev(), and vbi_handler().

◆ rawbuf_size

int rawbuf_size
static

Definition at line 34 of file vbi.c.

Referenced by setup_dev().