Skip to content

Commit

Permalink
Switch Raspi to dynamically load ffmpeg (youtube#504)
Browse files Browse the repository at this point in the history
This saves a significant amount of apparent reported RSS memory
when preloading Cobalt, as ffmpeg grabs nearly 10MB of memory.

b/285130256
  • Loading branch information
kaidokert committed May 31, 2023
1 parent f2f67a5 commit b811afb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions starboard/raspi/2/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ gcc_toolchain("target") {
# We use whatever 'ar' resolves to.
ar = gcc_toolchain_ar

tail_lib_dependencies = "-l:libpthread.so.0"
tail_lib_dependencies = "-l:libpthread.so.0 -l:libdl.so.2"

toolchain_args = {
is_clang = false
Expand All @@ -38,7 +38,7 @@ gcc_toolchain("native_target") {
# We use whatever 'ar' resolves to.
ar = gcc_toolchain_ar

tail_lib_dependencies = "-l:libpthread.so.0"
tail_lib_dependencies = "-l:libpthread.so.0 -l:libdl.so.2"

toolchain_args = {
is_starboard = false
Expand Down
2 changes: 1 addition & 1 deletion starboard/raspi/shared/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ static_library("starboard_platform_sources") {
":starboard_base_symbolize",
"//starboard:starboard_headers_only",
"//starboard/common",
"//starboard/shared/ffmpeg:ffmpeg_linked",
"//starboard/shared/ffmpeg:ffmpeg_dynamic_load",
"//starboard/shared/starboard/media:media_util",
"//starboard/shared/starboard/player/filter:filter_based_player_sources",
]
Expand Down
4 changes: 1 addition & 3 deletions starboard/raspi/shared/platform_configuration/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,7 @@ config("compiler_flags") {
config("platform_configuration") {
libs = [
"asound",
"avcodec",
"avformat",
"avutil",
"dl",
"pthread",
"rt",
"openmaxil",
Expand Down

0 comments on commit b811afb

Please sign in to comment.