This API provides interfaces for managing stereoscopic 3D effects for television signals.
Modern TVs and projectors can display two images, a left image and a right image, which are displayed to the left and right eyes respectively. This technique creates an illusion of depth, which is perceived by users as a 3D image.
For more information about stereoscopy, see this Wikipedia article.
There are several formats of input images supported by the stereoscopy plugin:
Advanced devices are able to computationally generate depth data by processing non-stereoscopic images. Depth data is used to render left and right stereoscopic images from a source image which lacks this information. The quality of such stereoscopic images depends on the computational power used for processing, the algorithms used and the properties of the source data. For more information see this Wikipedia article.
There will be a tizen.tvdisplaycontrol object that allows accessing the functionality of the display control API.
Since: 2.4
Interface | Method |
---|---|
DisplayControlManagerObject | |
DisplayControlManager |
void getSupported3DEffectModeList (Mode3DEffectListSupportCallback successCallback, optional ErrorCallback? errorCallback)
|
Mode3DEffectListSupportCallback | void onsuccess (Display3DEffectMode[] mode3DEffects) |
enum Display3DEffectMode {
"OFF",
"TOP_BOTTOM",
"SIDE_BY_SIDE",
"LINE_BY_LINE",
"VERTICAL_STRIPE",
"FRAME_SEQUENCE",
"CHECKER_BD",
"FROM_2D_TO_3D"
};
Since: 2.4
enum Display3DModeState {
"NOT_CONNECTED",
"NOT_SUPPORTED",
"READY"
};
Since: 2.4
[NoInterfaceObject] interface DisplayControlManagerObject {
readonly attribute DisplayControlManager tvdisplaycontrol;
};
Tizen implements DisplayControlManagerObject;
Since: 2.4
For example, Display Control API provides whether your device supports 3D.
[NoInterfaceObject] interface DisplayControlManager {
Display3DEffectMode get3DEffectMode() raises(WebAPIException);
Display3DModeState is3DModeEnabled() raises(WebAPIException);
void getSupported3DEffectModeList(Mode3DEffectListSupportCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
};
Since: 2.4
get3DEffectMode
Display3DEffectMode get3DEffectMode();
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/tv.display
Return value:
Display3DEffectMode The current mode of 3D effectExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
with error type NotSupportedError, if this feature is not supported.
with error type UnknownError, in any other error case.
Code example:
try {
var current3Dmode = tizen.tvdisplaycontrol.get3DEffectMode()
console.log("The current 3D mode is " + current3Dmode + ".");
} catch (error) {
console.log(error.name);
}
is3DModeEnabled
Display3DModeState is3DModeEnabled();
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/tv.display
Return value:
Display3DModeState The current state to display 3D contentsExceptions:
with error type SecurityError, if the application does not have the privilege to call this method.
with error type NotSupportedError, if this feature is not supported.
with error type UnknownError, in any other error case.
Code example:
try {
if (tizen.tvdisplaycontrol.is3DModeEnabled() === "NOT_SUPPORTED") {
console.log("The current device does not support 3D mode.");
} else if (tizen.tvdisplaycontrol.is3DModeEnabled() === "READY") {
console.log("The current device supports 3D mode and can display 3D contents. Maybe it is a 3D TV device or is connected with 3D display device.");
} else {
console.log("The current device supports 3D mode but cannot display 3D contents. It may be a 3D Blu-ray player device which is not connected with 3D display device.");
}
} catch (error) {
console.log(error.name);
}
getSupported3DEffectModeList
void getSupported3DEffectModeList(Mode3DEffectListSupportCallback successCallback, optional ErrorCallback? errorCallback);
Since: 2.4
Privilege level: public
Privilege: http://tizen.org/privilege/tv.display
Parameters:
Exceptions:
with error type TypeMismatchError, if any input parameter is not compatible with the expected type for that parameter.
with error type SecurityError, if the application does not have the privilege to call this method.
with error type NotSupportedError, if this feature is not supported.
Code example:
function successCB(effects) {
for( var i = 0; i < effects.length; ++i ) {
console.log(effects[i] +" : this mode is supported on a device.");
}
}
function errorCB(error) {
console.log("An error occurs when getSupported3DEffectModeList() is invoked. Error(name: " + error.name +" , message: "+ error.message +")");
}
try {
tizen.tvdisplaycontrol.getSupported3DEffectModeList(successCB, errorCB);
} catch (error) {
console.log(error.name);
}
[Callback=FunctionOnly, NoInterfaceObject] interface Mode3DEffectListSupportCallback {
void onsuccess(Display3DEffectMode[] mode3DEffects);
};
Since: 2.4
onsuccess
void onsuccess(Display3DEffectMode[] mode3DEffects);
Since: 2.4
Parameters:
To guarantee the running of this application on a device with a TV display control support, define the following requirements in the config file:
For more information, see Application Filtering.
module TVDisplayControl {
enum Display3DEffectMode {
"OFF",
"TOP_BOTTOM",
"SIDE_BY_SIDE",
"LINE_BY_LINE",
"VERTICAL_STRIPE",
"FRAME_SEQUENCE",
"CHECKER_BD",
"FROM_2D_TO_3D"
};
enum Display3DModeState {
"NOT_CONNECTED",
"NOT_SUPPORTED",
"READY"
};
[NoInterfaceObject] interface DisplayControlManagerObject {
readonly attribute DisplayControlManager tvdisplaycontrol;
};
Tizen implements DisplayControlManagerObject;
[NoInterfaceObject] interface DisplayControlManager {
Display3DEffectMode get3DEffectMode() raises(WebAPIException);
Display3DModeState is3DModeEnabled() raises(WebAPIException);
void getSupported3DEffectModeList(Mode3DEffectListSupportCallback successCallback,
optional ErrorCallback? errorCallback) raises(WebAPIException);
};
[Callback=FunctionOnly, NoInterfaceObject] interface Mode3DEffectListSupportCallback {
void onsuccess(Display3DEffectMode[] mode3DEffects);
};
};