29b7d3621c
- First, I redid the output interface for libobs. I feel like it's going in a pretty good direction in terms of design. Right now, the design is so that outputs and encoders are separate. One or more outputs can connect to a specific encoder to receive its data, or the output can connect directly to raw data from libobs output itself, if the output doesn't want to use a designated encoder. Data is received via callbacks set when you connect to the encoder or raw output. Multiple outputs can receive the data from a single encoder context if need be (such as for streaming to multiple channels at once, and/or recording with the same data). When an encoder is first connected to, it will connect to raw output, and start encoding. Additional connections will receive that same data being encoded as well after that. When the last encoder has disconnected, it will stop encoding. If for some reason the encoder needs to stop, it will use the callback with NULL to signal that encoding has stopped. Some of these things may be subject to change in the future, though it feels pretty good with this design so far. Will have to see how well it works out in practice versus theory. - Second, Started adding preliminary RTMP/x264 output plugin code. To speed things up, I might just make a direct raw->FFmpeg output to create a quick output plugin that we can start using for testing all the subsystems.
13 lines
223 B
C
13 lines
223 B
C
#include <string.h>
|
|
#include "obs-outputs.h"
|
|
|
|
static const char *outputs[] = {"rtmp_stream"};
|
|
|
|
const char *enum_outputs(size_t idx)
|
|
{
|
|
if (idx >= sizeof(outputs)/sizeof(const char*))
|
|
return NULL;
|
|
|
|
return outputs[idx];
|
|
}
|