new OSH.DataReceiver.VideoH264()
Example
var videoDataSource = new OSH.DataReceiver.VideoH264("H264 video ", {
protocol: "ws",
service: "SOS",
endpointUrl: "sensiasoft.net:8181/sensorhub/sos",
offeringID: "urn:android:device:a0e0eac2fea3f614-sos",
observedProperty: "http://sensorml.com/ont/swe/property/VideoFrame",
startTime: "2016-08-11T20:17:30.402Z",
endTime: "2016-08-11T20:18:05.451Z",
replaySpeed: 1,
syncMasterTime: false,
bufferingTime: 1000
});
Extends
Methods
-
inherited buildUrl(properties){string}
-
Builds the full url.
Name Type Description propertiesobject Name Type Description protocolstring the connector protocol
endpointUrlstring the endpoint url
servicestring the service
offeringIDstring the offeringID
observedPropertystring the observed property
startTimestring the start time (ISO format)
endTimestring the end time (ISO format)
replaySpeednumber the replay factor
responseFormatnumber the response format (e.g video/mp4)
Returns:
Type Description string the full url -
Connect the dataSource then the connector will be opened as well.
-
inherited disconnect()
-
Disconnect the dataSource then the connector will be closed as well.
-
inherited getId(){string}
-
Gets the datasource id.
Returns:
Type Description string the datasource id -
inherited getName(){*}
-
Gets the datasource name.
Returns:
Type Description * -
inherited initDataSource(properties)
-
Inits the datasource with the constructor properties.
Name Type Description properties -
inherited onData(data)
-
Name Type Description dataObject the data object
Example
data is represented as
data = {
timeStamp: timeStamp // number
data: data // data to render
}; -
parseData($super, data){Uint8Array}
-
Extract data from the message. The H264 NAL unit starts at offset 12 after 8-bytes time stamp and 4-bytes frame length.
Name Type Description $superfunction the parseData super method
dataArrayBuffer the data to parse
Returns:
Type Description Uint8Array the parsed data -
parseTimeStamp($super, data){number}
-
Extracts timestamp from the message. The timestamp is corresponding to the first 64bits of the binary message.
Name Type Description $superfunction the parseTimeStamp super method
dataArrayBuffer the data to parse
Returns:
Type Description number the extracted timestamp
Type Definitions
-
onMessage
-
The callback which receives data.