|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClosedCaptioningControl
This interface is used to turn closed-captioning in a running JMF player
on and off and to select a captioning service (C1 to C4 and T1 to T4) to
be represented. Instance of the ClosedCaptioningControl interface shall
be obtained via a Controller.getControl(java.lang.String)
and a
Controller.getControls()
method by all applications. But
MonitorAppPermission(“handler.closedCaptioning”) is necessary to call
methods in this interface.
The captioning text is represented according to preferred attribute values
set by a ClosedCaptioningAttribute
class.
Field Summary | |
---|---|
static int |
CC_ANALOG_SERVICE_CC1
Indicates an analog closed-captioning service CC1. |
static int |
CC_ANALOG_SERVICE_CC2
Indicates an analog closed-captioning service CC2. |
static int |
CC_ANALOG_SERVICE_CC3
Indicates an analog closed-captioning service CC3. |
static int |
CC_ANALOG_SERVICE_CC4
Indicates an analog closed-captioning service CC4. |
static int |
CC_ANALOG_SERVICE_T1
Indicates an analog closed-captioning service T1. |
static int |
CC_ANALOG_SERVICE_T2
Indicates an analog closed-captioning service T2. |
static int |
CC_ANALOG_SERVICE_T3
Indicates an analog closed-captioning service T3. |
static int |
CC_ANALOG_SERVICE_T4
Indicates an analog closed-captioning service T4. |
static int |
CC_NO_SERVICE
Indicates no closed-captioning service. |
static int |
CC_TURN_OFF
Indicates turn digital/analog closed-captioning on. |
static int |
CC_TURN_ON
Indicates turn digital/analog closed-captioning off. |
static int |
CC_TURN_ON_MUTE
Indicates turn digital/analog closed-captioning on only when muting an audio. |
Method Summary | |
---|---|
void |
addClosedCaptioningListener(ClosedCaptioningListener ccListener)
Add a listener to notify a closed-captioning state change. |
int[] |
getClosedCaptioningServiceNumber()
This method returns a current closed-captioning service for a JMF Player that is controlled by a ClosedCaptioningControl instance. |
int |
getClosedCaptioningState()
Get the current state of closed-captioning of a JMF Player that is controlled by a ClosedCaptioningControl instance. |
int[] |
getSupportedClosedCaptioningServiceNumber()
This method returns closed-captioning service numbers that are supported by a JMF Player that is controlled by a ClosedCaptioningControl instance. |
void |
removeClosedCaptioningListener(ClosedCaptioningListener ccListener)
Remove the given ClosedCaptioningListener. |
void |
setClosedCaptioningServiceNumber(int analogServiceNumber,
int digitalServiceNumber)
This method sets a new closed-captioning service number to be represented by a JMF Player that is controlled by a ClosedCaptioningControl instance. |
void |
setClosedCaptioningState(int turnOn)
Turn closed-captioning of a JMF Player that is controlled by a ClosedCaptioningControl instance on or off. |
Methods inherited from interface javax.media.Control |
---|
getControlComponent |
Field Detail |
---|
static final int CC_ANALOG_SERVICE_CC1
static final int CC_ANALOG_SERVICE_CC2
static final int CC_ANALOG_SERVICE_CC3
static final int CC_ANALOG_SERVICE_CC4
static final int CC_ANALOG_SERVICE_T1
static final int CC_ANALOG_SERVICE_T2
static final int CC_ANALOG_SERVICE_T3
static final int CC_ANALOG_SERVICE_T4
static final int CC_NO_SERVICE
static final int CC_TURN_OFF
static final int CC_TURN_ON
static final int CC_TURN_ON_MUTE
Method Detail |
---|
void setClosedCaptioningState(int turnOn)
ClosedCaptioningEvent
event.
turnOn
- An integer value specifying whether to turn
closed-captioning on, off or "on mute".
CC_TURN_ON, to turn closed-captioning represented by a
Player
instance that is controlled
by the ClosedCaptioningControl instance on.
CC_TURN_OFF, to turn it off.
CC_TURN_ON_MUTE, to turn it on only when muting an audio.
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").int getClosedCaptioningState()
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").void setClosedCaptioningServiceNumber(int analogServiceNumber, int digitalServiceNumber)
This method sets a new closed-captioning service number to be represented by a JMF Player that is controlled by a ClosedCaptioningControl instance.
Captioning text will be rendered when captioning is turned on and corresponding captioning text data is transmitted. When an analog video is played on the JMF player, captioning service of an analogServiceNumber in VBI signal defined by EIA-608-B analog closed captioning will be rendered. When a digital video is played on the JMF player, captioning service of a digitalServiceNumber in MPEG picture header defined by EIA-708-B digital closed captioning will be rendered. If MPEG picture header doesn’t contain a captioning service of the digitalServiceNumber, a captioning service of analogServiceNumber in the MPEG picture header may be used instead.
The previously represented caption service shall be disappeared, when a new service is set. This method doesn't check if the specified closed-captioning service is transmitted with the current video actually.
analogServiceNumber
- An integer representing an analog
closed-captioning service number.
The serviceNumber value shall be a return value of
the getSupportedClosedCaptioningServiceNumber()
method and shall be an analog captioning service,
i.e., have a CC_ANALOG_SERVICE prefix.
A value of CC_NO_SERVICE if no decoding of analog captioning is necessary.digitalServiceNumber
- An integer representing a digital
closed-captioning service number.
The serviceNumber value shall be a return value of
the getSupportedClosedCaptioningServiceNumber()
method and shall be an digital captioning service.
A value of CC_NO_SERVICE if no decoding of digital captioning is necessary.
java.lang.IllegalArgumentException
- if the serviceNumber is not a return
value of the getSupportedClosedCaptioningServiceNumber()
method.
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").int[] getClosedCaptioningServiceNumber()
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").int[] getSupportedClosedCaptioningServiceNumber()
setClosedCaptioningServiceNumber(int, int)
method.
Note that this method doesn't check if the returned closed-captioning
service is transmitted with the current video actually, i.e., this
method returns just a capability of the host device.
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").void addClosedCaptioningListener(ClosedCaptioningListener ccListener)
ccListener
- a ClosedCaptioningListener
instance to notify
a change of the closed-captioning state.
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").void removeClosedCaptioningListener(ClosedCaptioningListener ccListener)
ccListener
- a ClosedCaptioningListener
instance to be
removed.
java.lang.SecurityException
- if the caller doesn't have
MonitorAppPermission("handler.closedCaptioning").
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |