Reference of VideoChannel
Description of VideoChannel
PTTClient PTTChannel Group FileChannel
VideoChannel Class
name | type | attributes | description |
channelID | int | readonly | Channel ID |
channelName | string | readonly | Channel name |
channelDescription | string | readonly | Channel description |
channelType | int | readonly | Channel type (1:Announcer, 2:Player) |
encrypted | boolean | readonly | Is a encrypted channel |
ownerID | string | readonly | Channel Owner ID |
ownerName | string | readonly | Channel Owner Name |
mediaProfileID | int | readonly | Media Profile ID |
videoBitrate | int | readonly | Video announce bitrate (kbps) |
videoFPS | int | readonly | Video announce FPS (count) |
videoKeyFramerate | int | readonly | Video announce key frame interval (sec) |
videoQuality | int | | 0:Highest 1: High 2 : Medium 3 : Low 4 : Custom |
foreground | boolean | | Channel's focus status |
enablePlayVideo | boolean | | Video Play Status |
useSoftwareDecoder | boolean | | use Software Decoder(default no) |
orientation | int | | Video's rotation, 0, 90, 180, 270 |
Events |
- void onVideoChannelError(VideoChannel ChannelInstance, int ErrorCode, string ErrorMesssage)
- void onVideoChannelResult(VideoChannel ChannelInstance, int Seq, int ResultCode, string ResultMesssage)
- void onVideoChannelCreated(VideoChannel ChannelInstance, int ChannelID)
- void onVideoChannelDeleted(VideoChannel ChannelInstance)
- void onVideoChannelJoined(VideoChannel ChannelInstance, string Member, int MemberType, int TotalUserCount)
- void onVideoChannelLeaved(VideoChannel ChannelInstance, string MemberID, int TotalUserCount)
- void onVideoChannelPreviewStarted(VideoChannel ChannelInstance)
- void onVideoChannelPreviewStopped(VideoChannel ChannelInstance)
- void onVideoChannelStreamStarted(VideoChannel ChannelInstance)
- void onVideoChannelStreamStopped(VideoChannel ChannelInstance)
- void onVideoChannelTrackDataCaptured(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp)
- void onVideoChannelTrackDataEncoded(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp, int FrameType)
- void onVideoChannelTrackDataReceived(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp, int FrameType)
- void onVideoChannelTrackDataRendered(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp)
|
Methods
createChannel
int createChannel(string ChannelAttributesJson) |
ChannelAttributesJson | VideoChannelAttributesJson |
Return | Request Sequence ID. If less then 0, ErrorCode. |
Expected Events | onVideoChannelCreated() |
Description | Create a PTT channel |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
< VideoChannelAttributesJson >
field | type | Description | Default | C | R | U | D |
ChannelName | string | URLEncode(Channel name) | | M | M | O | |
Description | string | URLEncode(Description) | | O | O | O | |
IsOwner | boolean | Channel’s owner | | | O | | |
startPreview
int startPreview() |
Return | 0:Call Success, 0<ErrorCode |
Expected Events | onVideoChannelPrivewStarted() |
Description | Start video preview |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
stopPreview
int stopPreview() |
Return | 0:Call Success, 0<ErrorCode |
Expected Events | onVideoChannelPreviewStopped() |
Description | Stop video preview |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
startStream
int startStream() |
Return | 0:Call Success, 0<ErrorCode |
Expected Events | onVideoChannelStreamStarted() |
Description | Start video stream |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
stopStream
int stopStream() |
Return | 0:Call Success, 0<ErrorCode |
Expected Events | onVideoChannelStreamStopped() |
Description | Stop video stream |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
setCamera
int setCamera(string CameraName) |
CameraName | Camera Name to be used |
Return | 0:Success, 0<ErrorCode |
Expected Events | |
Description | Use camera. default rear camera |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
Sample(Android) | private boolean isCameraFront = false;
cameraList = client.getCameraList();
list = cameraList.split(",");
if(list.length == 1) {
videoChannel.setCamera(list[0]);
} else if(list.length > 0) {
if (!isCameraFront) {
videoChannel.setCamera(list[0]);
} else {
videoChannel.setCamera(list[1]);
}
}
|
setCustomVideoQuality
int setCustomVideoQuality(int Width, int Height, int Bitrate, int FPS, int KeyFrameRate)
int setCustomVideoQuality(int Width, int Height, int Bitrate, int FPS, int KeyFrameRate, int KeyColorFormat) |
Width | Video width |
Height | Video height |
Bitrate | Video bitrate(kbps) |
FPS | Video FPS |
KeyFrameRate | Video key frame interval(sec) |
KeyColorFormat | Video keyColorFormat |
Return | 0:Call Success, 0<ErrorCode |
Expected Events | |
Description | set video custom configuration |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
setCameraPreview
int setCameraPreview(View Preview) |
Preview | Camera Preview
ios : UIView*
android : SurfaceView
window : HWND(C++),IntPtr(C#) |
Return | 0:Call Success, 0<ErrorCode |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
Sample(Android) | In Layout,
<SurfaceView
android:id="@+id/surface_preview_share_video"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
In Code,
SurfaceView surfacePreview =
(SurfaceView) findViewById(R.id.surface_preview_share_video);
videoChannel.setCameraPreview(surfacePreview);
videoChannel.startPreview();
|
Sample(C#) | var wih = new WindowInteropHelper(window);
IntPtr hWnd = wih.Handle;
channel.setCameraPreview(hWnd);
channel.startPreview(); |
setPlayView
int setPlayView(View PlayView) |
PlayView | Video PlayView
ios : UIView*
android : com.imptt.propttsdk.media.view.VideoView
window : HWND(C++),IntPtr(C#) |
Return | 0:Call Success, 0<ErrorCode |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
Sample(Android) | In Layout,
<com.imptt.propttsdk.media.view.VideoView
android:id="@+id/surface_play_share_video"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
In Code,
VideoView shareVideoPlayView =
(VideoView) findViewById(R.id.surface_play_share_video);
videoChannel.setPlayView(shareVideoPlayView);
|
Sample(C#) | var wih = new WindowInteropHelper(window);
IntPtr hWnd = wih.Handle;
channel.setPlayView(hWnd); |
setCameraZoom
int setCameraZoom(int Level) |
Level | zoom level ( 0 ~ 4 ) |
Return | 0:Call Success, 0<ErrorCode |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | Not supported |
Linux SDK | Not supported yet |
setVideoShareManager
int setVideoShareManager(IVideoShareManager VideoShareManager) |
VideoShareManager | VideoShareManager instance |
Return | 0:Call Success, 0<ErrorCode |
Android SDK | 2.1.1 |
iOS SDK | Not supported |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
Events
onVideoChannelError
void onVideoChannelError(VideoChannel ChannelInstance, int ErrorCode, string ErrorMesssage) |
ChannelInstance | VideoChannel instance of event |
ErrorCode | Error code. see Main 6 |
ErrorMesssage | Error message |
Description | Errer event |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelResult
void onVideoChannelResult(VideoChannel ChannelInstance, int Seq, int ResultCode, string ResultMesssage) |
ChannelInstance | VideoChannel instance of event |
Seq | Requested Sequence ID |
ResultCode | Error code. see Main 8 |
ResultMesssage | Error message |
Description | Result event for request |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelCreated
void onVideoChannelCreated(VideoChannel ChannelInstance, int ChannelID) |
ChannelInstance | VideoChannel instance of event |
ChannelID | Created VideoChannel's ID |
Description | Video Channel is created |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelDeleted
void onVideoChannelDeleted(VideoChannel ChannelInstance) |
ChannelInstance | VideoChannel instance of event |
Description | Video Channel is deleted |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelJoined
void onVideoChannelJoined(VideoChannel ChannelInstance, string Member, int MemberType, int TotalUserCount) |
ChannelInstance | VideoChannel instance of event |
Member | Joined Member's Information |
MemberType | 0: MemberID, 1: MemberJson |
TotalUserCount | Total user count in channel |
Description | User is joined into a Video channel. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelLeaved
void onVideoChannelLeaved(VideoChannel ChannelInstance, string MemberID, int TotalUserCount) |
ChannelInstance | VideoChannel instance of event |
MemberID | Leaved Member's ID |
TotalUserCount | Total user count in channel |
Description | User is leaved from a Video channel. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelPreviewStarted
void onVideoChannelPreviewStarted(VideoChannel ChannelInstance) |
ChannelInstance | VideoChannel instance of event |
Description | Video preview is started. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelPreviewStopped
void onVideoChannelPreviewStopped(VideoChannel ChannelInstance) |
ChannelInstance | VideoChannel instance of event |
Description | Video preview is stopped. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelStreamStarted
void onVideoChannelStreamStarted(VideoChannel ChannelInstance) |
ChannelInstance | VideoChannel instance of event |
Description | Video stream is started. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelStreamStopped
void onVideoChannelStreamStopped(VideoChannel ChannelInstance) |
ChannelInstance | VideoChannel instance of event |
Description | Video stream is stopped. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelTrackDataCaptured
void onVideoChannelTrackDataCaptured(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp) |
ChannelInstance | VideoChannel instance of event |
TrackType | 0:Audio, 1:Video, 1>Others |
TrackDataBuffer | Buffer of data. Video: no event Audio: no event |
DataLength | Data size |
Timestamp | Timestamp of data |
Description | Track data is captured from device. |
Android SDK | 2.1.1, This event would be not fired. |
iOS SDK | 2.1.1, This event would be not fired. |
Windows SDK | 2.1.1, This event would be not fired. |
Linux SDK | Not supported yet |
onVideoChannelTrackDataEncoded
void onVideoChannelTrackDataEncoded(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp, int FrameType) |
ChannelInstance | VideoChannel instance of event |
TrackType | 0:Audio, 1:Video, 1<Others |
TrackDataBuffer | Buffer of data. Video: H.264, 1 frame Audio: There is no event. |
DataLength | Data size |
Timestamp | Timestamp of data |
FrameType | 0: Info, 1: Media-Key frame, 2: Media |
Description | Track data is encoded by encoder. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelTrackDataReceived
void onVideoChannelTrackDataReceived(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp, int FrameType) |
ChannelInstance | VideoChannel instance of event |
TrackType | 0:Audio, 1:Video, 1>Others |
TrackDataBuffer | Buffer of data. Video: H.264, 1 frame Audio: There is no event. |
DataLength | Data size |
Timestamp | Timestamp of data |
FrameType | 0: Info, 1: Media-Key frame, 2: Media |
Description | Track data is received from server. |
Android SDK | 2.1.1 |
iOS SDK | 2.1.1 |
Windows SDK | 2.1.1 |
Linux SDK | Not supported yet |
onVideoChannelTrackDataRendered
void onVideoChannelTrackDataRendered(VideoChannel ChannelInstance, int TrackType, byte[] TrackDataBuffer, int DataLength, unsigned int Timestamp) |
ChannelInstance | VideoChannel instance of event |
TrackType | 0:Audio, 1:Video, 1>Others |
TrackDataBuffer | Buffer of data. |
DataLength | Data size |
FrameType | 0: Info, 1: Media-Key frame, 2: Media |
Timestamp | Timestamp of data |
Description | Track data is rendered to device. |
Android SDK | 2.1.1, This event would be not fired. |
iOS SDK | 2.1.1, This event would be not fired. |
Windows SDK | 2.1.1, This event would be not fired. |
Linux SDK | Not supported yet |