On 07/12/11 11:44, Diego Biurrun wrote:
On Wed, Dec 07, 2011 at 01:06:43AM +0100, Luca Barbato wrote:
It behaves similarly to image2 muxer
similar to the
But maybe you could describe it in a sentence or two instead. I don't
remember offhand what the image2 muxer did.
It is described in the same page, I'd rather leave a link instead of
repeating.
---
doc/muxers.texi | 27 +++++
libavformat/Makefile | 1 +
libavformat/allformats.c | 1 +
libavformat/segment.c | 249 ++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 278 insertions(+), 0 deletions(-)
create mode 100644 libavformat/segment.c
Changelog entry, possibly docs update.
Right
--- /dev/null
+++ b/libavformat/segment.c
@@ -0,0 +1,249 @@
+
+#include "libavutil/avstring.h"
+#include "libavutil/log.h"
+#include "libavutil/opt.h"
+#include "libavutil/mathematics.h"
+#include "libavutil/parseutils.h"
+#include "avformat.h"
+#include "internal.h"
+#include<strings.h>
+#include<float.h>
Place system headers before local headers, ideally separated by an empty line.
Ok
+#if CONFIG_SEGMENT_MUXER
This is unnecessary due to the conditional compilation.
Removed
+ if ((err = avio_open(&oc->pb, oc->filename, AVIO_FLAG_WRITE))< 0) {
+ return err;
+ }
pointless {}
Ok, I consider it less readable though.
+ seg->number = 0;
+ seg->recording_time = seg->time*1000000;
+ seg->offset_time = 0;
align
Reordered but not aligned, doesn't look any better vertically aligned.
+ if (seg->list) {
+ if ((ret = avio_open(&s->pb, seg->list, AVIO_FLAG_WRITE))< 0) {
+ return ret;
+ }
+ }
pointless {}, more below
I'm quite sure with {} is more readable.
+ oc->streams = s->streams;
+ oc->nb_streams = s->nb_streams;
align
Doesn't look any better vertically aligned.
+ fail:
Place goto labels in column 0.
Ok
+ if (ret) {
+ oc->streams = NULL;
+ oc->nb_streams = 0;
align
Doesn't look any better vertically aligned.
+/* output */
+#if CONFIG_SEGMENT_MUXER
+AVOutputFormat ff_segment_muxer = {
see above - and the comment appears pointless or mystifying.
I plan to add a demuxer and some small variants that might fit the file,
I guess I can add it when the need arises.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel