# Project-level configuration.
cmake_minimum_required(VERSION 3.14)
project(flutter_hwnd_video_render_example LANGUAGES CXX)
# The name of the executable created for the application. Change this to change
# the on-disk name of your application.
set(BINARY_NAME "flutter_hwnd_video_render_example")
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
# versions of CMake.
cmake_policy(SET CMP0063 NEW)
# Define build configuration option.
get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(IS_MULTICONFIG)
set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release"
CACHE STRING "" FORCE)
else()
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
set(CMAKE_BUILD_TYPE "Debug" CACHE
STRING "Flutter build mode" FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
"Debug" "Profile" "Release")
endif()
endif()
# Define settings for the Profile build mode.
set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}")
# Use Unicode for all projects.
add_definitions(-DUNICODE -D_UNICODE)
# Compilation settings that should be applied to most targets.
#
# Be cautious about adding new options here, as plugins use this function by
# default. In most cases, you should add new options to specific targets instead
# of modifying this function.
function(APPLY_STANDARD_SETTINGS TARGET)
target_compile_features(${TARGET} PUBLIC cxx_std_17)
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100")
target_compile_options(${TARGET} PRIVATE /EHsc)
target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0")
target_compile_definitions(${TARGET} PRIVATE "$<$<CONFIG:Debug>:_DEBUG>")
endfunction()
# Flutter library and tool build rules.
set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter")
add_subdirectory(${FLUTTER_MANAGED_DIR})
# Application build; see runner/CMakeLists.txt.
add_subdirectory("runner")
# Generated plugin build rules, which manage building the plugins and adding
# them to the application.
include(flutter/generated_plugins.cmake)
# === Installation ===
# Support files are copied into place next to the executable, so that it can
# run in place. This is done instead of making a separate bundle (as on Linux)
# so that building and running from within Visual Studio will work.
set(BUILD_BUNDLE_DIR "$<TARGET_FILE_DIR:${BINARY_NAME}>")
# Make the "install" step default, as it's required to run.
set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1)
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
endif()
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
COMPONENT Runtime)
install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
COMPONENT Runtime)
install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
if(PLUGIN_BUNDLED_LIBRARIES)
install(FILES "${PLUGIN_BUNDLED_LIBRARIES}"
DESTINATION "${INSTALL_BUNDLE_LIB_DIR}"
COMPONENT Runtime)
endif()
# Fully re-copy the assets directory on each build to avoid having stale files
# from a previous install.
set(FLUTTER_ASSET_DIR_NAME "flutter_assets")
install(CODE "
file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\")
" COMPONENT Runtime)
install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}"
DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime)
# Install the AOT library on non-Debug builds only.
install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}"
CONFIGURATIONS Profile;Release
COMPONENT Runtime)
#=============Copy Source files to Build Runtime Dir===============
#该内容一般放在项目顶层CMakelists.txt的最后,
#目的是将项目生成后的执行文件所需的第三方库复制到执行程序目录,
#并区分Debug和Release版本。
FILE(GLOB Plugin_Runtime_Debug_DLL_FILES CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/../ffi/sdk/bin/*.dll
${CMAKE_CURRENT_SOURCE_DIR}/../ffi/play/AC.dll
)
FILE(GLOB Plugin_Runtime_Release_DLL_FILES CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/../ffi/sdk/bin/*.dll
${CMAKE_CURRENT_SOURCE_DIR}/../ffi/play/AC.dll
)
add_custom_target(PapsClientCopyRuntimeFiles ALL
VERBATIM
COMMAND_EXPAND_LISTS
# COMMAND ${CMAKE_COMMAND} -E
# make_directory "${BUILD_BUNDLE_DIR}/$<$<CONFIG:Release>:Release>$<$<CONFIG:Debug>:Debug>/"
COMMAND ${CMAKE_COMMAND} -E
copy_if_different
"$<$<CONFIG:Release>:${Plugin_Runtime_Release_DLL_FILES}>"
"$<$<CONFIG:Debug>:${Plugin_Runtime_Debug_DLL_FILES}>"
"${BUILD_BUNDLE_DIR}"
)
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
使用flutter在Windows上渲染视频,目前掌握的至少有2种方法(第二章、第四章),但是性能都不是最佳,而且需要将数据转换成rgba才能渲染。如果能使用win32窗口,直接通过句柄渲染,那就可以达到与原生Windows渲染使用一致的效果,可以使用sdl渲染yuv,以及dxva2解码后d3d9表面直接渲染到窗口全程在gpu上操作。本文将介绍如何在flutter程序嵌入win32窗口并且渲染视频。但是需要注意的是目前的实现**只支持win10及以上版本**,本资源为文章附件资源,原文链接:https://blog.csdn.net/u013113678/article/details/131775523
资源推荐
资源详情
资源评论
收起资源包目录
Flutter Windows通过嵌入Native窗口实现渲染视频 (285个子文件)
generated_plugin_registrant.cc 339B
SDL_config.h.cmake 18KB
generated_plugins.cmake 765B
win32_window.cpp 9KB
flutter_window.cpp 2KB
utils.cpp 2KB
main.cpp 1KB
ac_play_ffi_import.dart 29KB
windows_native_helper.dart 6KB
main.dart 2KB
windows_native_widget.dart 2KB
widget_test.dart 1KB
dispose_detector.dart 999B
isolate_helper.dart 630B
avcodec-58.dll 42.87MB
avformat-58.dll 10.81MB
avfilter-7.dll 10.36MB
avdevice-58.dll 2.63MB
SDL2.dll 1.4MB
avutil-56.dll 1.01MB
swscale-5.dll 544KB
swresample-3.dll 419KB
postproc-55.dll 132KB
AC.dll 93KB
.gitignore 745B
.gitignore 308B
SDL_opengl_glext.h 714KB
avcodec.h 145KB
avformat.h 115KB
SDL_opengles2_gl2ext.h 96KB
SDL_opengl.h 81KB
SDL_egl.h 72KB
SDL_hints.h 56KB
mfxstructures.h 52KB
SDL_video.h 45KB
SDL_render.h 44KB
avfilter.h 41KB
SDL_haptic.h 38KB
opt.h 36KB
SDL_audio.h 35KB
pixfmt.h 34KB
avio.h 32KB
frame.h 32KB
SDL_opengles2_gl2.h 31KB
SDL_events.h 30KB
hwcontext.h 24KB
mem.h 23KB
packet.h 22KB
SDL_stdinc.h 22KB
swresample.h 21KB
SDL_surface.h 20KB
intreadwrite.h 18KB
common.h 18KB
avdevice.h 17KB
SDL_pixels.h 17KB
codec.h 16KB
pixdesc.h 16KB
mfxfei.h 16KB
SDL_keycode.h 15KB
SDL_scancode.h 15KB
codec_id.h 15KB
avstring.h 14KB
SDL_gamecontroller.h 14KB
SDL_joystick.h 14KB
SDL_thread.h 13KB
SDL_test_fuzzer.h 13KB
hdr_dynamic_metadata.h 12KB
log.h 12KB
swscale.h 12KB
mfxplugin.h 11KB
imgutils.h 11KB
buffer.h 11KB
SDL_assert.h 11KB
bsf.h 11KB
SDL_mouse.h 11KB
SDL_atomic.h 11KB
SDL_vulkan.h 11KB
SDL_system.h 10KB
samplefmt.h 10KB
SDL_opengles2_khrplatform.h 10KB
channel_layout.h 9KB
avutil.h 9KB
SDL_syswm.h 9KB
SDL_rwops.h 9KB
SDL_cpuinfo.h 9KB
hash.h 8KB
dict.h 8KB
spherical.h 8KB
mathematics.h 8KB
bprint.h 8KB
mfxdefs.h 8KB
parseutils.h 7KB
SDL_sensor.h 7KB
mfxcamera.h 7KB
hwcontext_vulkan.h 7KB
codec_par.h 7KB
encryption_info.h 7KB
SDL_config.h 7KB
mfxfeihevc.h 7KB
SDL_mutex.h 7KB
共 285 条
- 1
- 2
- 3
资源评论
- zsl3207232023-12-17果断支持这个资源,资源解决了当前遇到的问题,给了新的灵感,感谢分享~
- weixin_404824312023-09-18终于找到了超赞的宝藏资源,果断冲冲冲,支持!
- qq_373280162023-08-31感谢大佬分享的资源,对我启发很大,给了我新的灵感。
- liuxuepeng1112023-10-24资源很受用,资源主总结的很全面,内容与描述一致,解决了我当下的问题。
- Onetheway19902023-08-18资源很赞,希望多一些这类资源。
CodeOfCC
- 粉丝: 674
- 资源: 71
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 储能变流器(双向) 包含dcdc?dcac两部分 功率双向流动 可并网,也可改为离网状态下带三相负载 模型很灵活,可拓展使用
- Django-4.2.17最新正式版
- Mysql 5.7.10 osx 10.10 x86-64
- 该模型是内置式的MTPA控制,速度环的输出为给定转矩,然后方式1通过求解MTPA方程得到dq给定电流,方式2进行工程近似得到dq给定电流,并外和id=0控制进行比较
- win32汇编环境,怎么进行除法运算的
- 软件工程;软件工程导论第六版 第一章思维导图
- MySQL基础之MeCab 全文解析插件.pdf
- 太行山南部平顺党参GIES案例数据集
- STM32F系列兼容西门子S7 200PLC源码 CPU:STM32F103RCT6(或其他STM32F103系列大容量芯片) 开发平台:keilMDK5 PLC型号:CPU224XP或226
- 东方通应用服务器TongWeb V7.0的安装指南和技术特点
- 高通调试工具使用手册,仅供参考!
- 模拟ic设计,smic0.18um的锁相环电路,较简单的结构,适合入门学习,可以直接仿真,输出结果较为理想,锁定频率在400M附近,内置环形的VCO 相对简单的电路,入门学习用
- 毕业设计报告《基于深度学习的手势识别系统》.docx
- 机器学习大作业基于线性回归的PM2.5预测python源码+文档说明(高分项目)
- 中国江西省九江气象站月/年平均气温数据集(1924-2023)
- IEEE69节点配电网simulink模型,可以加入风机光伏等新能源设备,SVC等无功补偿设备
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功