0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 04:42:18 +02:00

Output version/commit to RTMP stream metadata

Might come in useful for debugging issues later on.
This commit is contained in:
jp9000 2014-07-01 13:11:15 -07:00
parent c7bb73fe07
commit 5c5f63e8b8
2 changed files with 18 additions and 2 deletions

View File

@ -17,6 +17,7 @@
#include <obs.h>
#include <stdio.h>
#include <util/dstr.h>
#include <util/array-serializer.h>
#include "flv-mux.h"
#include "obs-output-ver.h"
@ -65,6 +66,7 @@ static void build_flv_meta_data(obs_output_t context,
char buf[4096];
char *enc = buf;
char *end = enc+sizeof(buf);
struct dstr encoder_name = {0};
enc_str(&enc, end, "onMetaData");
@ -89,7 +91,21 @@ static void build_flv_meta_data(obs_output_t context,
(double)audio_output_channels(audio));
enc_bool_val(&enc, end, "stereo", audio_output_channels(audio) == 2);
enc_str_val(&enc, end, "encoder", MODULE_NAME);
dstr_printf(&encoder_name, "%s (libobs version %d.%d.%d",
MODULE_NAME,
LIBOBS_API_MAJOR_VER,
LIBOBS_API_MINOR_VER,
LIBOBS_API_PATCH_VER);
#ifdef HAVE_OBSCONFIG_H
dstr_catf(&encoder_name, ", %s", OBS_VERSION);
#endif
dstr_cat(&encoder_name, ")");
enc_str_val(&enc, end, "encoder", encoder_name.array);
dstr_free(&encoder_name);
*enc++ = 0;
*enc++ = 0;

View File

@ -1,3 +1,3 @@
#pragma once
#define MODULE_NAME "Open Broadcast Studio obs-output plugin 0.0.1"
#define MODULE_NAME "obs-output module"