Opened 14 years ago

Closed 13 years ago

Last modified 13 years ago

#1263 closed task (fixed)

Video API for PJSUA-LIB

Reported by: bennylp Owned by: nanang
Priority: major Milestone: release-2.0-alpha
Component: pjsua-lib Version: 2.0-dev-branch
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description (last modified by bennylp)

PJSUA-LIB video API specification:

1. Video Device Enumeration API

Specifications:

  1. query device count
  2. query device names
  3. hotswap support?

2. Video Call API

Specifications:

  1. enable or disable video when initiating call
  2. enable or disable video when receiving call
  3. choose which device to use for video call
  4. add and remove video media stream during the call
  5. change which device to use during the call
  6. hide remote video window
  7. move and/or resize video window

Notes:

Q: when receiving incoming call or reinvite which adds video, how can the app confirm this to the user?
A: at the moment, incoming video will be accepted automatically, but the app may simply hide the window until it gets user confirmation, if needed.

Q: when receiving incoming call or reinvite with video, should we start sending automatically?
A: at the moment the answer tends to be no, as sending video is an operation that can be initiated independently.

3. Video Capture Preview API

Specifications:

  1. start and stop preview for the specified camera device, independent of calls
  2. preview more than one capture devices independently
  3. move and/or resize preview window

4. Media Info and Statistic API

The new API can be used for both audio and video.

Specifications:

  1. query the number of media streams in a call
  2. query the media stream info
  3. query the media stream statistic
  4. query the media transport info/statistic
  5. move pjsua function that dumps call statistic (i.e. "dq" command) to a separate size, to reduce footprint for apps that don't use it.

5. Notification API

Nothing special for video. Update in media status is reported in on_media_state() callback as usual. Application may use media status API to query about video status.

Change History (18)

comment:1 Changed 14 years ago by bennylp

  • Priority changed from normal to major

comment:2 Changed 13 years ago by bennylp

  • Description modified (diff)
  • Summary changed from API: video status and notification to Video API for PJSUA-LIB

comment:3 Changed 13 years ago by bennylp

  • Description modified (diff)

comment:4 Changed 13 years ago by bennylp

  • Description modified (diff)

comment:5 Changed 13 years ago by bennylp

(In [3609]) Initial commit re #1263 (PJSUA-LIB Video API):

  • API designed and reviewed (pjsua.h)
  • Implemented these APIs and added to pjsua sample application:
    • video device enums API
    • video capture preview API
  • refactoring in PJSUA-LIB:
    • video stuffs go to pjsua_vid.c
    • call dump goes to pjsua_dump.c

We're still missing:

  • video call API implementation
  • media info and statistic API implementation

comment:6 Changed 13 years ago by bennylp

  • Owner changed from bennylp to nanang
  • Status changed from new to assigned

comment:7 Changed 13 years ago by nanang

(In [3629]) Re #1263:

  • implemented video window management (get/set visibility, pos, resize)
  • integrated video window and video capture preview into call

comment:8 Changed 13 years ago by nanang

(In [3634]) Re #1263:

  • Renamed API pjsua_call_set_vid_out() with pjsua_call_set_vid_strm().
  • Implemented initial version of the function, features covered:
    • add, remove video media stream during the call
    • change which device to use during the call
    • start/stop video stream transmission

comment:9 Changed 13 years ago by nanang

(In [3636]) Re #1263:

  • Break down the operation type PJSUA_CALL_VID_STRM_MODIFY into PJSUA_CALL_VID_STRM_ENABLE, PJSUA_CALL_VID_STRM_DISABLE, PJSUA_CALL_VID_STRM_CHANGE_CAP_DEV.
  • Implemented video stream re-enabling (PJSUA_CALL_VID_STRM_ENABLE).

comment:10 Changed 13 years ago by nanang

(In [3637]) Re #1263: minor fixes:

  • wrong boolean value to be used with PJMEDIA_VID_DEV_CAP_OUTPUT_HIDE in pjsua_vid.c
  • unupdated 'vid' commands in pjsua sample app

comment:11 Changed 13 years ago by nanang

(In [3638]) Re #1263:

  • Added API pjsua_vid_enum_wins() to enumerate video windows.
  • Minor fixes on video window manipulations.

comment:12 Changed 13 years ago by nanang

(In [3639]) Re #1263:

  • Implemented media info/statistics APIs: stream info, stream statistic, and transport info.
  • Implemented API of default video stream index in call, pjsua_call_get_vid_stream_idx().

comment:13 Changed 13 years ago by ming

(In [3655]) Re #1263:
Fixed assertion when receiving a call with no video

comment:14 Changed 13 years ago by nanang

(In [3657]) Re #1263:

  • Replaced video stream operation DISABLE into REMOVE.
  • Replaced video stream operation ENABLE into CHANGEDIR.
  • Added new param: media direction, used in operation ADD and CHANGEDIR.
  • Updated video stream operation START_TRANSMIT to ignore capture device param (as changing capture device is handled by CHANGE_CAP_DEV operation).

comment:15 Changed 13 years ago by nanang

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:16 Changed 13 years ago by bennylp

(In [3685]) Re #1263 (PJSUA-LIB video API): added doxygen comments on stream_op values

comment:17 Changed 13 years ago by bennylp

(In [3694]) Re #1263 (Video API):

  • Added PJSUA_CALL_VID_STRM_NO_OP to occupy value 0 for the enum
  • Added pjsua_call_vid_strm_op_param_default() to initialize pjsua_call_vid_strm_op_param
  • Renamed pjsua_call_get_transport_info() to pjsua_call_get_med_transport_info()

comment:18 Changed 13 years ago by bennylp

(In [3732]) Fixed crash when call is disconnected while video is not fully running (e.g. ICE negotiation failed). [Re #1263]

Note: See TracTickets for help on using tickets.