mirror of
https://github.com/thinkonmay/sunshine-sdk.git
synced 2025-12-26 06:32:31 +00:00
trim log, prefer winrt API
This commit is contained in:
parent
78611c9aa4
commit
a65c9be80d
@ -408,7 +408,7 @@ namespace config {
|
||||
|
||||
sunshine_t sunshine {
|
||||
"en", // locale
|
||||
0, // min_log_level
|
||||
2, // min_log_level
|
||||
0, // flags
|
||||
{}, // User file
|
||||
{}, // Username
|
||||
|
||||
@ -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];
|
||||
}
|
||||
@ -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(),
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user