Implement settings interface for plugins
Add a fairly easy to use settings interface that can be passed to plugins, and replaced the old character string system that was being used before. The new data interface allows for an easier method of getting/altering settings for plugins, and is built to be serializable to/from JSON. Also, removed another wxFormBuilder file that was no longer in use.
This commit is contained in:
@@ -293,7 +293,7 @@ const char *ffmpeg_output_getname(const char *locale)
|
||||
return "FFmpeg file output";
|
||||
}
|
||||
|
||||
struct ffmpeg_output *ffmpeg_output_create(const char *settings,
|
||||
struct ffmpeg_output *ffmpeg_output_create(obs_data_t settings,
|
||||
obs_output_t output)
|
||||
{
|
||||
struct ffmpeg_output *data = bmalloc(sizeof(struct ffmpeg_output));
|
||||
@@ -312,7 +312,7 @@ void ffmpeg_output_destroy(struct ffmpeg_output *data)
|
||||
}
|
||||
}
|
||||
|
||||
void ffmpeg_output_update(struct ffmpeg_output *data, const char *settings)
|
||||
void ffmpeg_output_update(struct ffmpeg_output *data, obs_data_t settings)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -49,12 +49,12 @@ struct ffmpeg_output {
|
||||
|
||||
EXPORT const char *ffmpeg_output_getname(const char *locale);
|
||||
|
||||
EXPORT struct ffmpeg_output *ffmpeg_output_create(const char *settings,
|
||||
EXPORT struct ffmpeg_output *ffmpeg_output_create(obs_data_t settings,
|
||||
obs_output_t output);
|
||||
EXPORT void ffmpeg_output_destroy(struct ffmpeg_output *data);
|
||||
|
||||
EXPORT void ffmpeg_output_update(struct ffmpeg_output *data,
|
||||
const char *settings);
|
||||
obs_data_t settings);
|
||||
|
||||
EXPORT bool ffmpeg_output_start(struct ffmpeg_output *data);
|
||||
EXPORT void ffmpeg_output_stop(struct ffmpeg_output *data);
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@ const char *obs_x264_getname(const char *locale)
|
||||
return "x264 (Software)";
|
||||
}
|
||||
|
||||
struct obs_x264 *obs_x264_create(const char *settings, obs_encoder_t encoder)
|
||||
struct obs_x264 *obs_x264_create(obs_data_t settings, obs_encoder_t encoder)
|
||||
{
|
||||
struct obs_x264 *data = bmalloc(sizeof(struct obs_x264));
|
||||
}
|
||||
@@ -32,7 +32,7 @@ void obs_x264_destroy(struct obs_x264 *data)
|
||||
{
|
||||
}
|
||||
|
||||
void obs_x264_update(struct obs_x264 *data, const char *settings)
|
||||
void obs_x264_update(struct obs_x264 *data, obs_data_t settings)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -31,11 +31,11 @@ struct obs_x264 {
|
||||
|
||||
EXPORT const char *obs_x264_getname(const char *locale);
|
||||
|
||||
EXPORT struct obs_x264 *obs_x264_create(const char *settings,
|
||||
EXPORT struct obs_x264 *obs_x264_create(obs_data_t settings,
|
||||
obs_encoder_t encoder);
|
||||
EXPORT void obs_x264_destroy(struct obs_x264 *data);
|
||||
|
||||
EXPORT void obs_x264_update(struct obs_x264 *data, const char *settings);
|
||||
EXPORT void obs_x264_update(struct obs_x264 *data, obs_data_t settings);
|
||||
|
||||
EXPORT void obs_x264_reset(struct obs_x264 *data);
|
||||
|
||||
|
@@ -23,7 +23,7 @@ const char *rtmp_stream_getname(const char *locale)
|
||||
return "RTMP Stream";
|
||||
}
|
||||
|
||||
void *rtmp_stream_create(const char *settings, obs_output_t output)
|
||||
void *rtmp_stream_create(obs_data_t settings, obs_output_t output)
|
||||
{
|
||||
struct rtmp_stream *stream = bmalloc(sizeof(struct rtmp_stream));
|
||||
memset(stream, 0, sizeof(struct rtmp_stream));
|
||||
@@ -33,7 +33,7 @@ void rtmp_stream_destroy(struct rtmp_stream *stream)
|
||||
{
|
||||
}
|
||||
|
||||
void rtmp_stream_update(struct rtmp_stream *stream, const char *settings)
|
||||
void rtmp_stream_update(struct rtmp_stream *stream, obs_data_t settings)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -30,10 +30,9 @@ struct rtmp_stream {
|
||||
};
|
||||
|
||||
EXPORT const char *rtmp_stream_getname(const char *locale);
|
||||
EXPORT void *rtmp_stream_create(const char *settings, obs_output_t output);
|
||||
EXPORT void *rtmp_stream_create(obs_data_t settings, obs_output_t output);
|
||||
EXPORT void rtmp_stream_destroy(struct rtmp_stream *stream);
|
||||
EXPORT void rtmp_stream_update(struct rtmp_stream *stream,
|
||||
const char *settings);
|
||||
EXPORT void rtmp_stream_update(struct rtmp_stream *stream, obs_data_t settings);
|
||||
EXPORT bool rtmp_stream_start(struct rtmp_stream *stream);
|
||||
EXPORT void rtmp_stream_stop(struct rtmp_stream *stream);
|
||||
EXPORT bool rtmp_stream_active(struct rtmp_stream *stream);
|
||||
|
Reference in New Issue
Block a user