Reference of IVideoPlugin
Description of IVideoPlugin
Removed at server 9.1.x
IPTTPlugin
ICallback
In plug-in, a developer can use internal API of Video server.
getDBConnection
Connection getDBConnection() |
Return | java.sql.Connection |
Description | Get DB connection from DB connection pool in server. |
Common library version | 1.0.x |
writeLog
void writeLog(String message) |
message | log message |
Description | Write log in {ProPTT server dir}/logs/service/PTT.service.log |
Common library version | 1.0.x |
writeErrorLog
void writeErrorLog(String message) |
message | log message |
Description | Write error log in {ProPTT server dir}/logs/service/PTT.service.log |
Common library version | 1.0.x |
OnInitialized
void OnInitialized() |
Description | Notify initialized to PTT server. |
Common library version | 1.0.x |
IVideoPlugin
getInterfaceVersion
int getInterfaceVersion() |
Return | most be retured INTERFACE_VERSION |
Description | Notify plug-in's INTERFACE version |
Common library version | 1.0.x |
getType
int getType() |
Return | most be retured TYPE_GENERAL_PLUGIN |
Description | Notify plug-in's type |
Common library version | 1.0.x |
initialize
boolean initialize(String arg) |
Return | result of initialize |
Description | initialize plug-in |
Common library version | 1.0.x |
OnCreated
void OnCreated(String userId, int videoChannelId, String jsonParams) |
userId | connected user's id |
videoChannelId | created video channel id |
jsonParams | extended parameters |
Description | User connected and create a video channel event |
Common library version | 1.0.x |
OnOpened
void OnOpened(String userId, int videoChannelId, String jsonParams) |
userId | connected user's id |
videoChannelId | opened video channel id |
jsonParams | extended parameters |
Description | User connected and open a video channel event |
Common library version | 1.0.x |
OnVideo
void OnVideo(int videoChannelId, byte[] subframe) |
videoChannelId | opened video channel id |
subframe | video frame. see subframe format |
Description | video packet event |
Common library version | 1.0.x |
OnAudio
void OnAudio(int videoChannelId, byte[] subframe) |
videoChannelId | opened video channel id |
subframe | audio frame. see subframe format |
Description | audio packet event |
Common library version | 1.0.x |
< subframe format >
field | type | bytes | Description |
MediaTrackID | unsigned short | 2 | Media Track |
FarmID | short | 2 | Farm’s ID |
ChannelID | int | 4 | Channel’s ID |
Timestamp | unsigned int | 4 | Timestamp |
FrameType | byte | 1 | 0: Media, 1: CodecInfo |
FrameInfo | byte | 1 | Audio(Frame Count) Video(0x1X:R-0, 0x2X:R-90, 0x3X: R-180, 0x4X:R-270 | 0xX0: Mid, 0xX1:End) |
PadCount | byte | 1 | Padding size |
Reserved | byte | 1 | Reserved |
FrameData | byte[] | | Frame's data |
OnClosed
public void OnClosed(String userId, int videoChannelId); |
userId | user's id |
videoChannelId | closed video channel id |
Description | Close video channel event |
Common library version | 1.0.x |
OnError
void OnError(int errCode, String jsonParams) |
errCode | error code. not defined |
jsonParams | extended parameters |
Description | fired error |
Common library version | 1.0.x |
OnExtenedEvent
void OnExtenedEvent(String cmdName, String jsonParams) |
cmdName | commend name. not defined |
jsonParams | extended parameters |
Description | Fired an extended event |
Common library version | 1.0.x |