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

Can not connect to to server when I don't call startPreview #89

Open
Colaman0 opened this issue Feb 22, 2023 · 5 comments
Open

Can not connect to to server when I don't call startPreview #89

Colaman0 opened this issue Feb 22, 2023 · 5 comments

Comments

@Colaman0
Copy link

No description provided.

@Colaman0 Colaman0 changed the title Can not connect to to server when i dont Can not connect to to server when I don't call startPreview Feb 22, 2023
@Colaman0
Copy link
Author

When i don't pass the surfaceview of textureview to build the RtspServerCamera1 or don't call the rtspServerCamera1.startPreview() , RtspServer will return the sps or pps is null error.
Just hide the rtspServerCamera1.startPreview() in sample

@gobeyondmyself
Copy link

gobeyondmyself commented Feb 23, 2023

because when you call startpreview,you will call Camera1Base.startPreview, then,call the Camera1ApiManager.start, last ,get the camera yuv data.

@Colaman0
Copy link
Author

it will call Camera1ApiManager.start event I didn't call startPreview.
I found the problem is VideoEncode didn't accept the formatChanged ,so the spa and pps is null
image

@gobeyondmyself
Copy link

i don't knwo that,I'm also studying the source code.
can you help me solve #88 problem?

@Colaman0
Copy link
Author

I found that if you didn't call startPreview before startStream,the RtspServer will fail to open。
because startPreview will init the camera config ,it will select the camera facing , then startStream will open camera,so that it will open the camera 0 and my device didn't have it ,so I can't get the camera frame data.
RtspServer will check the ssp and data , and both two data come from the frame data , so the RtspServer can't open .

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