11 | | - On iOS, capturing video to a file will store the video data in camera native orientation, i.e: wide-oriented, the capture orientation info (the device/camera orientation when the capture/record process is done) is stored in video metadata, so in playing back the file, the stored capture orientation info (may be combined with current device orientation info) is used to calculate rotation angle to get natural orientation in video rendering/playback. |
| 11 | - On iOS, capturing video to a file will store the video data in camera's native orientation, i.e: wide-oriented, the capture orientation info (the device/camera orientation when the capture/record process is done) is stored in video metadata, so in playing back the file, the stored capture orientation info (may be combined with current device orientation info) is used to calculate rotation angle to get natural orientation in video rendering/playback. |
18 | | == Issue == |
19 | | - SDP/SIP doesn't seem to support this orientation thing. No way for sender to tell receiver about the video orientation info. Putting 'a=orient:x' in SDP is not really useful as it just receiver preference/capability, while in practice, the receiver can render any orientations and the capturer cannot really send portrait (codecs limitation, etc). |
| 18 | === Issues === |
| 19 | - SDP/SIP only offers limited support for orientation, and there is no way for sender to tell receiver about the video orientation of the capture device. The 'a=orient:x' in SDP is not really useful as this is receiver preference/capability, while in practice, the receiver can render any orientations and the capturer cannot really send portrait (codecs limitation, etc). |
| 20 | |
| 21 | == Specification == |
| 22 | |
| 23 | Based on the background above, the following API will be implemented by this ticket: |
| 24 | - Add ''orientation'' capability to video device with the following specification: |
| 25 | - it is ''read-only'' for capture devices, and |
| 26 | - it is ''write-only'' for renderer devices |
| 27 | - Add {{{pjsua_vid_win_rotate(win, angle)}}} API. The ''angle'' is a rotation angle to be applied to a picture/video so it can be displayed naturally (or as the capturer preference). |
| 28 | |