Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM alpine:3.21 AS builder
ARG WOLFI_IMAGE=public.ecr.aws/amagi-media-labs-sec/secure-container-base/wolfi-base

RUN apk add ffmpeg-dev git g++ cmake build-base curl-dev openssl-dev libssl3 boost-dev perl bash automake autoconf libtool
FROM ${WOLFI_IMAGE} AS builder

RUN apk add --no-cache \
ffmpeg-dev git gcc cmake build-base \
curl-dev openssl-dev boost-dev \
perl bash automake autoconf libtool

# We build dependencies first because they'll probably change less often than src/
# so we can use Docker build cache to save some time
Expand All @@ -19,8 +24,8 @@ COPY .git /build/.git
RUN make -C /build -j `nproc`


FROM alpine:3.21
FROM ${WOLFI_IMAGE}

RUN apk add ffmpeg libcurl libssl3 musl boost-thread
RUN apk add --no-cache ffmpeg libcurl-openssl4 boost-thread
COPY --from=builder /build/avplumber /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/avplumber"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ nodes_list_file = graph_factory.generated.cpp
CPPSRC = avplumber.cpp util.cpp avutils.cpp graph_core.cpp graph_mgmt.cpp stats.cpp output_control.cpp instance_shared.cpp hwaccel_mgmt.cpp EventLoop.cpp TickSource.cpp rest_client.cpp mixer/mixer_orchestrator.cpp
DEPS_LIBS = deps/cpr/build/lib/libcpr.a deps/avcpp/build/src/libavcpp.a
# Python extension links via PYTHON_MODULE_EXTRA_LFLAGS (python3-config; -lpython3 is not a valid soname on many distros).
LIBS_FLAGS = -lpthread -lcurl -lssl -lcrypto -lboost_thread -lboost_system -lavcodec -lavfilter -lavutil -lavformat -lavdevice -lswscale -lswresample -ldl -lz
LIBS_FLAGS = -lpthread -lcurl -lssl -lcrypto -lboost_thread -lavcodec -lavfilter -lavutil -lavformat -lavdevice -lswscale -lswresample -ldl -lz

ifeq ($(HAVE_JACK),1)
NODES_SRC += $(shell find $(SRCDIR)/nodes/jack -maxdepth 1 -name '*.cpp')
Expand Down
11 changes: 6 additions & 5 deletions src/avplumber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#include <atomic>
#include <thread>
#include <chrono>
#include <boost/asio/io_service.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/post.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/streambuf.hpp>
#include <boost/asio/read_until.hpp>
Expand Down Expand Up @@ -1127,13 +1128,13 @@ class TcpControlServer: public ControlServerBase {
ControlImpl &control;
TcpControlServer &server;
std::list<std::shared_ptr<Client>>::iterator iter;
boost::asio::io_service &io_service;
boost::asio::io_context &io_service;
tcp::socket socket;
boost::asio::streambuf buff;
ClientPipe pipe;
std::thread thread;
bool closing = false;
Client(ControlImpl &_control, TcpControlServer &_server, boost::asio::io_service &_io_service):
Client(ControlImpl &_control, TcpControlServer &_server, boost::asio::io_context &_io_service):
control(_control), server(_server), io_service(_io_service), socket(_io_service),
pipe([this]() {
postToClient();
Expand All @@ -1147,7 +1148,7 @@ class TcpControlServer: public ControlServerBase {
}
void postToClient() {
auto self = shared_from_this();
io_service.post([self]() {
boost::asio::post(io_service, [self]() {
self->sendToClient();
});
}
Expand Down Expand Up @@ -1206,7 +1207,7 @@ class TcpControlServer: public ControlServerBase {
};

ControlImpl &control_;
boost::asio::io_service io_service_;
boost::asio::io_context io_service_;
tcp::acceptor acceptor_;
// clients_ is mutated only from the io_service thread (net_thread_):
// accept() inserts, Client::closeAndRemove() erases via the saved iterator.
Expand Down
Loading