encoders/generic: Reduce warnings, fix encoding, remove threading options, and profiling

* Improved encoding loop can now deal with early and late receive requests.
* Lots of warnings fixed.
* Removed all threading options (they were broken anyway).
* Added some profiler calls.
This commit is contained in:
Michael Fabian 'Xaymar' Dirks
2019-07-07 00:34:56 +02:00
parent 16015f180b
commit 976e5dba4f
3 changed files with 179 additions and 185 deletions
+7 -3
View File
@@ -17,7 +17,10 @@
#pragma once
#include <condition_variable>
#include <encoder.hpp>
#include <mutex>
#include <thread>
#include "ffmpeg/avframe-queue.hpp"
#include "ffmpeg/swscale.hpp"
@@ -48,8 +51,6 @@ namespace encoder {
public:
static bool modified_ratecontrol_properties(void* priv, obs_properties_t* props, obs_property_t* prop,
obs_data_t* settings);
static bool modified_threading_properties(void* priv, obs_properties_t* props, obs_property_t* prop,
obs_data_t* settings);
};
class generic {
@@ -72,7 +73,6 @@ namespace encoder {
virtual ~generic();
// Shared
void get_properties(obs_properties_t* props);
bool update(obs_data_t* settings);
@@ -95,5 +95,9 @@ namespace encoder {
bool video_encode_texture(uint32_t handle, int64_t pts, uint64_t lock_key, uint64_t* next_key,
struct encoder_packet* packet, bool* received_packet);
int receive_packet(bool* received_packet, struct encoder_packet* packet);
int send_frame(AVFrame* frame);
};
} // namespace encoder