0437f1bef3
Features, Fixes, etc: - Added encoding 'Mode' selection which allows users to choose between Normal (Single Frame), Temporal (Single + Last Frame) and Sequential (VFW Default). - Fixed several compiler warnings with mismatched types and unused variables. - 'Keyframe Interval' and 'Bitrate' now default to 0 (Encoder decides). - 'Quality' now defaults to 100.0%. - Added default Quality and Keyframe Interval to log. - 'Bitrate', 'Quality', 'Configure' and 'About' are hidden when the encoder does not support them. - Encoder States are stored in-memory during an OBS session. ToDo: - Save/Load encoder state from disk.
43 lines
1.3 KiB
C
43 lines
1.3 KiB
C
#pragma once
|
|
#include "libobs/obs-module.h"
|
|
#include <stdint.h>
|
|
#include <inttypes.h>
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
// Macro Definitions //
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
// Utility
|
|
#define vstr(s) dstr(s)
|
|
#define dstr(s) #s
|
|
#define clamp(val,low,high) (val > high ? high : (val < low ? low : val))
|
|
#ifndef __FUNCTION_NAME__
|
|
#if defined(_WIN32) || defined(_WIN64) //WINDOWS
|
|
#define __FUNCTION_NAME__ __FUNCTION__
|
|
#else //*NIX
|
|
#define __FUNCTION_NAME__ __func__
|
|
#endif
|
|
#endif
|
|
|
|
// Plugin
|
|
#define PLUGIN_NAME "Video For Windows"
|
|
#include "Version.h"
|
|
|
|
// Logging
|
|
#define PLOG(level, ...) blog(level, "[VFW] " __VA_ARGS__);
|
|
#define PLOG_ERROR(...) PLOG(LOG_ERROR, __VA_ARGS__)
|
|
#define PLOG_WARNING(...) PLOG(LOG_WARNING, __VA_ARGS__)
|
|
#define PLOG_INFO(...) PLOG(LOG_INFO, __VA_ARGS__)
|
|
#define PLOG_DEBUG(...) PLOG(LOG_DEBUG, __VA_ARGS__)
|
|
|
|
// Properties
|
|
#define PROP_BITRATE "Bitrate"
|
|
#define PROP_QUALITY "Quality"
|
|
#define PROP_KEYFRAME_INTERVAL "KeyframeInterval"
|
|
#define PROP_MODE "Mode"
|
|
#define PROP_MODE_NORMAL "Mode.Normal"
|
|
#define PROP_MODE_TEMPORAL "Mode.Temporal"
|
|
#define PROP_MODE_SEQUENTIAL "Mode.Sequential"
|
|
|
|
#define PROP_CONFIGURE "Configure"
|
|
#define PROP_ABOUT "About" |