Commit a38e06c1 authored by Lukasz Marek's avatar Lukasz Marek

ffserver_config: handle codec private options

This commit allows to set codec's private option.
As side effect, it also improves preset support.
Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki2@gmail.com>
parent 2657f00d
...@@ -12,6 +12,7 @@ version <next>: ...@@ -12,6 +12,7 @@ version <next>:
- UDP-Lite support (RFC 3828) - UDP-Lite support (RFC 3828)
- xBR scaling filter - xBR scaling filter
- AVFoundation screen capturing support - AVFoundation screen capturing support
- ffserver supports codec private options
version 2.4: version 2.4:
- Icecast protocol - Icecast protocol
......
...@@ -589,8 +589,9 @@ Set sampling frequency for audio. When using low bitrates, you should ...@@ -589,8 +589,9 @@ Set sampling frequency for audio. When using low bitrates, you should
lower this frequency to 22050 or 11025. The supported frequencies lower this frequency to 22050 or 11025. The supported frequencies
depend on the selected audio codec. depend on the selected audio codec.
@item AVOptionAudio @var{option} @var{value} (@emph{encoding,audio}) @item AVOptionAudio [@var{codec}:]@var{option} @var{value} (@emph{encoding,audio})
Set generic option for audio stream. Set generic or private option for audio stream.
Private option must be prefixed with codec name or codec must be defined before.
@item AVPresetAudio @var{preset} (@emph{encoding,audio}) @item AVPresetAudio @var{preset} (@emph{encoding,audio})
Set preset for audio stream. Set preset for audio stream.
...@@ -667,8 +668,9 @@ Set video @option{qdiff} encoding option. ...@@ -667,8 +668,9 @@ Set video @option{qdiff} encoding option.
@item DarkMask @var{float} (@emph{encoding,video}) @item DarkMask @var{float} (@emph{encoding,video})
Set @option{lumi_mask}/@option{dark_mask} encoding options. Set @option{lumi_mask}/@option{dark_mask} encoding options.
@item AVOptionVideo @var{option} @var{value} (@emph{encoding,video}) @item AVOptionVideo [@var{codec}:]@var{option} @var{value} (@emph{encoding,video})
Set generic option for video stream. Set generic or private option for video stream.
Private option must be prefixed with codec name or codec must be defined before.
@item AVPresetVideo @var{preset} (@emph{encoding,video}) @item AVPresetVideo @var{preset} (@emph{encoding,video})
Set preset for video stream. Set preset for video stream.
......
This diff is collapsed.
...@@ -107,15 +107,18 @@ typedef struct FFServerConfig { ...@@ -107,15 +107,18 @@ typedef struct FFServerConfig {
int errors; int errors;
int warnings; int warnings;
// Following variables MUST NOT be used outside configuration parsing code. // Following variables MUST NOT be used outside configuration parsing code.
enum AVCodecID audio_id; enum AVCodecID guessed_audio_codec_id;
enum AVCodecID video_id; enum AVCodecID guessed_video_codec_id;
AVDictionary *video_opts; /* AVOptions for video encoder */ AVDictionary *video_opts; /* AVOptions for video encoder */
AVDictionary *video_conf; /* Values stored in video AVCodecContext.fields */ AVDictionary *video_conf; /* Values stored in video AVCodecContext.fields */
AVDictionary *audio_opts; /* AVOptions for audio encoder */ AVDictionary *audio_opts; /* AVOptions for audio encoder */
AVDictionary *audio_conf; /* Values stored in audio AVCodecContext.fields */ AVDictionary *audio_conf; /* Values stored in audio AVCodecContext.fields */
char *video_preset; char *video_preset;
char *audio_preset; char *audio_preset;
AVCodecContext *dummy_ctx; /* Used internally to test AVOptions. Not to be used anywhere else */ AVCodecContext *dummy_actx; /* Used internally to test audio AVOptions. */
AVCodecContext *dummy_vctx; /* Used internally to test video AVOptions. */
int no_audio;
int no_video;
} FFServerConfig; } FFServerConfig;
void ffserver_get_arg(char *buf, int buf_size, const char **pp); void ffserver_get_arg(char *buf, int buf_size, const char **pp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment