trim log, prefer winrt API

This commit is contained in:
pigeatgarlic 2025-01-04 23:23:09 +00:00
parent 78611c9aa4
commit a65c9be80d
5 changed files with 26 additions and 26 deletions

View File

@ -408,7 +408,7 @@ namespace config {
sunshine_t sunshine {
"en", // locale
0, // min_log_level
2, // min_log_level
0, // flags
{}, // User file
{}, // Username

View File

@ -77,6 +77,6 @@ peek_event(Queue* memory, EventType type){
Event
pop_event(Queue* queue, EventType type){
queue->events[type].read = true;
BOOST_LOG(info) << "Receive event " << type << ", value: "<< queue->events[type].value_number;
BOOST_LOG(debug) << "Receive event " << type << ", value: "<< queue->events[type].value_number;
return queue->events[type];
}

View File

@ -197,10 +197,16 @@ main(int argc, char *argv[]) {
queue->metadata.active = 1;
auto last_timestamp = std::chrono::high_resolution_clock::now().time_since_epoch().count();
bool first_video_packet = true;
while (!process_shutdown_event->peek() && !local_shutdown->peek()) {
if (queue_type == QueueType::Video0 || queue_type == QueueType::Video1) {
do {
auto packet = video_packets->pop();
if (packet->is_idr() != 0 && first_video_packet) {
BOOST_LOG(info) << "idr frame";
first_video_packet = false;
}
auto timestamp = packet->frame_timestamp.value().time_since_epoch().count();
push_packet(queue,packet->data(),packet->data_size(),PacketMetadata{
packet->is_idr(),

View File

@ -963,37 +963,33 @@ namespace platf::dxgi {
namespace platf {
std::shared_ptr<display_t>
display(mem_type_e hwdevice_type, const std::string &display_name, const video::config_t &config) {
if (true || config::video.capture.empty()) {
if (hwdevice_type == mem_type_e::dxgi) {
auto disp = std::make_shared<dxgi::display_ddup_vram_t>();
if (hwdevice_type == mem_type_e::dxgi) {
auto disp = std::make_shared<dxgi::display_wgc_vram_t>();
if (!disp->init(config, display_name)) {
return disp;
}
if (!disp->init(config, display_name)) {
return disp;
}
else if (hwdevice_type == mem_type_e::system) {
auto disp = std::make_shared<dxgi::display_ddup_ram_t>();
}
else if (hwdevice_type == mem_type_e::system) {
auto disp = std::make_shared<dxgi::display_wgc_ram_t>();
if (!disp->init(config, display_name)) {
return disp;
}
if (!disp->init(config, display_name)) {
return disp;
}
}
if (false || config::video.capture.empty()) {
if (hwdevice_type == mem_type_e::dxgi) {
auto disp = std::make_shared<dxgi::display_wgc_vram_t>();
if (hwdevice_type == mem_type_e::dxgi) {
auto disp = std::make_shared<dxgi::display_ddup_vram_t>();
if (!disp->init(config, display_name)) {
return disp;
}
if (!disp->init(config, display_name)) {
return disp;
}
else if (hwdevice_type == mem_type_e::system) {
auto disp = std::make_shared<dxgi::display_wgc_ram_t>();
}
else if (hwdevice_type == mem_type_e::system) {
auto disp = std::make_shared<dxgi::display_ddup_ram_t>();
if (!disp->init(config, display_name)) {
return disp;
}
if (!disp->init(config, display_name)) {
return disp;
}
}

View File

@ -1810,7 +1810,6 @@ namespace video {
}
if (idr_events->peek()) {
BOOST_LOG(info) << "idr frame"sv;
requested_idr_frame = true;
idr_events->pop();
}
@ -2067,7 +2066,6 @@ namespace video {
}
if (ctx->idr_events->peek()) {
BOOST_LOG(info) << "idr frame"sv;
pos->session->request_idr_frame();
ctx->idr_events->pop();
}