(API Change) Rename 'source_frame' + related
For the sake of naming consistency with the rest of obs.h, prefix this structure and associated functions with obs_. Renamed structures: - struct source_frame (now obs_source_frame) Renamed functions: - source_frame_init (now obs_source_frame_init) - source_frame_free (now obs_source_frame_free) - source_frame_create (now obs_source_frame_create) - source_frame_destroy (now obs_source_frame_destroy) Affected functions: - obs_source_output_video - obs_source_get_frame - obs_source_release_frame
This commit is contained in:
24
libobs/obs.h
24
libobs/obs.h
@@ -182,7 +182,7 @@ struct source_audio {
|
||||
* If a YUV format is specified, it will be automatically upsampled and
|
||||
* converted to RGB via shader on the graphics processor.
|
||||
*/
|
||||
struct source_frame {
|
||||
struct obs_source_frame {
|
||||
uint8_t *data[MAX_AV_PLANES];
|
||||
uint32_t linesize[MAX_AV_PLANES];
|
||||
uint32_t width;
|
||||
@@ -708,18 +708,18 @@ EXPORT void obs_source_load(obs_source_t source);
|
||||
|
||||
/** Outputs asynchronous video data */
|
||||
EXPORT void obs_source_output_video(obs_source_t source,
|
||||
const struct source_frame *frame);
|
||||
const struct obs_source_frame *frame);
|
||||
|
||||
/** Outputs audio data (always asynchronous) */
|
||||
EXPORT void obs_source_output_audio(obs_source_t source,
|
||||
const struct source_audio *audio);
|
||||
|
||||
/** Gets the current async video frame */
|
||||
EXPORT struct source_frame *obs_source_get_frame(obs_source_t source);
|
||||
EXPORT struct obs_source_frame *obs_source_get_frame(obs_source_t source);
|
||||
|
||||
/** Releases the current async video frame */
|
||||
EXPORT void obs_source_release_frame(obs_source_t source,
|
||||
struct source_frame *frame);
|
||||
struct obs_source_frame *frame);
|
||||
|
||||
/** Default RGB filter handler for generic effect filters */
|
||||
EXPORT void obs_source_process_filter(obs_source_t filter, effect_t effect,
|
||||
@@ -1127,28 +1127,28 @@ EXPORT const char *obs_service_get_password(obs_service_t service);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
/* Source frame allocation functions */
|
||||
EXPORT void source_frame_init(struct source_frame *frame,
|
||||
EXPORT void obs_source_frame_init(struct obs_source_frame *frame,
|
||||
enum video_format format, uint32_t width, uint32_t height);
|
||||
|
||||
static inline void source_frame_free(struct source_frame *frame)
|
||||
static inline void obs_source_frame_free(struct obs_source_frame *frame)
|
||||
{
|
||||
if (frame) {
|
||||
bfree(frame->data[0]);
|
||||
memset(frame, 0, sizeof(struct source_frame));
|
||||
memset(frame, 0, sizeof(*frame));
|
||||
}
|
||||
}
|
||||
|
||||
static inline struct source_frame *source_frame_create(
|
||||
static inline struct obs_source_frame *obs_source_frame_create(
|
||||
enum video_format format, uint32_t width, uint32_t height)
|
||||
{
|
||||
struct source_frame *frame;
|
||||
struct obs_source_frame *frame;
|
||||
|
||||
frame = (struct source_frame*)bzalloc(sizeof(struct source_frame));
|
||||
source_frame_init(frame, format, width, height);
|
||||
frame = (struct obs_source_frame*)bzalloc(sizeof(*frame));
|
||||
obs_source_frame_init(frame, format, width, height);
|
||||
return frame;
|
||||
}
|
||||
|
||||
static inline void source_frame_destroy(struct source_frame *frame)
|
||||
static inline void obs_source_frame_destroy(struct obs_source_frame *frame)
|
||||
{
|
||||
if (frame) {
|
||||
bfree(frame->data[0]);
|
||||
|
Reference in New Issue
Block a user