[FFmpeg-devel] [PATCH] Add simple test (works with mkv for now, not with hls or dash)

2018-08-13 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- test.sh | 86 + test_config.lua | 10 +++ 2 files changed, 96 insertions(+) create mode 100644 test.sh create mode 100644 test_config.lua diff --git a/test.sh b/test.sh new file mode 100644

Re: [FFmpeg-devel] [GSoC] FFserver libmicrohttpd interface

2018-08-13 Thread Stephan Holljes
On Sat, Aug 11, 2018 at 3:58 AM, Michael Niedermayer wrote: > On Thu, Aug 09, 2018 at 02:46:59PM +0200, Stephan Holljes wrote: >> On Thu, Aug 2, 2018 at 1:00 AM, Stephan Holljes >> wrote: >> > After fighting for a bit too long, I am finally submitting this patch &g

[FFmpeg-devel] [GSoC] FFserver: Simple test.

2018-08-13 Thread Stephan Holljes
This patch adds a simple test to ffserver. For the time being it only properly works with mkv. For HLS the timestamps appear to be incorrect (segments that should be 2 seconds long are 180 seconds in the m3u8) and DASH appears to not work at all (mpv and ffmpeg report invalid data). I'll

Re: [FFmpeg-devel] [GSoC] FFserver libmicrohttpd interface

2018-08-09 Thread Stephan Holljes
On Thu, Aug 2, 2018 at 1:00 AM, Stephan Holljes wrote: > After fighting for a bit too long, I am finally submitting this patch series > that adds the more mature libmicrohttpd library. Client disconnect detection > is not really taken care of as of now, clients will be disconne

[FFmpeg-devel] [PATCH 5/7] lmhttpd.c/ffserver.c/httpd.h/Makefile: Add libmicrohttpd httpd interface implementation.

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Makefile | 8 +- ffserver.c | 2 +- httpd.h| 1 + lmhttpd.c | 310 + 4 files changed, 318 insertions(+), 3 deletions(-) create mode 100644 lmhttpd.c diff --git a/Makefile b/Makefile

[FFmpeg-devel] [PATCH 2/7] ffserver.c: Disconnect client if file was requested, but no fileserver was started.

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 5 + 1 file changed, 5 insertions(+) diff --git a/ffserver.c b/ffserver.c index 3b3451e..087963a 100644 --- a/ffserver.c +++ b/ffserver.c @@ -578,6 +578,11 @@ void *accept_thread(void *arg) continue

[FFmpeg-devel] [PATCH 6/7] ffserver.c: Reduce buffer from 30 to 10 seconds

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index de96c7b..bda7d33 100644 --- a/ffserver.c +++ b/ffserver.c @@ -45,7 +45,7 @@ #include "httpd.h" #include "configreader.h" -#d

[FFmpeg-devel] [PATCH 1/7] fileserver.c/.h: Fix fileserver_schedule()

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- fileserver.c | 1 - fileserver.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/fileserver.c b/fileserver.c index a3460e3..d2f8c7f 100644 --- a/fileserver.c +++ b/fileserver.c @@ -49,7 +49,6 @@ void fileserver_schedule(struct

[FFmpeg-devel] [PATCH 7/7] Update Documentation

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Documentation.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation.txt b/Documentation.txt index 3eb52b8..6295e4c 100644 --- a/Documentation.txt +++ b/Documentation.txt @@ -54,7 +54,8 @@ HTTPD-API To be independent

[FFmpeg-devel] [PATCH 4/7] ffserver.c: replace server logging context with NULL, since libmicrohttpd's daemon context is not known to libavutil.

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ffserver.c b/ffserver.c index 9cc501c..59c1b4d 100644 --- a/ffserver.c +++ b/ffserver.c @@ -490,11 +490,11 @@ void *accept_thread(void *arg) for (i = 0; i

[FFmpeg-devel] [PATCH 3/7] ffserver.c: better logging

2018-08-01 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ffserver.c b/ffserver.c index 087963a..9cc501c 100644 --- a/ffserver.c +++ b/ffserver.c @@ -724,7 +724,6 @@ void *fileserver_thread(void *arg) struct FileserverClient *c

[FFmpeg-devel] [GSoC] FFserver libmicrohttpd interface

2018-08-01 Thread Stephan Holljes
After fighting for a bit too long, I am finally submitting this patch series that adds the more mature libmicrohttpd library. Client disconnect detection is not really taken care of as of now, clients will be disconnected once av_interleaved_write_frame() fails. This may be worth looking into more

Re: [FFmpeg-devel] [GSoC] FFserver: Add HLS and DASH

2018-07-11 Thread Stephan Holljes
On Sun, Jul 8, 2018 at 11:21 PM, Michael Niedermayer wrote: > On Thu, Jun 28, 2018 at 02:51:00AM +0200, Stephan Holljes wrote: >> This patchset took embarrassingly long to produce. I first took a few wrong >> turns, but I think I'm now at a point where I reached the limits of the &

Re: [FFmpeg-devel] [GSoC] FFserver: Add HLS and DASH

2018-07-05 Thread Stephan Holljes
On Thu, Jun 28, 2018 at 2:51 AM, Stephan Holljes wrote: > This patchset took embarrassingly long to produce. I first took a few wrong > turns, but I think I'm now at a point where I reached the limits of the > public server API in libavformat. The main problem is that I cannot set

[FFmpeg-devel] [PATCH 14/17] Add fileserver and add it to Makefile

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Makefile | 7 ++- ffserver.c | 150 +++ fileserver.c | 97 + fileserver.h | 63 ++ 4 files changed, 282 insertions(+), 35 deletions(-) create mode

[FFmpeg-devel] [PATCH 17/17] Update Documentation.txt

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Documentation.txt | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation.txt b/Documentation.txt index c8fef11..3eb52b8 100644 --- a/Documentation.txt +++ b/Documentation.txt @@ -12,13 +12,18 @@ the server

[FFmpeg-devel] [PATCH 16/17] ffserver.c: Make fileserving independent of publisher to support streams that don't have mkv

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 70 +++--- 1 file changed, 45 insertions(+), 25 deletions(-) diff --git a/ffserver.c b/ffserver.c index 38f10b7..3b3451e 100644 --- a/ffserver.c +++ b/ffserver.c @@ -51,7 +51,9 @@ struct ReadInfo

[FFmpeg-devel] [PATCH 01/17] publisher.c: Redruce threads to 1 for now to avoid race conditions

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publisher.c b/publisher.c index 56d1e24..fc3d804 100644 --- a/publisher.c +++ b/publisher.c @@ -101,7 +101,7 @@ void publisher_init(struct PublisherContext **pub, char *stream_name

[FFmpeg-devel] [PATCH 10/17] configreader.c/.h/httpd.h: Add hls and dash, slightly change httpd interface, remove publisher.h include

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- configreader.c | 8 ++-- configreader.h | 1 + httpd.h| 9 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/configreader.c b/configreader.c index 3f5b896..966dc84 100644 --- a/configreader.c +++ b/configreader.c @@ -27,7

[FFmpeg-devel] [PATCH 07/17] segment.c: Don't cast return value of av_malloc()

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segment.c b/segment.c index 2dba287..8b76510 100644 --- a/segment.c +++ b/segment.c @@ -113,7 +113,7 @@ void segment_init(struct Segment **seg_p, AVFormatContext *fmt) int ret

[FFmpeg-devel] [PATCH 06/17] publisher.h: Remove trailing whitespace

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publisher.h b/publisher.h index e25c33d..e07cb10 100644 --- a/publisher.h +++ b/publisher.h @@ -115,7 +115,7 @@ void publisher_init(struct PublisherContext **pub, char *stream_name

[FFmpeg-devel] [PATCH 13/17] move FFServerInfo from publisher.h to httpd.h

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- httpd.h | 9 + publisher.h | 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/httpd.h b/httpd.h index a988916..1b2566e 100644 --- a/httpd.h +++ b/httpd.h @@ -72,6 +72,15 @@ struct HTTPDInterface { void (*shutdown

[FFmpeg-devel] [PATCH 15/17] ffserver.c: Improved timestamp handling.

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 37 + 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/ffserver.c b/ffserver.c index 91ad29a..38f10b7 100644 --- a/ffserver.c +++ b/ffserver.c @@ -86,7 +86,7 @@ void *read_thread(void *arg

[FFmpeg-devel] [PATCH 12/17] ffserver.c: Add hls and dash and adapt to new httpd interface (stub)

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 248 + 1 file changed, 210 insertions(+), 38 deletions(-) diff --git a/ffserver.c b/ffserver.c index f128b55..4f42f74 100644 --- a/ffserver.c +++ b/ffserver.c @@ -27,6 +27,9 @@ #include

[FFmpeg-devel] [PATCH 11/17] lavfhttpd.c: Adapt to new interface (stub), fix includes

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index 3f29ec4..7c95001 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -21,6 +21,7 @@ #include "httpd.h" #include +#include

[FFmpeg-devel] [PATCH 08/17] segment.c: set *seg_p to NULL earlier so it is NULL for every error condition.

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/segment.c b/segment.c index 8b76510..9ec144f 100644 --- a/segment.c +++ b/segment.c @@ -114,9 +114,9 @@ void segment_init(struct Segment **seg_p, AVFormatContext *fmt) int i

[FFmpeg-devel] [PATCH 04/17] configreader.c: Remove trailing whitespace

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- configreader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configreader.c b/configreader.c index 88bba26..3f5b896 100644 --- a/configreader.c +++ b/configreader.c @@ -76,7 +76,7 @@ int configs_parse(lua_State *L

[FFmpeg-devel] [PATCH 03/17] lavfhttpd.c: Remove trailing whitespaces

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index bc856af..3f29ec4 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -15,7 +15,7 @@ * License along with FFmpeg; if not, write

[FFmpeg-devel] [PATCH 09/17] ffserver.c: simplify cleanup in run_server()

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/ffserver.c b/ffserver.c index cc7dc6c..f128b55 100644 --- a/ffserver.c +++ b/ffserver.c @@ -646,18 +646,10 @@ end: } av_free(winfos_p[stream_index

[FFmpeg-devel] [PATCH 02/17] ffserver.c: Remove trailing whitespace

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 64 +++--- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/ffserver.c b/ffserver.c index 0278bc8..cc7dc6c 100644 --- a/ffserver.c +++ b/ffserver.c @@ -86,12 +86,12 @@ void *read_thread

[FFmpeg-devel] [PATCH 05/17] segment.c: Remove trailing whitespace

2018-06-27 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/segment.c b/segment.c index 6c74b72..2dba287 100644 --- a/segment.c +++ b/segment.c @@ -28,7 +28,7 @@ void segment_save(struct Segment *seg, const char *filename

[FFmpeg-devel] [GSoC] FFserver: Add HLS and DASH

2018-06-27 Thread Stephan Holljes
This patchset took embarrassingly long to produce. I first took a few wrong turns, but I think I'm now at a point where I reached the limits of the public server API in libavformat. The main problem is that I cannot set options on clients that are accepted through http_accept(), for example a

Re: [FFmpeg-devel] FFserver refactor and bugfixes

2018-06-01 Thread Stephan Holljes
On Fri, Jun 1, 2018 at 9:24 PM, Michael Niedermayer wrote: > On Fri, Jun 01, 2018 at 12:23:53AM +0200, Stephan Holljes wrote: >> This patch series got a bit larger than I hoped, but there were quite >> some more things to fix. Also a number of these commits are of cosmetic >

[FFmpeg-devel] [PATCH 3/8] ffserver.c: rename ReadInfo.in_filename to ReadInfo.in_uri

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 44306b1..b80a7f8 100644 --- a/ffserver.c +++ b/ffserver.c @@ -45,7 +45,7 @@ struct ReadInfo { struct PublisherContext *pub; AVFormatContext

[FFmpeg-devel] [PATCH 2/8] ffserver: Implement lua config file reader

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- configreader.c | 230 + configreader.h | 47 2 files changed, 277 insertions(+) create mode 100644 configreader.c create mode 100644 configreader.h diff --git a/configreader.c b

[FFmpeg-devel] [PATCH 5/8] publisher.h: Add stream_name to PublisherContext

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 3 ++- publisher.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/publisher.c b/publisher.c index 1123056..2e96f2f 100644 --- a/publisher.c +++ b/publisher.c @@ -93,11 +93,12 @@ void client_push_segment(struct Client *c

[FFmpeg-devel] [PATCH 6/8] ffserver.c: Add config file reading

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 248 ++--- 1 file changed, 172 insertions(+), 76 deletions(-) diff --git a/ffserver.c b/ffserver.c index b80a7f8..1363cdc 100644 --- a/ffserver.c +++ b/ffserver.c @@ -38,6 +38,7 @@ #include

[FFmpeg-devel] [PATCH] ffserver.c: Add ability to stream audio-only files.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Change from previous patch: More natural way to check if AUDIO_ONLY_SEGMENT_SECONDS has elapsed since last cut. ffserver.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ffserver.c b/ffserver.c index 288f8a1..0278bc8

[FFmpeg-devel] [PATCH 8/8] doc: Update Documentation.txt and add sample config as supplement

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Documentation.txt | 17 - sample_config.lua | 28 2 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 sample_config.lua diff --git a/Documentation.txt b/Documentation.txt index 9a7f0bf..c8fef11

[FFmpeg-devel] [PATCH 1/8] ffserver.c: Fix timestamp handling, still creates new clusters for mp4 files, but result is playable

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ffserver.c b/ffserver.c index 39e1c32..44306b1 100644 --- a/ffserver.c +++ b/ffserver.c @@ -79,9 +79,7 @@ void *read_thread(void *arg) struct Segment *seg

[FFmpeg-devel] [PATCH 4/8] httpd.h: Adapt structs to config file

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- httpd.h | 17 + 1 file changed, 17 insertions(+) diff --git a/httpd.h b/httpd.h index 6fb91bd..25cbe11 100644 --- a/httpd.h +++ b/httpd.h @@ -26,11 +26,28 @@ #include "publisher.h" +/* Supported stream formats, for now onl

[FFmpeg-devel] [PATCH 18/22] segment.c: Don't cast return value of av_malloc()

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/segment.c b/segment.c index 72c4663..6c74b72 100644 --- a/segment.c +++ b/segment.c @@ -81,7 +81,7 @@ int segment_write(void *opaque, unsigned char *buf, int buf_size

[FFmpeg-devel] [PATCH 19/22] httpd.h: make comments doxygen

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- httpd.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/httpd.h b/httpd.h index fb1337d..83535e0 100644 --- a/httpd.h +++ b/httpd.h @@ -52,11 +52,12 @@ struct HTTPDConfig { /** HTTPClient struct, this information is shared between

[FFmpeg-devel] [PATCH 20/22] ffserver.c: make comment doxygen

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 8a24397..288f8a1 100644 --- a/ffserver.c +++ b/ffserver.c @@ -59,7 +59,7 @@ struct AcceptInfo { struct HTTPDInterface *httpd; AVFormatContext

[FFmpeg-devel] FFserver config file support

2018-05-31 Thread Stephan Holljes
This patchset includes minor fixes mentioned in the last review round. - remove unneeded null-checks before calling av_free() - use av_freep() where useful - simplify AVRational assignment ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 22/22] publisher.c: Remove unsupported logging context

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publisher.c b/publisher.c index 9374c41..56d1e24 100644 --- a/publisher.c +++ b/publisher.c @@ -271,7 +271,7 @@ void publish(struct PublisherContext *pub) for (i = 0; i

[FFmpeg-devel] [PATCH 21/22] lavfhttpd.c: Remove superfluous null-checks before av_free()

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index 9f56620..bc856af 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -95,10 +95,8 @@ int lavfhttpd_accept(void *server, struct HTTPClient

[FFmpeg-devel] [PATCH 16/22] lavfhttpd.c: Detect disconnected clients through amount of bytes written.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lavfhttpd.c b/lavfhttpd.c index b1e8819..9f56620 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -120,8 +120,14 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client, int reply_code

[FFmpeg-devel] [PATCH 15/22] ffserver.c: Simplify error handling in server creation.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/ffserver.c b/ffserver.c index 6f76c3e..fd8cadd 100644 --- a/ffserver.c +++ b/ffserver.c @@ -534,13 +534,12 @@ void *run_server(void *arg

[FFmpeg-devel] [PATCH 17/22] ffserver.c: Don't cast return value of av_malloc()

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index fd8cadd..8a24397 100644 --- a/ffserver.c +++ b/ffserver.c @@ -222,7 +222,7 @@ void write_segment(struct Client *c) return

[FFmpeg-devel] [PATCH 12/22] ffserver.c: Replace sizeof(struct ...) with sizeof(var) where useful.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ffserver.c b/ffserver.c index 50d61e5..c6e8516 100644 --- a/ffserver.c +++ b/ffserver.c @@ -210,7 +210,7 @@ void write_segment(struct Client *c) struct SegmentReadInfo

[FFmpeg-devel] [PATCH 14/22] ffserver.c: Add some logging contexts.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ffserver.c b/ffserver.c index c6e8516..6f76c3e 100644 --- a/ffserver.c +++ b/ffserver.c @@ -224,14 +224,14 @@ void write_segment(struct Client *c

[FFmpeg-devel] [PATCH 13/22] lavfhttpd.c: simplify av_malloc() for client_http

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index d094d65..b1e8819 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -76,7 +76,7 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client, int

[FFmpeg-devel] [PATCH 11/22] ffserver.c/segment.c: set *seg_p to NULL in case of allocation failure and check it

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 4 segment.c | 1 + 2 files changed, 5 insertions(+) diff --git a/ffserver.c b/ffserver.c index 3abf5f8..50d61e5 100644 --- a/ffserver.c +++ b/ffserver.c @@ -151,6 +151,10 @@ void *read_thread(void *arg) av_log(NULL

[FFmpeg-devel] [PATCH 10/22] httpd.h: Make comments doxygen comments

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- httpd.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/httpd.h b/httpd.h index 25cbe11..fb1337d 100644 --- a/httpd.h +++ b/httpd.h @@ -26,13 +26,13 @@ #include "publisher.h" -/* Supported stream formats, fo

[FFmpeg-devel] [PATCH 07/22] lavfhttpd.c: Add allocation failure check.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 4 1 file changed, 4 insertions(+) diff --git a/lavfhttpd.c b/lavfhttpd.c index 3cf9958..5488e14 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -74,6 +74,10 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client, int reply_code

[FFmpeg-devel] [PATCH 08/22] ffserver.c: Simplify codec_type access in read_thread

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ffserver.c b/ffserver.c index ddb3e6f..3abf5f8 100644 --- a/ffserver.c +++ b/ffserver.c @@ -84,8 +84,6 @@ void *read_thread(void *arg) AVStream *in_stream; AVRational

[FFmpeg-devel] [PATCH 04/22] ffserver.c: Check allocations

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 87 +- 1 file changed, 81 insertions(+), 6 deletions(-) diff --git a/ffserver.c b/ffserver.c index fe84b2e..ddb3e6f 100644 --- a/ffserver.c +++ b/ffserver.c @@ -223,12 +223,25 @@ void

[FFmpeg-devel] [PATCH 03/22] ffserver.c: Fix indentation (replace tabs by spaces) and cosmetics

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ffserver.c b/ffserver.c index 9b28fdc..fe84b2e 100644 --- a/ffserver.c +++ b/ffserver.c @@ -152,7 +152,7 @@ void *read_thread(void *arg

[FFmpeg-devel] [PATCH 06/22] segment.c: Add allocation failure checks.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/segment.c b/segment.c index c40d1ad..986aeb5 100644 --- a/segment.c +++ b/segment.c @@ -82,6 +82,10 @@ int segment_write(void *opaque, unsigned char *buf, int buf_size

[FFmpeg-devel] [PATCH 09/22] lavfhttpd.c: Free client context if allocated but an error occured

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index 5488e14..d094d65 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -66,10 +66,13 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client

[FFmpeg-devel] [PATCH 05/22] publisher.c: Add allocation failure checks.

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 20 1 file changed, 20 insertions(+) diff --git a/publisher.c b/publisher.c index 2e96f2f..9374c41 100644 --- a/publisher.c +++ b/publisher.c @@ -97,17 +97,37 @@ void publisher_init(struct PublisherContext **pub, char

[FFmpeg-devel] [PATCH 02/22] ffserver.c: Check pthread_create for thread creation failure

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/ffserver.c b/ffserver.c index 116c399..9b28fdc 100644 --- a/ffserver.c +++ b/ffserver.c @@ -554,21 +554,35 @@ void *run_server(void *arg

[FFmpeg-devel] [PATCH 01/22] ffserver.c: Replace av_malloc with av_mallocz_array

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ffserver.c b/ffserver.c index 1363cdc..116c399 100644 --- a/ffserver.c +++ b/ffserver.c @@ -505,8 +505,8 @@ void *run_server(void *arg) { pthread_t *r_threads

[FFmpeg-devel] FFserver refactor and bugfixes

2018-05-31 Thread Stephan Holljes
This patch series got a bit larger than I hoped, but there were quite some more things to fix. Also a number of these commits are of cosmetic nature. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

[FFmpeg-devel] [PATCH 7/8] Makefile: Update Makefile

2018-05-31 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fbecdeb..83bc4e0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ all: ffserver LAV_FLAGS = $(shell pkg-config --libs --cflags libavformat

Re: [FFmpeg-devel] [PATCH 06/10] segment.c: Add allocation failure checks.

2018-05-28 Thread Stephan Holljes
On Mon, May 28, 2018 at 11:45 PM, Michael Niedermayer wrote: > On Mon, May 28, 2018 at 08:27:07PM +0200, Stephan Holljes wrote: >> Signed-off-by: Stephan Holljes >> --- >> segment.c | 26 ++ >> 1 file changed, 26 insertions(+) >> >

[FFmpeg-devel] [PATCH 03/10] ffserver.c: Fix indentation (replace tabs by spaces)

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index 4bbf254..66bf7ac 100644 --- a/ffserver.c +++ b/ffserver.c @@ -154,7 +154,7 @@ void *read_thread(void *arg) publisher_push_segment(info

[FFmpeg-devel] [PATCH 4/8] httpd.h: Adapt structs to config file

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- httpd.h | 17 + 1 file changed, 17 insertions(+) diff --git a/httpd.h b/httpd.h index 6fb91bd..25cbe11 100644 --- a/httpd.h +++ b/httpd.h @@ -26,11 +26,28 @@ #include "publisher.h" +/* Supported stream formats, for now onl

[FFmpeg-devel] [GSoC] FFserver config file support

2018-05-28 Thread Stephan Holljes
This is an updated version of the previous patchset. The most notable changes are: - timestamp fix reworked to work with mp4 - the lua file reader is much safer by using lua's protected environment While the matroska muxer still spams the output about creating new clusters because of

[FFmpeg-devel] [PATCH 7/8] Makefile: Update Makefile

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fbecdeb..83bc4e0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ all: ffserver LAV_FLAGS = $(shell pkg-config --libs --cflags libavformat

[FFmpeg-devel] [PATCH 2/8] ffserver: Implement lua config file reader

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- configreader.c | 235 + configreader.h | 47 2 files changed, 282 insertions(+) create mode 100644 configreader.c create mode 100644 configreader.h diff --git a/configreader.c b

[FFmpeg-devel] [PATCH 02/10] ffserver.c: Check pthread_create for thread creation failure

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 34 ++ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/ffserver.c b/ffserver.c index 5fc7c44..4bbf254 100644 --- a/ffserver.c +++ b/ffserver.c @@ -558,21 +558,35 @@ void *run_server(void *arg

[FFmpeg-devel] [GSoC] FFserver refactor and bugfixes

2018-05-28 Thread Stephan Holljes
This patchset refactors av_*alloc* with av_*alloc*_array where useful, adds allocation checks to a lot of unchecked allocations, pthread-creation checks and simplification and simple bugfixes. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 6/8] ffserver.c: Add config file reading

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 248 ++--- 1 file changed, 172 insertions(+), 76 deletions(-) diff --git a/ffserver.c b/ffserver.c index 402e710..12c257f 100644 --- a/ffserver.c +++ b/ffserver.c @@ -38,6 +38,7 @@ #include

[FFmpeg-devel] [PATCH 1/8] ffserver.c: Fix timestamp handling, still creates new clusters for mp4 files, but result is playable

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ffserver.c b/ffserver.c index 39e1c32..fc2a1a4 100644 --- a/ffserver.c +++ b/ffserver.c @@ -133,7 +133,7 @@ void *read_thread(void *arg) pkt.pos = -1

[FFmpeg-devel] [PATCH 01/10] ffserver.c: Replace av_malloc with av_mallocz_array

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ffserver.c b/ffserver.c index 12c257f..5fc7c44 100644 --- a/ffserver.c +++ b/ffserver.c @@ -509,8 +509,8 @@ void *run_server(void *arg) { pthread_t *r_threads

[FFmpeg-devel] [PATCH 04/10] ffserver.c: Check allocations

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 87 +- 1 file changed, 81 insertions(+), 6 deletions(-) diff --git a/ffserver.c b/ffserver.c index 66bf7ac..171da51 100644 --- a/ffserver.c +++ b/ffserver.c @@ -227,12 +227,25 @@ void

[FFmpeg-devel] [PATCH 05/10] publisher.c: Add allocation failure checks.

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 20 1 file changed, 20 insertions(+) diff --git a/publisher.c b/publisher.c index 2e96f2f..9374c41 100644 --- a/publisher.c +++ b/publisher.c @@ -97,17 +97,37 @@ void publisher_init(struct PublisherContext **pub, char

[FFmpeg-devel] [PATCH 10/10] ffserver.c: Fix invalid read if resource is empty string

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ffserver.c b/ffserver.c index 65b12da..cdcc064 100644 --- a/ffserver.c +++ b/ffserver.c @@ -350,8 +350,9 @@ void *accept_thread(void *arg) ifmt_ctx = NULL

[FFmpeg-devel] [PATCH 06/10] segment.c: Add allocation failure checks.

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- segment.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/segment.c b/segment.c index c40d1ad..986aeb5 100644 --- a/segment.c +++ b/segment.c @@ -82,6 +82,10 @@ int segment_write(void *opaque, unsigned char *buf, int buf_size

[FFmpeg-devel] [PATCH 07/10] lavfhttpd.c: Add allocation failure check.

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 4 1 file changed, 4 insertions(+) diff --git a/lavfhttpd.c b/lavfhttpd.c index 3cf9958..5488e14 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -74,6 +74,10 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client, int reply_code

[FFmpeg-devel] [PATCH 3/8] ffserver.c: rename ReadInfo.in_filename to ReadInfo.in_uri

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index fc2a1a4..402e710 100644 --- a/ffserver.c +++ b/ffserver.c @@ -45,7 +45,7 @@ struct ReadInfo { struct PublisherContext *pub; AVFormatContext

[FFmpeg-devel] [PATCH 8/8] doc: Update Documentation.txt and add sample config as supplement

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- Documentation.txt | 17 - sample_config.lua | 28 2 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 sample_config.lua diff --git a/Documentation.txt b/Documentation.txt index 9a7f0bf..c8fef11

[FFmpeg-devel] [PATCH 09/10] lavfhttpd.c: Free client context if allocated but an error occured

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- lavfhttpd.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lavfhttpd.c b/lavfhttpd.c index 5488e14..d094d65 100644 --- a/lavfhttpd.c +++ b/lavfhttpd.c @@ -66,10 +66,13 @@ int lavfhttpd_accept(void *server, struct HTTPClient **client

[FFmpeg-devel] [PATCH 5/8] publisher.h: Add stream_name to PublisherContext

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- publisher.c | 3 ++- publisher.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/publisher.c b/publisher.c index 1123056..2e96f2f 100644 --- a/publisher.c +++ b/publisher.c @@ -93,11 +93,12 @@ void client_push_segment(struct Client *c

[FFmpeg-devel] [PATCH] ffserver.c: Add ability to stream audio-only files.

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/ffserver.c b/ffserver.c index cdcc064..b0db64b 100644 --- a/ffserver.c +++ b/ffserver.c @@ -42,6 +42,7 @@ #define BUFFER_SECS 30 #define LISTEN_TIMEOUT_MSEC 1000

[FFmpeg-devel] [PATCH 08/10] ffserver.c: Simplify codec_type access in read_thread

2018-05-28 Thread Stephan Holljes
Signed-off-by: Stephan Holljes --- ffserver.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ffserver.c b/ffserver.c index 171da51..65b12da 100644 --- a/ffserver.c +++ b/ffserver.c @@ -86,8 +86,6 @@ void *read_thread(void *arg) tb.num = 1; tb.den

Re: [FFmpeg-devel] [PATCH 2/8] ffserver: Implement lua config file reader

2018-05-21 Thread Stephan Holljes
On Mon, May 21, 2018 at 3:04 PM, James Darnley <james.darn...@gmail.com> wrote: > On 2018-05-20 20:53, Stephan Holljes wrote: >> +#include >> +#include >> +#include > > That's not portable. Lua headers are not in a subdirectory. Yes, artifact from early testin

[FFmpeg-devel] [PATCH 2/8] ffserver: Implement lua config file reader

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- configreader.c | 211 + configreader.h | 46 + 2 files changed, 257 insertions(+) create mode 100644 configreader.c create mode 100644 configreader.h diff

[FFmpeg-devel] [PATCH 8/8] doc: Update Documentation.txt and add sample config as supplement

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- Documentation.txt | 17 - sample_config.lua | 28 2 files changed, 36 insertions(+), 9 deletions(-) create mode 100644 sample_config.lua diff --git a/Documentation.txt b/Documentati

[FFmpeg-devel] [PATCH 4/8] httpd.h: Adapt structs to config file

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- httpd.h | 17 + 1 file changed, 17 insertions(+) diff --git a/httpd.h b/httpd.h index 6fb91bd..25cbe11 100644 --- a/httpd.h +++ b/httpd.h @@ -26,11 +26,28 @@ #include "publisher.h" +/* Supporte

[FFmpeg-devel] [PATCH 3/8] ffserver.c: rename ReadInfo.in_filename to ReadInfo.in_uri

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- ffserver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ffserver.c b/ffserver.c index bd7c694..44fc263 100644 --- a/ffserver.c +++ b/ffserver.c @@ -45,7 +45,7 @@ struct ReadInfo { struct PublisherC

[FFmpeg-devel] [PATCH 7/8] Makefile: Update Makefile

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- Makefile | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fbecdeb..83bc4e0 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ all: ffserver LAV_FLAGS = $(shell pkg-config

[FFmpeg-devel] [PATCH 6/8] ffserver.c: Add config file reading

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- ffserver.c | 248 ++--- 1 file changed, 172 insertions(+), 76 deletions(-) diff --git a/ffserver.c b/ffserver.c index 44fc263..3d842d8 100644 --- a/ffserver.c +++ b/ffse

[FFmpeg-devel] [PATCH 1/8] ffserver.c: Different timestamp scaling, still does not properly work with mp4 files?

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- ffserver.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/ffserver.c b/ffserver.c index 39e1c32..bd7c694 100644 --- a/ffserver.c +++ b/ffserver.c @@ -127,13 +127,13 @@ void *read_threa

[FFmpeg-devel] [PATCH 5/8] publisher.h: Add stream_name to PublisherContext

2018-05-20 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- publisher.c | 3 ++- publisher.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/publisher.c b/publisher.c index 1123056..2e96f2f 100644 --- a/publisher.c +++ b/publisher.c @@ -93,11 +93,12 @

[FFmpeg-devel] [GSoC] FFserver config file support

2018-05-20 Thread Stephan Holljes
This patch set builds upon the previous set that implemented ffserver with a more flexible httpd interface. It includes a fix for timestamp handling, which sadly still does not properly fix the issue. The majority of this patch set adds the ability to read lua-config files. After reading up on

[FFmpeg-devel] [PATCH 3/5] ffserver: Implement http interface and implementation

2018-05-12 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- httpd.h | 58 +++ lavfhttpd.c | 153 2 files changed, 211 insertions(+) create mode 100644 httpd.h create mode 100644 lavfhttpd.c diff

[FFmpeg-devel] [PATCH 5/5] ffserver: Add basic documentation of the architecture

2018-05-12 Thread Stephan Holljes
Signed-off-by: Stephan Holljes <klaxa1...@googlemail.com> --- Documentation.txt | 89 +++ 1 file changed, 89 insertions(+) create mode 100644 Documentation.txt diff --git a/Documentation.txt b/Documentation.txt new file mode 100644

  1   2   3   >