Reference of VideoChannel
Description of VideoChannel
PTTClient PTTChannel Group
Properties
| 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 when locked by vox or bluetooth |
| VideoBitrate | int | readonly | Video announce bitrate (kbps) |
| VideoFPS | int | readonly | Video announce FPS (sec) |
| VideoKeyFramerate | int | readonly | Video announce key frame interval (sec) |
| VideoQuality | int | | |
| Foreground | boolean | | Channel's focus status |
| EnablePlayVideo | boolean | | Video Play Status |
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 |
| SDK version | 1.1.1 |
< 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 |
| SDK version | 1.1.1 |
StopPreview
| int StopPreview() |
| Return | 0:Call Success, 0<ErrorCode |
| Expected Events | OnVideoChannelPreviewStopped() |
| Description | Stop video preview |
| SDK version | 1.1.1 |
StartStream
| int StartStream() |
| Return | 0:Call Success, 0<ErrorCode |
| Expected Events | OnVideoChannelStreamStarted() |
| Description | Start video stream |
| SDK version | 1.1.1 |
StopStream
| int StopStream() |
| Return | 0:Call Success, 0<ErrorCode |
| Expected Events | OnVideoChannelStreamStopped() |
| Description | Stop video stream |
| SDK version | 1.1.1 |
SetCamera
| int SetCamera(string CameraName) |
| CameraName | Camera Name to be used |
| Return | 0:Success, 0<ErrorCode |
| Expected Events | |
| Description | Use camera. default face camera |
| SDK version | 1.1.1 |
SetCustomVideoQuality
| int SetCustomVideo(int Width, int Height, int Bitrate, int FPS, int KeyFrameRate) |
| Return | 0:Call Success, 0<ErrorCode |
| Width | Video width |
| Height | Video height |
| Bitrate | Video bitrate(kbps) |
| FPS | Video FPS |
| KeyFrameRate | Video key frame interval(sec) |
| Expected Events | |
| Description | video custom configuration |
| SDK version | 1.1.1 |
SetCameraPreview
| int SetCameraPreview(View preview) |
| Return | 0:Call Success, 0<ErrorCode |
| preview | Camera Preview
ios : UIView*
android : SurfaceView
window : HWND(C++),IntPtr(C#) |
| 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); |
| SDK version | 1.1.1 |
SetPlayView
| int SetPlayView(View playView) |
| Return | 0:Call Success, 0<ErrorCode |
| playView | Video PlayView
ios : UIView*
android : com.imptt.propttsdk.media.view.VideoView PGLSurfaceView is removed at 1.2.0.
window : HWND(C++),IntPtr(C#) |
| 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); |
| SDK version | 1.1.1 |
SetCameraZoom
| int SetCameraZoom(int level) |
| Return | 0:Call Success, 0<ErrorCode |
| level | zoom level ( 0 ~ 4 ) |
| SDK version | 1.1.1 |
SetCameraFlash
| int SetCameraFlash(bool on) |
| Return | 0:Call Success, 0<ErrorCode |
| on | on / off |
| SDK version | 1.1.1 |
Events
OnVideoChannelError
| OnVideoChannelError(VideoChannel ChannelInstance, int ErrorCode, string ErrorMesssage) |
| ChannelInstance | VideoChannel instance of event |
| ErrorCode | Error code. see Main 6 |
| ErrorMesssage | Error message |
| Description | Errer event |
| SDK version | 1.1.1 |
OnVideoChannelResult
| OnVideoChannelResult(VideoChannel ChannelInstance, int Seq, int ResultCode, string ResultMesssage) |
| ChannelInstance | VideoChannel instance of event |
| Seq | Requested Sequence ID |
| ResultCode | Error code. see Main 7 |
| ResultMesssage | Error message |
| Description | Result event for request |
| SDK version | 1.1.1 |
OnVideoChannelCreated
| OnVideoChannelCreated(VideoChannel ChannelInstance, int ChannelID) |
| ChannelInstance | VideoChannel instance of event |
| ChannelID | Created VideoChannel's ID |
| Description | Video Channel is created |
| SDK version | 1.1.1 |
OnVideoChannelDeleted
| OnVideoChannelDeleted(VideoChannel ChannelInstance) |
| ChannelInstance | VideoChannel instance of event |
| Description | Video Channel is deleted |
| SDK version | 1.1.1 |
OnVideoChannelJoined
| 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. |
| SDK version | 1.1.1 |
OnVideoChannelLeaved
| 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. |
| SDK version | 1.1.1 |
OnVideoChannelPreviewStarted
| OnVideoChannelPreviewStarted(VideoChannel ChannelInstance) |
| ChannelInstance | VideoChannel instance of event |
| Description | Video preview is started. |
| SDK version | 1.1.1 |
OnVideoChannelPreviewStopped
| OnVideoChannelPreviewStopped(VideoChannel ChannelInstance) |
| ChannelInstance | VideoChannel instance of event |
| Description | Video preview is stopped. |
| SDK version | 1.1.1 |
OnVideoChannelStreamStarted
| OnVideoChannelStreamStarted(VideoChannel ChannelInstance) |
| ChannelInstance | VideoChannel instance of event |
| Description | Video stream is started. |
| SDK version | 1.1.1 |
OnVideoChannelStreamStopped
| OnVideoChannelStreamStopped(VideoChannel ChannelInstance) |
| ChannelInstance | VideoChannel instance of event |
| Description | Video stream is stopped. |
| SDK version | 1.1.1 |
OnVideoChannelTrackDataCaptured
| 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. |
| SDK version | 1.1.1 |
OnVideoChannelTrackDataEncoded
| 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 |
| TrackDataBuffer | Buffer of data. Video: H.264, 1 frame Audio: 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. |
| SDK version | 1.1.1 |
OnVideoChannelTrackDataReceived
| 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. |
| SDK version | 1.1.1 |
OnVideoChannelTrackDataRendered
| 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. Video: no event Audio: no event |
| DataLength | Data size |
| FrameType | 0: Info, 1: Media-Key frame, 2: Media |
| Timestamp | Timestamp of data |
| Description | Track data is rendered to device. |
| SDK version | 1.1.1, This event would be not fired. |