|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface VBIFilter
This class represents a VBI filter. VBIFilter instances are created by a VBIFilterGroup based on the OCAP resource management. Line numbers and a data format to be filtered are specified when the filter is created.
The startFiltering() method starts filtering of the specified data format in the specified VBI line and stores data units in an internal buffer. When the first single data unit is filtered, a VBIFilterEvent with EVENT_CODE_FIRST_VBI_DATA_AVAILABLE is issued only once. The VBIFilter continues filtering.
VBI filtering stops in the following cases:
setTimeOut(long)
) occurs, a VBIFilterEvent with
EVENT_CODE_TIMEOUT notifies it.
VBI filtering continues in the following cases:
See also the VBIFilterGroup
.
Method Summary | |
---|---|
void |
addVBIFilterListener(VBIFilterListener listener)
Add a new VBIFilterListener instance to this VBI filter. |
void |
clearBuffer()
Clear an internal buffer to store retrieved VBI data. |
byte[] |
getVBIData()
This method returns multiple VBI data unit bytes. |
void |
removeVBIFilterListener(VBIFilterListener listener)
Remove an existing VBIFilterListener instance from this VBI filter. |
void |
setNotificationByDataUnits(int numberOfDataUnits)
Set the number of data units to receive a cyclic notification. |
void |
setNotificationByTime(long milliseconds)
Set a notification time. |
void |
setTimeOut(long milliseconds)
Set a timeout value. |
void |
startFiltering(java.lang.Object appData)
Initiate filtering of VBI data for the specified line and the specified data format by a VBIFilterGroup. |
void |
startFiltering(java.lang.Object appData,
int offset,
byte[] posFilterDef,
byte[] posFilterMask,
byte[] negFilterDef,
byte[] negFilterMask)
Initiate filtering of VBI data for the specified line and the specified data format by a VBIFilterGroup. |
void |
stopFiltering()
Stop current filtering of this VBI filter. |
Method Detail |
---|
void startFiltering(java.lang.Object appData)
VBIFilterGroup.attach(javax.tv.service.selection.ServiceContext, org.davic.resources.ResourceClient, java.lang.Object)
method is called.
appData
- application specific data. This data is notified
to the application with a SectionFilterEvent. Null is
possible.void startFiltering(java.lang.Object appData, int offset, byte[] posFilterDef, byte[] posFilterMask, byte[] negFilterDef, byte[] negFilterMask)
VBIFilterGroup.attach(javax.tv.service.selection.ServiceContext, org.davic.resources.ResourceClient, java.lang.Object)
method is called.
appData
- application specific data. This data is notified
to the application with a SectionFilterEvent. Null is
possible.offset
- defines a number of offset bytes that the specified
matching bits and masking bits are applied. Value 0
means no offset. Value 1 means that the matching/masking
bit is applied from the second byte.posFilterDef
- defines values to match for bits in a single data
unit. Only data unit that has matching bytes with this
posFilterDef are retrieved.
Maximum length is 36 bytes.posFilterMask
- defines which bits in the data unit are to be
compared against the posFilterDef bytes.
Matching calculation of negFilterDef and negFilterMask
obeys E.8.1 of DAVIC 1.4.1 Part 9.
Maximum length is 36 bytes.negFilterDef
- defines values to match for bits in a single data
unit. Only data unit that has matching bytes with this
negFilterDef are retrieved.
Maximum length is 36 bytes.negFilterMask
- defines which bits in the data unit are to be
compared against the negFilterDef bytes.
Matching calculation of negFilterDef and negFilterMask
obeys E.8.1 of DAVIC 1.4.1 Part 9.
Maximum length is 36 bytes.void stopFiltering()
void setTimeOut(long milliseconds)
milliseconds
- a timeout value in milli seconds. A default
value is -1 that indicates infinite.void setNotificationByTime(long milliseconds)
milliseconds
- a time-period value in milli seconds. A default
value is -1 that indicates infinite.void setNotificationByDataUnits(int numberOfDataUnits)
numberOfDataUnits
- the number of data units to be notified.
A default value is 0 that indicates no notification.
Note that if a small number of data units is specified,
the notification may be delayed and affect the host
performance. For example, if 1 is specified for UNKNOWN
data unit that comes every field (i.e., 1/60 seconds),
the host has to notify every 1/60 seconds and makes an
over load.
java.lang.IllegalArgumentException
- if the numberOfDataUnit is larger
than the bufferSize specified by a
VBIFilterGroup.newVBIFilter(int[], int, int, int, int)
method.void addVBIFilterListener(VBIFilterListener listener)
listener
- a VBIFilterListener instance to be notified
a VBI filtering events.void removeVBIFilterListener(VBIFilterListener listener)
byte[] getVBIData()
VBIFilter
interface.
The returned bytes is a simple concatenated VBI data at the moment.
Note that the return value is not aligned by a complete VBI data unit,
i.e., an incomplete data unit may return.
When this method is called, the internal buffer is cleared once, i.e.,
the next call returns the next byte of retrieved VBI data.
VBIFilterGroup.newVBIFilter(int[], int, int, int, int)
method.void clearBuffer()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |