FFmpeg
Loading...
Searching...
No Matches
avtextwriters.h
Go to the documentation of this file.
1/*
2 * Copyright (c) The FFmpeg developers
3 *
4 * This file is part of FFmpeg.
5 *
6 * FFmpeg is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * FFmpeg is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with FFmpeg; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19 */
20
21#ifndef FFTOOLS_TEXTFORMAT_AVTEXTWRITERS_H
22#define FFTOOLS_TEXTFORMAT_AVTEXTWRITERS_H
23
24#include <stdint.h>
25#include "libavformat/avio.h"
26#include "libavutil/bprint.h"
27
29
30typedef struct AVTextWriter {
31 const AVClass *priv_class; ///< private class of the writer, if any
32 int priv_size; ///< private size for the writer private class
33 const char *name;
34
37 void (*writer_w8)(AVTextWriterContext *wctx, int b);
38 void (*writer_put_str)(AVTextWriterContext *wctx, const char *str);
39 void (*writer_vprintf)(AVTextWriterContext *wctx, const char *fmt, va_list vl);
41
42typedef struct AVTextWriterContext {
43 const AVClass *class; ///< class of the writer
45 const char *name;
46 void *priv; ///< private data for use by the writer
48
49
51
53
55
56int avtextwriter_create_avio(AVTextWriterContext **pwctx, AVIOContext *avio_ctx, int close_on_uninit);
57
59
61
62#endif /* FFTOOLS_TEXTFORMAT_AVTEXTWRITERS_H */
Buffered I/O operations.
int avtextwriter_create_avio(AVTextWriterContext **pwctx, AVIOContext *avio_ctx, int close_on_uninit)
Definition tw_avio.c:108
int avtextwriter_create_buffer(AVTextWriterContext **pwctx, AVBPrint *buffer)
Definition tw_buffer.c:76
int avtextwriter_context_open(AVTextWriterContext **pwctx, const AVTextWriter *writer)
int avtextwriter_create_stdout(AVTextWriterContext **pwctx)
Definition tw_stdout.c:71
int avtextwriter_create_file(AVTextWriterContext **pwctx, const char *output_filename)
Definition tw_avio.c:79
int avtextwriter_context_close(AVTextWriterContext **pwctx)
AVBPrint public header.
static const char * output_filename
Definition ffprobe.c:346
#define b
Definition input.c:43
Describe the class of an AVClass context structure.
Definition log.h:76
Bytestream IO Context.
Definition avio.h:160
void * priv
private data for use by the writer
const AVTextWriter * writer
void(* writer_put_str)(AVTextWriterContext *wctx, const char *str)
void(* writer_w8)(AVTextWriterContext *wctx, int b)
const char * name
int priv_size
private size for the writer private class
int(* uninit)(AVTextWriterContext *wctx)
int(* init)(AVTextWriterContext *wctx)
const AVClass * priv_class
private class of the writer, if any
void(* writer_vprintf)(AVTextWriterContext *wctx, const char *fmt, va_list vl)
static char buffer[20]
Definition seek.c:32