Merge commit 'bf5f46b4cc47b7a4568119f224057d4ff91b6cdd'

* commit 'bf5f46b4cc47b7a4568119f224057d4ff91b6cdd':
  APIChanges: add entry for av_read_packet deprecation
  mxfdec: fix typo in mxf_read_seek()
  avserver: use freopen to redirect stdin/out/err to /dev/null
  avserver: remove daemon mode
  configure: Check for -Werror parameters on clang
  doxygen: remove obsolete options from Doxyfile
  configure: Add option to disable all command line programs

Conflicts:
	Changelog
	configure
	doc/APIchanges
	doc/ffserver.conf
	doc/ffserver.texi
	ffserver.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-11-16 13:07:10 +01:00
commit 3db32ec119
7 changed files with 25 additions and 80 deletions

View File

@ -23,6 +23,7 @@ version <next>:
- field filter ported from libmpcodecs
- AVR demuxer
- geq filter ported from libmpcodecs
- remove ffserver daemon mode
version 1.0:

16
configure vendored
View File

@ -101,6 +101,13 @@ Configuration options:
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
Program options:
--disable-programs do not build command line programs
--disable-ffmpeg disable ffmpeg build
--disable-ffplay disable ffplay build
--disable-ffprobe disable ffprobe build
--disable-ffserver disable ffserver build
Documentation options:
--disable-doc do not build documentation
--disable-htmlpages do not build HTML documentation pages
@ -109,10 +116,6 @@ Documentation options:
--disable-txtpages do not build text documentation pages
Component options:
--disable-ffmpeg disable ffmpeg build
--disable-ffplay disable ffplay build
--disable-ffprobe disable ffprobe build
--disable-ffserver disable ffserver build
--disable-avdevice disable libavdevice build
--disable-avcodec disable libavcodec build
--disable-avformat disable libavformat build
@ -2200,6 +2203,9 @@ for opt do
;;
--enable-debug=*) debuglevel="$optval"
;;
--disable-programs)
disable $PROGRAM_LIST
;;
--disable-everything)
map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST
;;
@ -3954,6 +3960,8 @@ elif enabled llvm_gcc; then
elif enabled clang; then
check_cflags -mllvm -stack-alignment=16
check_cflags -Qunused-arguments
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
elif enabled armcc; then
# 2523: use of inline assembler is deprecated
add_cflags -W${armcc_opt},--diag_suppress=2523

View File

@ -291,6 +291,10 @@ API changes, most recent first:
2012-01-24 - 0c3577b - lavfi 2.60.100
Add avfilter_graph_dump.
2012-03-20 - 3c90cc2 - lavfo 54.2.0
Deprecate av_read_packet(), use av_read_frame() with
AVFMT_FLAG_NOPARSE | AVFMT_FLAG_NOFILLIN in AVFormatContext.flags
2012-03-05 - lavc 54.8.0
6699d07 Add av_get_exact_bits_per_sample()
9524cf7 Add av_get_audio_frame_duration()

View File

@ -489,12 +489,6 @@ MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
# If the sources in your project are distributed over multiple directories
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
SHOW_DIRECTORIES = NO
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the
# Folder Tree View (if specified). The default is YES.
@ -847,12 +841,6 @@ HTML_COLORSTYLE_GAMMA = 80
HTML_TIMESTAMP = YES
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
HTML_ALIGN_MEMBERS = YES
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
# page has loaded. For this to work a browser that supports
@ -1033,11 +1021,6 @@ ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
# and Class Hierarchy pages using a tree view instead of an ordered list.
USE_INLINE_TREES = NO
# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
# used to set the initial width (in pixels) of the frame in which the tree
# is shown.

View File

@ -25,10 +25,6 @@ MaxBandwidth 1000
# '-' is the standard output.
CustomLog -
# Suppress that if you want to launch ffserver as a daemon.
NoDaemon
##################################################################
# Definition of the live feeds. Each live feed contains one video
# and/or audio sequence coming from an ffmpeg encoder or another

View File

@ -28,11 +28,6 @@ several live feeds, streaming from files and time shifting on live feeds
(you can seek to positions in the past on each live feed, provided you
specify a big enough feed storage in ffserver.conf).
ffserver runs in daemon mode by default; that is, it puts itself in
the background and detaches from its TTY, unless it is launched in
debug mode or a NoDaemon option is specified in the configuration
file.
This documentation covers only the streaming aspects of ffserver /
ffmpeg. All questions about parameters for ffmpeg, codec questions,
etc. are not covered here. Read @file{ffmpeg.html} for more
@ -267,8 +262,7 @@ within the various <Stream> sections. Since ffserver will not launch
any ffmpeg instances, you will have to launch them manually.
@item -d
Enable debug mode. This option increases log verbosity, directs log
messages to stdout and causes ffserver to run in the foreground
rather than as a daemon.
messages to stdout.
@end table
@c man end

View File

@ -29,6 +29,7 @@
#endif
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include "libavformat/avformat.h"
// FIXME those are internal headers, ffserver _really_ shouldn't use them
#include "libavformat/ffm.h"
@ -306,12 +307,10 @@ static int rtp_new_av_stream(HTTPContext *c,
HTTPContext *rtsp_c);
static const char *my_program_name;
static const char *my_program_dir;
static const char *config_filename = "/etc/ffserver.conf";
static int ffserver_debug;
static int ffserver_daemon;
static int no_launch;
static int need_to_start_children;
@ -522,19 +521,12 @@ static void start_children(FFStream *feed)
close(i);
if (!ffserver_debug) {
i = open("/dev/null", O_RDWR);
if (i != -1) {
dup2(i, 0);
dup2(i, 1);
dup2(i, 2);
close(i);
}
}
/* This is needed to make relative pathnames work */
if (chdir(my_program_dir) < 0) {
http_log("chdir failed\n");
exit(1);
if (!freopen("/dev/null", "r", stdin))
http_log("failed to redirect STDIN to /dev/null\n;");
if (!freopen("/dev/null", "w", stdout))
http_log("failed to redirect STDOUT to /dev/null\n;");
if (!freopen("/dev/null", "w", stderr))
http_log("failed to redirect STDERR to /dev/null\n;");
}
signal(SIGPIPE, SIG_DFL);
@ -4122,8 +4114,6 @@ static int parse_ffconfig(const char *filename)
if (resolve_host(&my_http_addr.sin_addr, arg) != 0) {
ERROR("%s:%d: Invalid host/IP address: %s\n", arg);
}
} else if (!av_strcasecmp(cmd, "NoDaemon")) {
ffserver_daemon = 0;
} else if (!av_strcasecmp(cmd, "RTSPPort")) {
get_arg(arg, sizeof(arg), &p);
val = atoi(arg);
@ -4694,7 +4684,6 @@ static void handle_child_exit(int sig)
static void opt_debug(void)
{
ffserver_debug = 1;
ffserver_daemon = 0;
logfilename[0] = '-';
}
@ -4725,8 +4714,6 @@ int main(int argc, char **argv)
show_banner(argc, argv, options);
my_program_name = argv[0];
my_program_dir = getcwd(0, 0);
ffserver_daemon = 1;
parse_options(NULL, argc, argv, options, NULL);
@ -4758,37 +4745,9 @@ int main(int argc, char **argv)
compute_bandwidth();
/* put the process in background and detach it from its TTY */
if (ffserver_daemon) {
int pid;
pid = fork();
if (pid < 0) {
perror("fork");
exit(1);
} else if (pid > 0) {
/* parent : exit */
exit(0);
} else {
/* child */
setsid();
close(0);
open("/dev/null", O_RDWR);
if (strcmp(logfilename, "-") != 0) {
close(1);
dup(0);
}
close(2);
dup(0);
}
}
/* signal init */
signal(SIGPIPE, SIG_IGN);
if (ffserver_daemon)
chdir("/");
if (http_server() < 0) {
http_log("Could not start server\n");
exit(1);