Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSIP: Problem with rotation video #2152

Closed
erloop opened this issue May 12, 2020 · 2 comments
Closed

NoSIP: Problem with rotation video #2152

erloop opened this issue May 12, 2020 · 2 comments

Comments

@erloop
Copy link

erloop commented May 12, 2020

Hi,

i'm using plugin NoSIP for call between mobile (Android -> Android, Android -> iOS). I have problem with rotation video (Android have 270, iOS have 90)

In logs janus

janus[18277]: [rtp.c:janus_rtp_header_extension_parse_video_orientation:202] 03 --> c=0, f=0, r1=1, r0=1
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 31698
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 31698
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 3924
janus[18277]: [rtp.c:janus_rtp_header_extension_parse_video_orientation:202] 01 --> c=0, f=0, r1=0, r0=1
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 3924
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 3924
janus[18277]: -- X bit is set!
janus[18277]: -- I bit is set!
janus[18277]: -- M bit is set!
janus[18277]: -- -- PictureID: 3924

But in Android parse frame

override fun onAddStream(p0: MediaStream?) {
                        super.onAddStream(p0)
                        p0?.videoTracks?.getOrNull(0)?.addSink(binding.bigUserView)

                        p0?.videoTracks?.getOrNull(0)?.addSink { videoFrame: VideoFrame? ->
                            Log.d("videoFrame","Remote frame:   "  + videoFrame?.rotation.toString())
                            Log.d("videoFrame","Remote frame:  height: ${videoFrame?.buffer?.height}   Width:  ${videoFrame?.buffer?.width}"  )
                        }
                    }

And have logs

D/local video frame: 270
D/videoFrame: Remote frame:   0
D/videoFrame: Remote frame:  height: 640   Width:  480
D/local video frame: 270
D/videoFrame: Remote frame:   0
D/videoFrame: Remote frame:  height: 640   Width:  480
D/local video frame: 270
D/videoFrame: Remote frame:   0
D/videoFrame: Remote frame:  height: 640   Width:  480
D/local video frame: 270
D/videoFrame: Remote frame:   0
D/videoFrame: Remote frame:  height: 640   Width:  480

Question
Plugin NoSIP can set in default value rotation?

@lminiero
Copy link
Member

The NoSIP plugin is still missing the fixes that were made to the SIP plugin in #1928.

When plugins pass packets to the core, we now strip all extensions that are part of the RTP packets themselves: they need to be set in a dedicated structure, since they need to be merged with other extensions only the core knows about. This means plugins need to be aware of extensions: #1928 did it for SIP, as I said, but NoSIP still doesn't have it. As a result, you should be able to see te extension on the way out, but not on the way in.

I'll check how complex it is to copy the same feature in the NoSIP plugin too.

@lminiero
Copy link
Member

That should fix it (I didn't test it), since it's the same code used by the SIP plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants