Skip to content

Commit

Permalink
[plugin] Fix Linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmercerind committed Aug 13, 2021
1 parent 7c05a58 commit 4eca6fe
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
7 changes: 2 additions & 5 deletions lib/src/widgets/video.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,13 +238,10 @@ class _VideoStateFallback extends _VideoStateBase {
?.stream
.listen((VideoFrame videoFrame) async {
videoFrameRawImage = await getVideoFrameRawImage(videoFrame);
if (mounted) setState(() {});
});

super.initState();

if (mounted) {
setState(() {});
}
if (mounted) setState(() {});
}

Widget present() {
Expand Down
21 changes: 11 additions & 10 deletions linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
cmake_minimum_required(VERSION 3.10)
set (CMAKE_CXX_STANDARD 17)

set(PROJECT_NAME dart_vlc)
project(${PROJECT_NAME} LANGUAGES CXX)
set(PLUGIN_NAME dart_vlc_plugin)
include_directories(${PLUGIN_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
add_library(${PLUGIN_NAME} SHARED
dart_vlc_plugin.cc
)

set(PACKAGE dartvlc)
add_library(${PACKAGE} SHARED
../ffi/native/dart_vlc.cpp
Expand All @@ -23,6 +33,7 @@ set(LIBVLCPP_SOURCE ${LIBVLC_PACKAGE_DIR}/libvlcpp-master)
add_custom_target(LIBVLC_EXTRACT ALL)

if (NOT EXISTS ${LIBVLCPP_SOURCE})
file(MAKE_DIRECTORY ${LIBVLC_PACKAGE_DIR})
add_custom_command(
TARGET LIBVLC_EXTRACT PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E tar xzf \"${LIBVLCPP_ARCHIVE}\"
Expand All @@ -49,16 +60,6 @@ target_link_libraries(${PACKAGE} PRIVATE

# Not used Flutter plugin template.

set(PROJECT_NAME dart_vlc)
project(${PROJECT_NAME} LANGUAGES CXX)
set(PLUGIN_NAME dart_vlc_plugin)
include_directories(${PLUGIN_NAME} INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
add_library(${PLUGIN_NAME} SHARED
dart_vlc_plugin.cc
)

apply_standard_settings(${PLUGIN_NAME})
set_target_properties(${PLUGIN_NAME} PROPERTIES
CXX_VISIBILITY_PRESET hidden)
Expand Down

0 comments on commit 4eca6fe

Please sign in to comment.