Implement RTMP module (still needs drop code)

- Implement the RTMP output module.  This time around, we just use a
   simple FLV muxer, then just write to the stream with RTMP_Write.
   Easy and effective.

 - Fix the FLV muxer, the muxer now outputs proper FLV packets.

 - Output API:
   * When using encoders, automatically interleave encoded packets
     before sending it to the output.

   * Pair encoders and have them automatically wait for the other to
     start to ensure sync.

   * Change 'obs_output_signal_start_fail' to 'obs_output_signal_stop'
     because it was a bit confusing, and doing this makes a lot more
     sense for outputs that need to stop suddenly (disconnections/etc).

 - Encoder API:
   * Remove some unnecessary encoder functions from the actual API and
     make them internal.  Most of the encoder functions are handled
     automatically by outputs anyway, so there's no real need to expose
     them and end up inadvertently confusing plugin writers.

   * Have audio encoders wait for the video encoder to get a frame, then
     start at the exact data point that the first video frame starts to
     ensure the most accrate sync of video/audio possible.

   * Add a required 'frame_size' callback for audio encoders that
     returns the expected number of frames desired to encode with.  This
     way, the libobs encoder API can handle the circular buffering
     internally automatically for the encoder modules, so encoder
     writers don't have to do it themselves.

 - Fix a few bugs in the serializer interface.  It was passing the wrong
   variable for the data in a few cases.

 - If a source has video, make obs_source_update defer the actual update
   callback until the tick function is called to prevent threading
   issues.
This commit is contained in:
jp9000
2014-04-07 22:00:10 -07:00
parent 7eec72245d
commit 92522d1886
33 changed files with 517 additions and 234 deletions

View File

@@ -78,20 +78,26 @@ extern void obs_properties_apply_settings(obs_properties_t props,
EXPORT obs_property_t obs_properties_add_bool(obs_properties_t props,
const char *name, const char *description);
EXPORT obs_property_t obs_properties_add_int(obs_properties_t props,
const char *name, const char *description,
int min, int max, int step);
EXPORT obs_property_t obs_properties_add_float(obs_properties_t props,
const char *name, const char *description,
double min, double max, double step);
EXPORT obs_property_t obs_properties_add_text(obs_properties_t props,
const char *name, const char *description,
enum obs_text_type type);
EXPORT obs_property_t obs_properties_add_path(obs_properties_t props,
const char *name, const char *description);
EXPORT obs_property_t obs_properties_add_list(obs_properties_t props,
const char *name, const char *description,
enum obs_combo_type type, enum obs_combo_format format);
EXPORT obs_property_t obs_properties_add_color(obs_properties_t props,
const char *name, const char *description);