Skip to content

Commit

Permalink
Revert "更新ffmpeg lib"
Browse files Browse the repository at this point in the history
This reverts commit f4cd3aa.
  • Loading branch information
qiin2333 committed Dec 28, 2024
1 parent f4cd3aa commit 56bcaeb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cmake/dependencies/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if(NOT DEFINED FFMPEG_PREPARED_BINARIES)
set(FFMPEG_PLATFORM_LIBRARIES numa va va-drm va-x11 X11)
endif()
set(FFMPEG_PREPARED_BINARIES
"${CMAKE_SOURCE_DIR}/third-party/build-deps/dist/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
"${CMAKE_SOURCE_DIR}/third-party/build-deps/ffmpeg/${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")

# check if the directory exists
if(NOT EXISTS "${FFMPEG_PREPARED_BINARIES}")
Expand Down
8 changes: 4 additions & 4 deletions src/cbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
* @brief Definitions for FFmpeg Coded Bitstream API.
*/
extern "C" {
#include <cbs/cbs_h264.h>
#include <cbs/cbs_h265.h>
#include <cbs/h264_levels.h>
#include <libavcodec/avcodec.h>
#include <libavcodec/cbs_h264.h>
#include <libavcodec/cbs_h265.h>
#include <libavcodec/h264_levels.h>
#include <libavutil/pixdesc.h>
}

Expand Down Expand Up @@ -251,4 +251,4 @@ namespace cbs {

return ((CodedBitstreamH265Context *) ctx->priv_data)->active_sps->vui_parameters_present_flag;
}
} // namespace cbs
} // namespace cbs
18 changes: 6 additions & 12 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace config {
} // namespace nv

namespace amd {
#if !defined(_WIN32) || defined(DOXYGEN)
#ifdef __APPLE__
// values accurate as of 27/12/2022, but aren't strictly necessary for MacOS build
#define AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_SPEED 100
#define AMF_VIDEO_ENCODER_AV1_QUALITY_PRESET_QUALITY 30
Expand Down Expand Up @@ -112,9 +112,6 @@ namespace config {
#define AMF_VIDEO_ENCODER_CABAC 1
#define AMF_VIDEO_ENCODER_CALV 2
#else
#ifdef _GLIBCXX_USE_C99_INTTYPES
#undef _GLIBCXX_USE_C99_INTTYPES
#endif
#include <AMF/components/VideoEncoderAV1.h>
#include <AMF/components/VideoEncoderHEVC.h>
#include <AMF/components/VideoEncoderVCE.h>
Expand Down Expand Up @@ -389,13 +386,10 @@ namespace config {
-1,
}, // vt

{
false, // strict_rc_buffer
}, // vaapi

{}, // capture
{}, // encoder
{}, // adapter_name

{}, // output_name
(int) display_device::parsed_config_t::device_prep_e::no_operation, // display_device_prep
(int) display_device::parsed_config_t::resolution_change_e::automatic, // resolution_change
Expand Down Expand Up @@ -909,8 +903,9 @@ namespace config {
auto do_cmd = prep_cmd.get_optional<std::string>("do"s);
auto undo_cmd = prep_cmd.get_optional<std::string>("undo"s);
auto elevated = prep_cmd.get_optional<bool>("elevated"s);
auto on_session = prep_cmd.get_optional<bool>("on-session"s);

input.emplace_back(do_cmd.value_or(""), undo_cmd.value_or(""), elevated.value_or(false));
input.emplace_back(do_cmd.value_or(""), undo_cmd.value_or(""), elevated.value_or(false), on_session.value_or(false));
}
}

Expand Down Expand Up @@ -1093,11 +1088,10 @@ namespace config {
int_f(vars, "vt_software", video.vt.vt_require_sw, vt::force_software_from_view);
int_f(vars, "vt_realtime", video.vt.vt_realtime, vt::rt_from_view);

bool_f(vars, "vaapi_strict_rc_buffer", video.vaapi.strict_rc_buffer);

string_f(vars, "capture", video.capture);
string_f(vars, "encoder", video.encoder);
string_f(vars, "adapter_name", video.adapter_name);

string_f(vars, "output_name", video.output_name);
sync_idd_f(vars, "output_name", video.output_name);
int_f(vars, "display_device_prep", video.display_device_prep, display_device::parsed_config_t::device_prep_from_view);
Expand Down Expand Up @@ -1422,4 +1416,4 @@ namespace config {

return 0;
}
} // namespace config
} // namespace config
13 changes: 7 additions & 6 deletions src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@ namespace config {
int vt_coder;
} vt;

struct {
bool strict_rc_buffer;
} vaapi;

std::string capture;
std::string encoder;
std::string adapter_name;
Expand Down Expand Up @@ -129,6 +125,7 @@ namespace config {
std::string cert;

std::string sunshine_name;

std::string clients;

std::string file_state;
Expand Down Expand Up @@ -172,13 +169,17 @@ namespace config {
}

struct prep_cmd_t {
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool &&elevated):
prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool &&elevated, bool &&on_session):
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(std::move(elevated)),
on_session(std::move(on_session)) {}
explicit prep_cmd_t(std::string &&do_cmd, std::string &&undo_cmd, bool &&elevated):
do_cmd(std::move(do_cmd)), undo_cmd(std::move(undo_cmd)), elevated(std::move(elevated)) {}
explicit prep_cmd_t(std::string &&do_cmd, bool &&elevated):
do_cmd(std::move(do_cmd)), elevated(std::move(elevated)) {}
std::string do_cmd;
std::string undo_cmd;
bool elevated;
bool on_session;
};
struct sunshine_t {
std::string locale;
Expand Down Expand Up @@ -217,4 +218,4 @@ namespace config {
parse(int argc, char *argv[]);
std::unordered_map<std::string, std::string>
parse_config(const std::string_view &file_content);
} // namespace config
} // namespace config

0 comments on commit 56bcaeb

Please sign in to comment.