Add preliminary FLV/RTMP output (incomplete)

- obs-outputs module:  Add preliminary code to send out data, and add
   an FLV muxer.  This time we don't really need to build the packets
   ourselves, we can just use the FLV muxer and send it directly to
   RTMP_Write and it should automatically parse the entire stream for us
   without us having to do much manual code at all.  We'll see how it
   goes.

 - libobs:  Add AVC NAL packet parsing code

 - libobs/media-io:  Add quick helper functions for audio/video to get
   the width/height/fps/samplerate/etc rather than having to query the
   info structures each time.

 - libobs (obs-output.c):  Change 'connect' signal to 'start' and 'stop'
   signals.  'start' now specifies an error code rather than whether it
   simply failed, that way the client can actually know *why* a failure
   occurred.  Added those error codes to obs-defs.h.

 - libobs:  Add a few functions to duplicate/free encoder packets
This commit is contained in:
jp9000
2014-04-01 11:55:18 -07:00
parent ed6fc7b122
commit 0cf9e0cfdd
29 changed files with 1083 additions and 63 deletions

View File

@@ -747,6 +747,10 @@ EXPORT void obs_output_set_video_conversion(obs_output_t output,
EXPORT void obs_output_set_audio_conversion(obs_output_t output,
const struct audio_convert_info *conversion);
/** Returns whether data capture can begin with the specified flags */
EXPORT bool obs_output_can_begin_data_capture(obs_output_t output,
uint32_t flags);
/**
* Begins data capture from media/encoders.
*
@@ -764,6 +768,9 @@ EXPORT bool obs_output_begin_data_capture(obs_output_t output, uint32_t flags);
/** Ends data capture from media/encoders */
EXPORT void obs_output_end_data_capture(obs_output_t output);
/** Signals that start failed */
EXPORT void obs_output_signal_start_fail(obs_output_t output, int code);
/* ------------------------------------------------------------------------- */
/* Encoders */
@@ -825,6 +832,9 @@ EXPORT void obs_encoder_stop(obs_encoder_t encoder,
void (*new_packet)(void *param, struct encoder_packet *packet),
void *param);
/** Returns the codec of the encoder */
EXPORT const char *obs_encoder_get_codec(obs_encoder_t encoder);
/** Gets the default settings for an encoder type */
EXPORT obs_data_t obs_encoder_defaults(const char *id);
@@ -864,6 +874,12 @@ EXPORT video_t obs_encoder_video(obs_encoder_t encoder);
*/
EXPORT audio_t obs_encoder_audio(obs_encoder_t encoder);
/** Duplicates an encoder packet */
EXPORT void obs_duplicate_encoder_packet(struct encoder_packet *dst,
const struct encoder_packet *src);
EXPORT void obs_free_encoder_packet(struct encoder_packet *packet);
/* ------------------------------------------------------------------------- */
/* Stream Services */