C# Класс TvLibrary.Implementations.DVB.TvDvbChannel

Base class for all dvb channels
Наследование: BaseSubChannel, ITeletextCallBack, IPMTCallback, ICACallback, ITvSubChannel, IVideoAudioObserver
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_channelInfo TvLibrary.Implementations.DVB.Structures.ChannelInfo
_currentAudioStream TvLibrary.Implementations.DVB.DVBAudioStream
_eventPMT System.Threading.ManualResetEvent
_graphBuilder IFilterGraph2
_mdplugs TvLibrary.Implementations.DVB.MDPlugs
_pmtData byte[]
_pmtLength int
_pmtPid int
_pmtRequested bool
_pmtVersion int
_subChannelIndex int
_tsFilterInterface ITsFilter

Открытые методы

Метод Описание
CancelTune ( ) : void

cancels the tune

GetStreamQualityCounters ( int &totalBytes, int &discontinuityCounter ) : void

Fetches the stream quality information

OnAfterTune ( ) : void

Should be called when the graph is tuned to the new channel resets the state

OnBeforeTune ( ) : void

Should be called before tuning to a new channel resets the state

OnCaReceived ( ) : int

Called when tswriter.ax has received a new ca section

OnGraphStart ( ) : void

Should be called when the graph is about to start Resets the state If graph is already running, starts the pmt grabber to grab the pmt for the new channel

OnGraphStarted ( ) : void

Should be called when the graph has been started. Sets up the PMT grabber to grab the PMT of the channel when the graph hasn't been running previously

OnGraphStop ( ) : void

Should be called when graph is about to stop. stops any timeshifting/recording on this channel

OnGraphStopped ( ) : void

should be called when graph has been stopped Resets the graph state

OnPMTReceived ( int pmtPid ) : int

Called when tswriter.ax has received a new pmt

TvDvbChannel ( ) : System

Initializes a new instance of the TvDvbChannel class.

TvDvbChannel ( IFilterGraph2 graphBuilder, TvLibrary.Implementations.DVB.ConditionalAccess ca, TvLibrary.Implementations.DVB.MDPlugs mdplugs, IBaseFilter tif, IBaseFilter tsWriter, int subChannelId, IChannel channel ) : System

Initializes a new instance of the TvDvbChannel class.

Защищенные методы

Метод Описание
GraphRunning ( ) : bool

Checks if the graph is running

OnDecompose ( ) : void

disposes this channel

OnGetTimeShiftFilePosition ( System.Int64 &position, long &bufferId ) : void

Returns the position in the current timeshift file and the id of the current timeshift file

OnGrabTeletext ( ) : void

A derrived class should activate or deactivate the teletext grabbing on the tv card.

OnStartRecording ( string fileName ) : void

Starts recording

OnStartTimeShifting ( string fileName ) : bool

sets the filename used for timeshifting

OnStopRecording ( ) : void

Stop recording

OnStopTimeShifting ( ) : void

Stop recording

SendPmtToCam ( bool &updatePids, int &waitInterval ) : bool

Decodes the PMT and sends the PMT to cam.

SetMpegPidMapping ( ChannelInfo info ) : void

maps the correct pids to the TsFileSink filter and teletext pins

SetRecorderPids ( ) : void

Sets the pids for the recorder

SetTimeShiftPids ( ) : void

Sets the pids for the timeshifter

SetupPmtGrabber ( int pmtPid, int serviceId ) : bool

Instructs the ts analyzer filter to start grabbing the PMT

WaitForPMT ( ) : bool

Wait for PMT to be found in the transport stream.

Приватные методы

Метод Описание
PersistPMTtoDataBase ( int pmtPid ) : void
ThrowExceptionIfTuneCancelled ( ) : void

Описание методов

CancelTune() публичный Метод

cancels the tune
public CancelTune ( ) : void
Результат void

GetStreamQualityCounters() публичный Метод

Fetches the stream quality information
public GetStreamQualityCounters ( int &totalBytes, int &discontinuityCounter ) : void
totalBytes int Amount of packets processed
discontinuityCounter int Number of stream discontinuities
Результат void

GraphRunning() защищенный Метод

Checks if the graph is running
protected GraphRunning ( ) : bool
Результат bool

OnAfterTune() публичный Метод

Should be called when the graph is tuned to the new channel resets the state
public OnAfterTune ( ) : void
Результат void

OnBeforeTune() публичный Метод

Should be called before tuning to a new channel resets the state
public OnBeforeTune ( ) : void
Результат void

OnCaReceived() публичный Метод

Called when tswriter.ax has received a new ca section
public OnCaReceived ( ) : int
Результат int

OnDecompose() защищенный Метод

disposes this channel
protected OnDecompose ( ) : void
Результат void

OnGetTimeShiftFilePosition() защищенный Метод

Returns the position in the current timeshift file and the id of the current timeshift file
protected OnGetTimeShiftFilePosition ( System.Int64 &position, long &bufferId ) : void
position System.Int64 The position in the current timeshift buffer file
bufferId long The id of the current timeshift buffer file
Результат void

OnGrabTeletext() защищенный Метод

A derrived class should activate or deactivate the teletext grabbing on the tv card.
protected OnGrabTeletext ( ) : void
Результат void

OnGraphStart() публичный Метод

Should be called when the graph is about to start Resets the state If graph is already running, starts the pmt grabber to grab the pmt for the new channel
public OnGraphStart ( ) : void
Результат void

OnGraphStarted() публичный Метод

Should be called when the graph has been started. Sets up the PMT grabber to grab the PMT of the channel when the graph hasn't been running previously
public OnGraphStarted ( ) : void
Результат void

OnGraphStop() публичный Метод

Should be called when graph is about to stop. stops any timeshifting/recording on this channel
public OnGraphStop ( ) : void
Результат void

OnGraphStopped() публичный Метод

should be called when graph has been stopped Resets the graph state
public OnGraphStopped ( ) : void
Результат void

OnPMTReceived() публичный Метод

Called when tswriter.ax has received a new pmt
public OnPMTReceived ( int pmtPid ) : int
pmtPid int
Результат int

OnStartRecording() защищенный Метод

Starts recording
protected OnStartRecording ( string fileName ) : void
fileName string filename to which to recording should be saved
Результат void

OnStartTimeShifting() защищенный Метод

sets the filename used for timeshifting
protected OnStartTimeShifting ( string fileName ) : bool
fileName string timeshifting filename
Результат bool

OnStopRecording() защищенный Метод

Stop recording
protected OnStopRecording ( ) : void
Результат void

OnStopTimeShifting() защищенный Метод

Stop recording
protected OnStopTimeShifting ( ) : void
Результат void

SendPmtToCam() защищенный Метод

Decodes the PMT and sends the PMT to cam.
protected SendPmtToCam ( bool &updatePids, int &waitInterval ) : bool
updatePids bool
waitInterval int
Результат bool

SetMpegPidMapping() защищенный Метод

maps the correct pids to the TsFileSink filter and teletext pins
protected SetMpegPidMapping ( ChannelInfo info ) : void
info TvLibrary.Implementations.DVB.Structures.ChannelInfo
Результат void

SetRecorderPids() защищенный Метод

Sets the pids for the recorder
protected SetRecorderPids ( ) : void
Результат void

SetTimeShiftPids() защищенный Метод

Sets the pids for the timeshifter
protected SetTimeShiftPids ( ) : void
Результат void

SetupPmtGrabber() защищенный Метод

Instructs the ts analyzer filter to start grabbing the PMT
protected SetupPmtGrabber ( int pmtPid, int serviceId ) : bool
pmtPid int pid of the PMT
serviceId int The service id.
Результат bool

TvDvbChannel() публичный Метод

Initializes a new instance of the TvDvbChannel class.
public TvDvbChannel ( ) : System
Результат System

TvDvbChannel() публичный Метод

Initializes a new instance of the TvDvbChannel class.
public TvDvbChannel ( IFilterGraph2 graphBuilder, TvLibrary.Implementations.DVB.ConditionalAccess ca, TvLibrary.Implementations.DVB.MDPlugs mdplugs, IBaseFilter tif, IBaseFilter tsWriter, int subChannelId, IChannel channel ) : System
graphBuilder IFilterGraph2 The graph builder.
ca TvLibrary.Implementations.DVB.ConditionalAccess The ca.
mdplugs TvLibrary.Implementations.DVB.MDPlugs The mdplugs class.
tif IBaseFilter The tif filter.
tsWriter IBaseFilter The ts writer filter.
subChannelId int The subchannel id
channel IChannel The corresponding channel
Результат System

WaitForPMT() защищенный Метод

Wait for PMT to be found in the transport stream.
protected WaitForPMT ( ) : bool
Результат bool

Описание свойств

_channelInfo защищенное свойство

Channel Info
protected ChannelInfo,TvLibrary.Implementations.DVB.Structures _channelInfo
Результат TvLibrary.Implementations.DVB.Structures.ChannelInfo

_currentAudioStream защищенное свойство

Current audio stream
protected DVBAudioStream,TvLibrary.Implementations.DVB _currentAudioStream
Результат TvLibrary.Implementations.DVB.DVBAudioStream

_eventPMT защищенное свойство

Event that gets signaled when PMT arrives.
protected ManualResetEvent,System.Threading _eventPMT
Результат System.Threading.ManualResetEvent

_graphBuilder защищенное свойство

The graph builder for the capture card graph.
protected IFilterGraph2 _graphBuilder
Результат IFilterGraph2

_mdplugs защищенное свойство

MD Plugs
protected MDPlugs,TvLibrary.Implementations.DVB _mdplugs
Результат TvLibrary.Implementations.DVB.MDPlugs

_pmtData защищенное свойство

PMT data
protected byte[] _pmtData
Результат byte[]

_pmtLength защищенное свойство

PMT data length
protected int _pmtLength
Результат int

_pmtPid защищенное свойство

PMT Pid
protected int _pmtPid
Результат int

_pmtRequested защищенное свойство

Indicates that PMT was grabbed true : requested false: not requested
protected bool _pmtRequested
Результат bool

_pmtVersion защищенное свойство

PMT version
protected int _pmtVersion
Результат int

_subChannelIndex защищенное свойство

SubChannel index
protected int _subChannelIndex
Результат int

_tsFilterInterface защищенное свойство

Ts filter instance
protected ITsFilter _tsFilterInterface
Результат ITsFilter