├── app
├── .gitignore
├── src
│ ├── test
│ │ ├── resources
│ │ │ └── robolectric.properties
│ │ └── java
│ │ │ └── pl
│ │ │ └── huczeq
│ │ │ └── rtspplayer
│ │ │ ├── BaseAndroidTest.java
│ │ │ ├── BaseDITestTemplate.java
│ │ │ ├── domain
│ │ │ ├── usecases
│ │ │ │ ├── BaseUseCaseTestTemplateTest.java
│ │ │ │ └── BaseUseCaseTestTemplate.java
│ │ │ └── cameragenerator
│ │ │ │ ├── ExpressionTest.java
│ │ │ │ └── ModelGeneratorForTests.java
│ │ │ └── FakeRtspPlayerApp.java
│ ├── main
│ │ ├── res
│ │ │ ├── values-land
│ │ │ │ └── dimens.xml
│ │ │ ├── mipmap
│ │ │ │ └── icon_camera.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ └── ic_launcher_round.png
│ │ │ ├── values
│ │ │ │ ├── ic_launcher_background.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ ├── attrs.xml
│ │ │ │ └── colors.xml
│ │ │ ├── drawable
│ │ │ │ ├── bg_control_player_gradient.xml
│ │ │ │ ├── add.xml
│ │ │ │ ├── ic_back.xml
│ │ │ │ ├── ic_check.xml
│ │ │ │ ├── ic_expand_less.xml
│ │ │ │ ├── ic_expand_more.xml
│ │ │ │ ├── header_icon_checklist.xml
│ │ │ │ ├── ic_checklist.xml
│ │ │ │ ├── ic_download.xml
│ │ │ │ ├── ic_upload.xml
│ │ │ │ ├── ic_enter_picture_in_picture_mode.xml
│ │ │ │ ├── video_camera_back.xml
│ │ │ │ ├── ic_volume_on.xml
│ │ │ │ ├── folder_open.xml
│ │ │ │ ├── ic_volume_off.xml
│ │ │ │ ├── launcher_icon.xml
│ │ │ │ ├── launcher_icon_small.xml
│ │ │ │ ├── ic_confirm.xml
│ │ │ │ ├── launcher_monochrome_icon_small.xml
│ │ │ │ └── ic_settings.xml
│ │ │ ├── color
│ │ │ │ └── text_input_box_stroke_color.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── layout
│ │ │ │ ├── pref_m3_checkbox.xml
│ │ │ │ ├── pref_m3_switch.xml
│ │ │ │ ├── activity_settings.xml
│ │ │ │ ├── activity_app_license.xml
│ │ │ │ ├── item_camera_preview.xml
│ │ │ │ ├── toolbar.xml
│ │ │ │ ├── activity_start.xml
│ │ │ │ ├── activity_select_camera.xml
│ │ │ │ ├── item_camera_select_radiobutton.xml
│ │ │ │ ├── player_control_interface.xml
│ │ │ │ ├── activity_app_info.xml
│ │ │ │ └── item_view_camera.xml
│ │ │ ├── menu
│ │ │ │ ├── menu_camera_item.xml
│ │ │ │ └── menu_camera_group_item.xml
│ │ │ ├── values-v27
│ │ │ │ └── styles.xml
│ │ │ └── values-night
│ │ │ │ └── colors.xml
│ │ ├── ic_launcher-playstore.png
│ │ └── java
│ │ │ └── pl
│ │ │ └── huczeq
│ │ │ └── rtspplayer
│ │ │ ├── util
│ │ │ ├── validation
│ │ │ │ ├── interfaces
│ │ │ │ │ ├── BasicCondition.java
│ │ │ │ │ ├── FieldRule.java
│ │ │ │ │ ├── ValueTransform.java
│ │ │ │ │ └── ValueProvider.java
│ │ │ │ ├── Errors.java
│ │ │ │ ├── RuleWithValueTransform.java
│ │ │ │ ├── FieldRules.java
│ │ │ │ └── FieldValidator.java
│ │ │ ├── interfaces
│ │ │ │ ├── IOnListItemSelected.java
│ │ │ │ └── IOnMenuItemListSelected.java
│ │ │ ├── states
│ │ │ │ ├── BaseState.java
│ │ │ │ ├── ProcessingStateType.java
│ │ │ │ ├── ResultState.java
│ │ │ │ └── CompletableState.java
│ │ │ ├── DiffCallback.java
│ │ │ └── Timer.java
│ │ │ ├── player
│ │ │ ├── OnVideoLayoutChanged.java
│ │ │ ├── PlayerEventListener.java
│ │ │ ├── vlc
│ │ │ │ └── VlcFactory.java
│ │ │ ├── RtspPlayer.java
│ │ │ └── VideoLayout.java
│ │ │ ├── domain
│ │ │ ├── cameragenerator
│ │ │ │ ├── exceptions
│ │ │ │ │ ├── LimitReachedException.java
│ │ │ │ │ └── ParsingException.java
│ │ │ │ ├── expression
│ │ │ │ │ ├── VariableModel.java
│ │ │ │ │ ├── ProcessedVariable.java
│ │ │ │ │ ├── Variations.java
│ │ │ │ │ └── Expression.java
│ │ │ │ ├── CameraGroupGenerator.java
│ │ │ │ └── CameraInstancesGenerator.java
│ │ │ ├── usecases
│ │ │ │ ├── base
│ │ │ │ │ ├── BaseUseCase.java
│ │ │ │ │ ├── DisposableUseCase.java
│ │ │ │ │ ├── NoResultUseCase.java
│ │ │ │ │ ├── SingleUseCase.java
│ │ │ │ │ └── CompletableUseCase.java
│ │ │ │ ├── DeleteCameraUseCase.java
│ │ │ │ ├── LoadCameraUseCase.java
│ │ │ │ ├── LoadBackupUseCase.java
│ │ │ │ ├── CreateCameraGroupUseCase.java
│ │ │ │ ├── ExportBackupUseCase.java
│ │ │ │ ├── UpdateCameraGroupUseCase.java
│ │ │ │ ├── DataMigrationUseCase.java
│ │ │ │ ├── ImportBackupUseCase.java
│ │ │ │ ├── GenerateCameraGroupUseCase.java
│ │ │ │ └── SaveCameraThumbnailUseCase.java
│ │ │ ├── model
│ │ │ │ ├── CameraPatternWithVariables.java
│ │ │ │ └── CameraGroupModel.java
│ │ │ ├── backup
│ │ │ │ ├── LoadedBackup.java
│ │ │ │ ├── LoadBackupTask.java
│ │ │ │ └── Keys.java
│ │ │ ├── StartingCameraIntegrityHelper.java
│ │ │ ├── CameraThumbnailsIntegrityHelper.java
│ │ │ └── urlgenerator
│ │ │ │ └── UrlGenerator.java
│ │ │ ├── ui
│ │ │ ├── settings
│ │ │ │ ├── exportbackup
│ │ │ │ │ └── ExportBackupHandler.java
│ │ │ │ ├── importbackup
│ │ │ │ │ └── ImportBackupHandler.java
│ │ │ │ ├── SettingsActivity.java
│ │ │ │ └── info
│ │ │ │ │ ├── LicenseViewerActivity.java
│ │ │ │ │ └── AboutAppActivity.java
│ │ │ ├── addeditcamera
│ │ │ │ ├── CameraFormHandler.java
│ │ │ │ ├── editcamera
│ │ │ │ │ └── EditCameraActivity.java
│ │ │ │ ├── addcamera
│ │ │ │ │ └── AddCameraActivity.java
│ │ │ │ └── CameraPreviewListAdapter.java
│ │ │ ├── player
│ │ │ │ ├── view
│ │ │ │ │ └── renderer
│ │ │ │ │ │ ├── OnImageCapturedListener.java
│ │ │ │ │ │ ├── PlayerRendererCallback.java
│ │ │ │ │ │ ├── Shader.java
│ │ │ │ │ │ └── FrameShader.java
│ │ │ │ ├── PlayerHandler.java
│ │ │ │ └── PlayerCameraViewModel.java
│ │ │ ├── adapters
│ │ │ │ ├── dropdown
│ │ │ │ │ ├── ModelsDropdownAdapter.java
│ │ │ │ │ ├── ProducersDropdownAdapter.java
│ │ │ │ │ └── StreamTypesDropdownAdapter.java
│ │ │ │ └── base
│ │ │ │ │ └── BaseRecyclerViewAdapter.java
│ │ │ ├── views
│ │ │ │ ├── DropDownListView.java
│ │ │ │ └── materialpreferences
│ │ │ │ │ └── SwitchPreferenceMaterial.java
│ │ │ ├── start
│ │ │ │ ├── StartActivity.java
│ │ │ │ └── DataMigrationViewModel.java
│ │ │ ├── MyBindingAdapter.java
│ │ │ ├── BaseActivity.java
│ │ │ └── cameralist
│ │ │ │ └── CameraListViewModel.java
│ │ │ ├── data
│ │ │ ├── repositories
│ │ │ │ ├── base
│ │ │ │ │ ├── CameraThumbnailRepository.java
│ │ │ │ │ ├── UrlTemplateRepository.java
│ │ │ │ │ └── CameraRepository.java
│ │ │ │ └── CameraThumbnailRepositoryImpl.java
│ │ │ ├── sources
│ │ │ │ ├── local
│ │ │ │ │ ├── database
│ │ │ │ │ │ ├── CameraGroupDao.java
│ │ │ │ │ │ ├── AppDatabase.java
│ │ │ │ │ │ ├── CameraPatternDao.java
│ │ │ │ │ │ ├── CameraDao.java
│ │ │ │ │ │ └── CameraInstanceDao.java
│ │ │ │ │ ├── SaveBitmapTask.java
│ │ │ │ │ ├── ReadBitmapTask.java
│ │ │ │ │ └── ThumbnailDiskCache.java
│ │ │ │ └── cache
│ │ │ │ │ └── ThumbnailCache.java
│ │ │ ├── typeconverters
│ │ │ │ └── MapConverter.java
│ │ │ └── model
│ │ │ │ ├── Camera.java
│ │ │ │ ├── urltemplates
│ │ │ │ ├── Model.java
│ │ │ │ ├── Producer.java
│ │ │ │ └── UrlTemplate.java
│ │ │ │ ├── CameraGroup.java
│ │ │ │ └── CameraInstance.java
│ │ │ ├── di
│ │ │ ├── ExecutorsModule.java
│ │ │ ├── DatabaseModule.java
│ │ │ └── RepositoriesModule.java
│ │ │ ├── RtspPlayerProvider.java
│ │ │ ├── AppConfiguration.java
│ │ │ ├── RtspPlayerApp.java
│ │ │ ├── AppExecutors.java
│ │ │ └── AppThemeHelper.java
│ └── androidTest
│ │ └── java
│ │ └── pl
│ │ └── huczeq
│ │ └── rtspplayer
│ │ └── ExampleInstrumentedTest.java
└── proguard-rules.pro
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── settings.gradle
├── .gitignore
├── gradle.properties
├── README.md
└── gradlew.bat
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/src/test/resources/robolectric.properties:
--------------------------------------------------------------------------------
1 | sdk=30
--------------------------------------------------------------------------------
/app/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap/icon_camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap/icon_camera.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/damianhoppe/RTSP-Player/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #7BE380
4 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/validation/interfaces/BasicCondition.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.validation.interfaces;
2 |
3 | public interface BasicCondition {
4 | boolean allows();
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/player/OnVideoLayoutChanged.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.player;
2 |
3 | public interface OnVideoLayoutChanged {
4 | void onVideoLayoutChanged(VideoLayout videoLayout);
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/interfaces/IOnListItemSelected.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.interfaces;
2 |
3 | public interface IOnListItemSelected {
4 | void onCameraItemSelected(T item);
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/validation/interfaces/FieldRule.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.validation.interfaces;
2 |
3 | public interface FieldRule {
4 |
5 | Integer checkValidity(String text);
6 | }
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/validation/interfaces/ValueTransform.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.validation.interfaces;
2 |
3 |
4 | public interface ValueTransform {
5 |
6 | T transform(T value);
7 | }
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/cameragenerator/exceptions/LimitReachedException.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.cameragenerator.exceptions;
2 |
3 | public class LimitReachedException extends RuntimeException {
4 | }
5 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/settings/exportbackup/ExportBackupHandler.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.settings.exportbackup;
2 |
3 | public interface ExportBackupHandler {
4 | void selectBackupDestinationFile();
5 | }
6 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/settings/importbackup/ImportBackupHandler.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.settings.importbackup;
2 |
3 | public interface ImportBackupHandler {
4 | void selectBackupFile();
5 | void restoreBackup();
6 | }
7 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/addeditcamera/CameraFormHandler.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.addeditcamera;
2 |
3 | public interface CameraFormHandler {
4 | void toggleAdvancedVisibility();
5 | void startPreview();
6 | void confirmForm();
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/player/PlayerEventListener.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.player;
2 |
3 | public interface PlayerEventListener {
4 | void onStartRendering();
5 | void onPlaying();
6 | void onEndReached();
7 | void onEncounteredError();
8 | }
9 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/interfaces/IOnMenuItemListSelected.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.interfaces;
2 |
3 | import android.view.MenuItem;
4 |
5 | public interface IOnMenuItemListSelected {
6 | void onMenuItemSelected(MenuItem menuItem, T item);
7 | }
8 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Sep 20 00:51:12 CEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4 | distributionPath=wrapper/dists
5 | zipStorePath=wrapper/dists
6 | zipStoreBase=GRADLE_USER_HOME
7 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/player/view/renderer/OnImageCapturedListener.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.player.view.renderer;
2 |
3 | import android.graphics.Bitmap;
4 |
5 | public interface OnImageCapturedListener {
6 | void onImageCaptured(Bitmap bitmap, long id);
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/player/view/renderer/PlayerRendererCallback.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.player.view.renderer;
2 |
3 | public interface PlayerRendererCallback {
4 |
5 | void onSurfaceCreated();
6 | void onVideoLayoutChanged(int width, int height);
7 | }
8 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/ui/player/PlayerHandler.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.ui.player;
2 |
3 | public interface PlayerHandler {
4 | void togglePlayerControlVisibility();
5 | void reconnect();
6 | void switchVolume();
7 | void enterPlayerIntoPictureInPictureMode();
8 |
9 | void back();
10 | }
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/bg_control_player_gradient.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/add.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/color/text_input_box_stroke_color.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_check.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_expand_less.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_expand_more.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/states/BaseState.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.states;
2 |
3 | import lombok.AllArgsConstructor;
4 | import lombok.Getter;
5 |
6 | @Getter
7 | @AllArgsConstructor
8 | public abstract class BaseState {
9 |
10 | @ProcessingStateType
11 | protected int type;
12 |
13 | public void reset() {
14 | this.type = ProcessingStateType.IDLE;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/app/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/validation/Errors.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.validation;
2 |
3 | public class Errors {
4 | public static final int INCORRECT_VALUE = 1;
5 | public static final int IS_REQUIRED = 2;
6 | public static final int EXPRESSION_OPENSIGN_AFTER_OPEN = 3;
7 | public static final int EXPRESSION_CLOSEDSIGN_WITHOUT_OPEN = 4;
8 | public static final int EXPRESSION_NOT_CLOSED = 5;
9 | }
10 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | repositories {
3 | gradlePluginPortal()
4 | google()
5 | mavenCentral()
6 | maven { url 'https://jitpack.io' }
7 | }
8 | }
9 | dependencyResolutionManagement {
10 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
11 | repositories {
12 | google()
13 | mavenCentral()
14 | }
15 | }
16 | include ':app'
17 | rootProject.name = "RTSP Player"
--------------------------------------------------------------------------------
/app/src/main/res/drawable/header_icon_checklist.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_checklist.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/test/java/pl/huczeq/rtspplayer/BaseAndroidTest.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer;
2 |
3 | import org.junit.After;
4 |
5 | import javax.inject.Inject;
6 |
7 | import pl.huczeq.rtspplayer.data.sources.local.database.AppDatabase;
8 |
9 | public abstract class BaseAndroidTest extends BaseDITestTemplate {
10 |
11 | @Inject
12 | public AppDatabase database;
13 |
14 | @After
15 | public void after() {
16 | this.database.close();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pref_m3_checkbox.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/pref_m3_switch.xml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_download.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_upload.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/data/repositories/base/CameraThumbnailRepository.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.data.repositories.base;
2 |
3 | import android.graphics.Bitmap;
4 |
5 | import io.reactivex.rxjava3.subjects.PublishSubject;
6 |
7 | public interface CameraThumbnailRepository {
8 |
9 | PublishSubject getThumbnailUpdatedSubject();
10 | void saveThumbnail(String id, Bitmap bitmap);
11 | Bitmap getThumbnail(String id);
12 | void deleteThumbnail(String previewImg);
13 | }
14 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/states/ProcessingStateType.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util.states;
2 |
3 | import androidx.annotation.IntDef;
4 |
5 | import java.lang.annotation.Retention;
6 | import java.lang.annotation.RetentionPolicy;
7 |
8 | @IntDef({ProcessingStateType.IDLE, ProcessingStateType.PROCESSING, ProcessingStateType.DONE})
9 | @Retention(RetentionPolicy.SOURCE)
10 | public @interface ProcessingStateType {
11 | int IDLE = 0;
12 | int PROCESSING= 1;
13 | int DONE = 2;
14 | }
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/data/sources/local/database/CameraGroupDao.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.data.sources.local.database;
2 |
3 | import androidx.room.Dao;
4 | import androidx.room.Query;
5 | import androidx.room.Transaction;
6 |
7 | import java.util.List;
8 |
9 | import pl.huczeq.rtspplayer.data.model.CameraGroup;
10 |
11 | @Dao
12 | public abstract class CameraGroupDao {
13 |
14 | @Transaction
15 | @Query("SELECT * FROM camerapattern")
16 | public abstract List getAll();
17 | }
18 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_enter_picture_in_picture_mode.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/di/ExecutorsModule.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.di;
2 |
3 | import javax.inject.Singleton;
4 |
5 | import dagger.Module;
6 | import dagger.Provides;
7 | import dagger.hilt.InstallIn;
8 | import dagger.hilt.components.SingletonComponent;
9 | import pl.huczeq.rtspplayer.AppExecutors;
10 |
11 | @Module
12 | @InstallIn(SingletonComponent.class)
13 | public class ExecutorsModule {
14 |
15 | @Provides
16 | @Singleton
17 | public AppExecutors executors() {
18 | return new AppExecutors();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/video_camera_back.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Gradle files
2 | .gradle/
3 | build/
4 |
5 | # Local configuration file (sdk path, etc)
6 | local.properties
7 |
8 | # Log/OS Files
9 | *.log
10 |
11 | # Android Studio generated files and folders
12 | captures/
13 | .externalNativeBuild/
14 | .cxx/
15 | *.apk
16 | output.json
17 |
18 | # IntelliJ
19 | *.iml
20 | .idea/
21 | misc.xml
22 | deploymentTargetDropDown.xml
23 | render.experimental.xml
24 |
25 | # Keystore files
26 | *.jks
27 | *.keystore
28 |
29 | # Google Services (e.g. APIs or Firebase)
30 | google-services.json
31 |
32 | # Android Profiling
33 | *.hprof
--------------------------------------------------------------------------------
/app/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_volume_on.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/folder_open.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/usecases/base/BaseUseCase.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.usecases.base;
2 |
3 | import pl.huczeq.rtspplayer.AppExecutors;
4 |
5 | public abstract class BaseUseCase {
6 |
7 | protected AppExecutors executors;
8 |
9 | public BaseUseCase(AppExecutors executors) {
10 | this.executors = executors;
11 | }
12 |
13 | public AppExecutors.AppExecutor postExecutor() {
14 | return this.executors.mainThread();
15 | }
16 |
17 | public AppExecutors.AppExecutor executor() {
18 | return this.executors.bgThread();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
11 |
12 |
16 |
17 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/data/sources/local/SaveBitmapTask.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.data.sources.local;
2 |
3 | import android.graphics.Bitmap;
4 |
5 | import java.io.File;
6 | import java.io.FileOutputStream;
7 | import java.io.IOException;
8 |
9 | public class SaveBitmapTask {
10 |
11 | public static void save(Bitmap bitmap, File directory, String fileName) throws IOException {
12 | File f = new File(directory, fileName);
13 | FileOutputStream fouts = new FileOutputStream(f);
14 | bitmap.compress(Bitmap.CompressFormat.PNG, 100, fouts);
15 | fouts.flush();
16 | fouts.close();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/data/repositories/base/UrlTemplateRepository.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.data.repositories.base;
2 |
3 | import androidx.annotation.WorkerThread;
4 | import androidx.lifecycle.LiveData;
5 |
6 | import java.util.List;
7 |
8 | import io.reactivex.rxjava3.core.Flowable;
9 | import io.reactivex.rxjava3.core.Single;
10 | import io.reactivex.rxjava3.core.SingleObserver;
11 | import pl.huczeq.rtspplayer.data.model.urltemplates.Producer;
12 |
13 | public interface UrlTemplateRepository {
14 |
15 | LiveData> getAllProducers();
16 |
17 | @WorkerThread
18 | List loadAllProducersAndGet();
19 | }
20 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/model/CameraPatternWithVariables.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.model;
2 |
3 | import androidx.room.Ignore;
4 |
5 | import java.util.Map;
6 |
7 | import lombok.ToString;
8 | import pl.huczeq.rtspplayer.data.model.CameraPattern;
9 |
10 | @ToString
11 | public class CameraPatternWithVariables extends CameraPattern {
12 |
13 | @Ignore
14 | private Map variables;
15 |
16 | public Map getVariables() {
17 | return variables;
18 | }
19 |
20 | public void setVariables(Map variables) {
21 | this.variables = variables;
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/model/CameraGroupModel.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.model;
2 |
3 | import lombok.Data;
4 | import pl.huczeq.rtspplayer.data.model.urltemplates.Model;
5 | import pl.huczeq.rtspplayer.data.model.urltemplates.Producer;
6 |
7 | @Data
8 | public class CameraGroupModel {
9 |
10 | private String name;
11 | private Producer producer;
12 | private Model model;
13 | private String userName;
14 | private String password;
15 | private String addressIp;
16 | private String port;
17 | private String serverUrl;
18 | private String channel;
19 | private int streamType;
20 | private String url;
21 | }
22 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/util/DiffCallback.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.util;
2 |
3 | import androidx.recyclerview.widget.DiffUtil;
4 |
5 | import java.util.List;
6 |
7 | public abstract class DiffCallback extends DiffUtil.Callback {
8 |
9 | protected List oldItems;
10 | protected List newItems;
11 |
12 | public DiffCallback(List oldItems, List newItems) {
13 | this.oldItems = oldItems;
14 | this.newItems = newItems;
15 | }
16 |
17 | @Override
18 | public int getOldListSize() {
19 | return this.oldItems.size();
20 | }
21 |
22 | @Override
23 | public int getNewListSize() {
24 | return this.newItems.size();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/menu_camera_item.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/usecases/base/DisposableUseCase.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.usecases.base;
2 |
3 | import androidx.annotation.CallSuper;
4 |
5 | import io.reactivex.rxjava3.disposables.CompositeDisposable;
6 | import pl.huczeq.rtspplayer.AppExecutors;
7 |
8 | public abstract class DisposableUseCase extends BaseUseCase {
9 |
10 | protected final CompositeDisposable disposables = new CompositeDisposable();
11 |
12 | public DisposableUseCase(AppExecutors executors) {
13 | super(executors);
14 | }
15 |
16 | @CallSuper
17 | public void dispose() {
18 | if (!disposables.isDisposed()) {
19 | disposables.dispose();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/domain/cameragenerator/expression/VariableModel.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.domain.cameragenerator.expression;
2 |
3 | public class VariableModel {
4 | protected String name;
5 | protected String value;
6 |
7 | public VariableModel(String name, String value) {
8 | this.name = name;
9 | this.value = value;
10 | }
11 |
12 | public String getName() {
13 | return name;
14 | }
15 |
16 | public void setName(String name) {
17 | this.name = name;
18 | }
19 |
20 | public String getValue() {
21 | return value;
22 | }
23 |
24 | public void setValue(String value) {
25 | this.value = value;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/java/pl/huczeq/rtspplayer/data/typeconverters/MapConverter.java:
--------------------------------------------------------------------------------
1 | package pl.huczeq.rtspplayer.data.typeconverters;
2 |
3 | import androidx.room.TypeConverter;
4 |
5 | import com.google.gson.Gson;
6 | import com.google.gson.reflect.TypeToken;
7 |
8 | import java.util.Map;
9 |
10 | public class MapConverter {
11 |
12 | @TypeConverter
13 | public static String mapToString(Map map) {
14 | Gson gson = new Gson();
15 | return gson.toJson(map);
16 | }
17 |
18 | @TypeConverter
19 | public static Map mapFromString(String value) {
20 | Gson gson = new Gson();
21 | return gson.fromJson(value, new TypeToken