Skip to content

Commit

Permalink
Merge pull request #24 from mariotaku/chore/commons-refactoring
Browse files Browse the repository at this point in the history
Chore/commons refactoring
  • Loading branch information
mariotaku authored Mar 7, 2023
2 parents d809d63 + 7a0e93e commit 28acff2
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 1,037 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ endif ()

target_compile_definitions(commons-ss4s-modules-list PRIVATE SS4S_MODULES_INI_PATH="${SS4S_MODULES_INI_PATH_RUNTIME}")

if (IHSPLAY_FEATURE_LIBCEC AND TARGET commons-cec)
target_link_libraries(ihsplay PRIVATE commons-cec)
if (IHSPLAY_FEATURE_LIBCEC AND TARGET commons-cec-sdl)
target_link_libraries(ihsplay PRIVATE commons-cec-sdl)
else ()
set(IHSPLAY_FEATURE_LIBCEC OFF)
endif ()
Expand Down
9 changes: 5 additions & 4 deletions app/backend/stream/stream_media.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ struct stream_media_session_t {
stream_manager_t *manager;
SDL_mutex *lock;
SS4S_Player *player;
SS4S_VideoCapabilities video_cap;

SS4S_VideoInfo video_info;
OpusMSDecoder *opus_decoder;
Expand Down Expand Up @@ -57,6 +58,8 @@ stream_media_session_t *stream_media_create(stream_manager_t *manager) {
media_session->manager = manager;
media_session->lock = SDL_CreateMutex();
media_session->player = SS4S_PlayerOpen();

SS4S_GetVideoCapabilities(&media_session->video_cap);
return media_session;
}

Expand All @@ -80,8 +83,7 @@ void stream_media_set_overlay_height(stream_media_session_t *media_session, int
}

void stream_media_set_overlay_shown(stream_media_session_t *media_session, bool overlay) {
SS4S_VideoCapabilities cap = SS4S_GetVideoCapabilities();
if (cap & SS4S_VIDEO_CAP_TRANSFORM_UI_COMPOSITING) {
if (media_session->video_cap.transform & SS4S_VIDEO_CAP_TRANSFORM_UI_COMPOSITING) {
return;
}
if (overlay) {
Expand All @@ -107,8 +109,7 @@ void stream_media_set_overlay_shown(stream_media_session_t *media_session, bool
}

bool stream_media_supports_hevc(stream_media_session_t *media_session) {
(void) media_session;
return SS4S_GetVideoCapabilities() & SS4S_VIDEO_CAP_CODEC_H265;
return media_session->video_cap.codecs & SS4S_VIDEO_H265;
}

const IHS_StreamAudioCallbacks *stream_media_audio_callbacks() {
Expand Down
3 changes: 1 addition & 2 deletions app/lvgl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ target_sources(ihsplay PRIVATE
keypad.c
theme.c)

add_subdirectory(ext)
add_subdirectory(widgets)
add_subdirectory(ext)
1 change: 0 additions & 1 deletion app/lvgl/widgets/CMakeLists.txt

This file was deleted.

7 changes: 0 additions & 7 deletions app/lvgl/widgets/gridview/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 28acff2

Please sign in to comment.