C# Class TvLibrary.Implementations.DVB.TvDvbChannel

Base class for all dvb channels
Inheritance: BaseSubChannel, ITeletextCallBack, IPMTCallback, ICACallback, ITvSubChannel, IVideoAudioObserver
Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Protected Properties

Свойство Type Description
_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

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
PersistPMTtoDataBase ( int pmtPid ) : void
ThrowExceptionIfTuneCancelled ( ) : void

Method Details

CancelTune() public méthode

cancels the tune
public CancelTune ( ) : void
Résultat void

GetStreamQualityCounters() public méthode

Fetches the stream quality information
public GetStreamQualityCounters ( int &totalBytes, int &discontinuityCounter ) : void
totalBytes int Amount of packets processed
discontinuityCounter int Number of stream discontinuities
Résultat void

GraphRunning() protected méthode

Checks if the graph is running
protected GraphRunning ( ) : bool
Résultat bool

OnAfterTune() public méthode

Should be called when the graph is tuned to the new channel resets the state
public OnAfterTune ( ) : void
Résultat void

OnBeforeTune() public méthode

Should be called before tuning to a new channel resets the state
public OnBeforeTune ( ) : void
Résultat void

OnCaReceived() public méthode

Called when tswriter.ax has received a new ca section
public OnCaReceived ( ) : int
Résultat int

OnDecompose() protected méthode

disposes this channel
protected OnDecompose ( ) : void
Résultat void

OnGetTimeShiftFilePosition() protected méthode

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
Résultat void

OnGrabTeletext() protected méthode

A derrived class should activate or deactivate the teletext grabbing on the tv card.
protected OnGrabTeletext ( ) : void
Résultat void

OnGraphStart() public méthode

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
Résultat void

OnGraphStarted() public méthode

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
Résultat void

OnGraphStop() public méthode

Should be called when graph is about to stop. stops any timeshifting/recording on this channel
public OnGraphStop ( ) : void
Résultat void

OnGraphStopped() public méthode

should be called when graph has been stopped Resets the graph state
public OnGraphStopped ( ) : void
Résultat void

OnPMTReceived() public méthode

Called when tswriter.ax has received a new pmt
public OnPMTReceived ( int pmtPid ) : int
pmtPid int
Résultat int

OnStartRecording() protected méthode

Starts recording
protected OnStartRecording ( string fileName ) : void
fileName string filename to which to recording should be saved
Résultat void

OnStartTimeShifting() protected méthode

sets the filename used for timeshifting
protected OnStartTimeShifting ( string fileName ) : bool
fileName string timeshifting filename
Résultat bool

OnStopRecording() protected méthode

Stop recording
protected OnStopRecording ( ) : void
Résultat void

OnStopTimeShifting() protected méthode

Stop recording
protected OnStopTimeShifting ( ) : void
Résultat void

SendPmtToCam() protected méthode

Decodes the PMT and sends the PMT to cam.
protected SendPmtToCam ( bool &updatePids, int &waitInterval ) : bool
updatePids bool
waitInterval int
Résultat bool

SetMpegPidMapping() protected méthode

maps the correct pids to the TsFileSink filter and teletext pins
protected SetMpegPidMapping ( ChannelInfo info ) : void
info TvLibrary.Implementations.DVB.Structures.ChannelInfo
Résultat void

SetRecorderPids() protected méthode

Sets the pids for the recorder
protected SetRecorderPids ( ) : void
Résultat void

SetTimeShiftPids() protected méthode

Sets the pids for the timeshifter
protected SetTimeShiftPids ( ) : void
Résultat void

SetupPmtGrabber() protected méthode

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.
Résultat bool

TvDvbChannel() public méthode

Initializes a new instance of the TvDvbChannel class.
public TvDvbChannel ( ) : System
Résultat System

TvDvbChannel() public méthode

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
Résultat System

WaitForPMT() protected méthode

Wait for PMT to be found in the transport stream.
protected WaitForPMT ( ) : bool
Résultat bool

Property Details

_channelInfo protected_oe property

Channel Info
protected ChannelInfo,TvLibrary.Implementations.DVB.Structures _channelInfo
Résultat TvLibrary.Implementations.DVB.Structures.ChannelInfo

_currentAudioStream protected_oe property

Current audio stream
protected DVBAudioStream,TvLibrary.Implementations.DVB _currentAudioStream
Résultat TvLibrary.Implementations.DVB.DVBAudioStream

_eventPMT protected_oe property

Event that gets signaled when PMT arrives.
protected ManualResetEvent,System.Threading _eventPMT
Résultat System.Threading.ManualResetEvent

_graphBuilder protected_oe property

The graph builder for the capture card graph.
protected IFilterGraph2 _graphBuilder
Résultat IFilterGraph2

_mdplugs protected_oe property

MD Plugs
protected MDPlugs,TvLibrary.Implementations.DVB _mdplugs
Résultat TvLibrary.Implementations.DVB.MDPlugs

_pmtData protected_oe property

PMT data
protected byte[] _pmtData
Résultat byte[]

_pmtLength protected_oe property

PMT data length
protected int _pmtLength
Résultat int

_pmtPid protected_oe property

PMT Pid
protected int _pmtPid
Résultat int

_pmtRequested protected_oe property

Indicates that PMT was grabbed true : requested false: not requested
protected bool _pmtRequested
Résultat bool

_pmtVersion protected_oe property

PMT version
protected int _pmtVersion
Résultat int

_subChannelIndex protected_oe property

SubChannel index
protected int _subChannelIndex
Résultat int

_tsFilterInterface protected_oe property

Ts filter instance
protected ITsFilter _tsFilterInterface
Résultat ITsFilter