-
Notifications
You must be signed in to change notification settings - Fork 67
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
Failed to get the camera info. #144
Comments
Hello, Make sure that you have camera permission accepted. You should declare it in the manifest and request it in runtime before use the library. |
This is already given... copied from your example. `
|
Hello, Remember that Android need request camera permission in the code not only declare it in the manifest. You can also go to app settings in the device and accept it manually to test. Did you test with other device? can you tell me your device model? |
Your example also crashing... camera permission are given for sure.. I am able to see preview and save the recorded video.. |
Hello,
I am using latest libraries
library = { module = "com.github.pedroSG94.RootEncoder:library", version.ref = "library" } rtsp-server = { module = "com.github.pedroSG94:RTSP-Server", version.ref = "rtspServer" }
and converted kt. sample to java. using only 3 classes to preview and stream sample. I encountered following error.
Can some one help me ? below is entire class.
`package com.camtest;
import static android.os.Looper.prepare;
import android.graphics.SurfaceTexture;
import android.os.Build;
import android.os.Bundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import android.Manifest;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceView;
import android.view.TextureView;
import android.view.WindowManager;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import com.pedro.common.ConnectChecker;
import com.pedro.encoder.input.video.CameraHelper;
import com.pedro.encoder.input.video.CameraOpenException;
import com.pedro.library.base.recording.RecordController;
import com.pedro.library.view.AutoFitTextureView;
import com.pedro.rtsp.rtsp.RtspClient;
import com.pedro.rtsp.utils.* ;
import com.pedro.rtspserver.RtspServerCamera1;
import com.pedro.rtspserver.server.ClientListener;
import com.pedro.rtspserver.server.ServerClient;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
public class pedroact extends AppCompatActivity implements ConnectChecker, ClientListener, TextureView.SurfaceTextureListener {
}`
The text was updated successfully, but these errors were encountered: