obs-studio/libobs/obs-defs.h
jp9000 29b7d3621c Add preliminary output/encoder interface
- 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.
2014-01-16 22:34:51 -07:00

37 lines
1.6 KiB
C

/******************************************************************************
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#pragma once
/* Maximum number of source channels for output and per display */
#define MAX_CHANNELS 32
#define MODULE_SUCCESS 0
#define MODULE_ERROR -1
#define MODULE_FILENOTFOUND -2
#define MODULE_FUNCTIONNOTFOUND -3
#define MODULE_INCOMPATIBLE_VER -4
#define SOURCE_VIDEO (1<<0) /* Source has video */
#define SOURCE_AUDIO (1<<1) /* Source has audio */
#define SOURCE_ASYNC_VIDEO (1<<2) /* Async video (use with SOURCE_VIDEO) */
#define SOURCE_DEFAULT_EFFECT (1<<3) /* Source uses default/filter effect */
#define SOURCE_YUV (1<<4) /* Source is in YUV color space */
#define OUTPUT_VIDEO_ENCODER (1<<0) /* Output requires a video encoder */
#define OUTPUT_AUDIO_ENCODER (1<<1) /* Ouptut requires an audio encoder */