|
| 1 | +/* |
| 2 | + * FLV muxer |
| 3 | + * Copyright (c) 2003 The FFmpeg Project |
| 4 | + * |
| 5 | + * This file is part of FFmpeg. |
| 6 | + * |
| 7 | + * FFmpeg is free software; you can redistribute it and/or |
| 8 | + * modify it under the terms of the GNU Lesser General Public |
| 9 | + * License as published by the Free Software Foundation; either |
| 10 | + * version 2.1 of the License, or (at your option) any later version. |
| 11 | + * |
| 12 | + * FFmpeg is distributed in the hope that it will be useful, |
| 13 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | + * Lesser General Public License for more details. |
| 16 | + * |
| 17 | + * You should have received a copy of the GNU Lesser General Public |
| 18 | + * License along with FFmpeg; if not, write to the Free Software |
| 19 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | + */ |
| 21 | + |
| 22 | +#include "libavutil/dict.h" |
| 23 | +#include "libavutil/avassert.h" |
| 24 | +#include "libavutil/mathematics.h" |
| 25 | +#include "libavcodec/codec_desc.h" |
| 26 | +#include "libavcodec/mpeg4audio.h" |
| 27 | +#include "avformat.h" |
| 28 | +#include "internal.h" |
| 29 | +#include "mux.h" |
| 30 | +#include "libavutil/opt.h" |
| 31 | + |
| 32 | +typedef struct RTCContext { |
| 33 | + AVClass *av_class; |
| 34 | +} RTCContext; |
| 35 | + |
| 36 | +static int rtc_init(struct AVFormatContext *s) |
| 37 | +{ |
| 38 | + return 0; |
| 39 | +} |
| 40 | + |
| 41 | +static int rtc_write_header(struct AVFormatContext *s) |
| 42 | +{ |
| 43 | + return 0; |
| 44 | +} |
| 45 | + |
| 46 | +static int rtc_write_packet(struct AVFormatContext *s, AVPacket *pkt) |
| 47 | +{ |
| 48 | + return 0; |
| 49 | +} |
| 50 | + |
| 51 | +static int rtc_write_trailer(struct AVFormatContext *s) |
| 52 | +{ |
| 53 | + return 0; |
| 54 | +} |
| 55 | + |
| 56 | +static void rtc_deinit(struct AVFormatContext *s) |
| 57 | +{ |
| 58 | +} |
| 59 | + |
| 60 | +static const AVOption options[] = { |
| 61 | + { NULL }, |
| 62 | +}; |
| 63 | + |
| 64 | +static const AVClass rtc_muxer_class = { |
| 65 | + .class_name = "RTC WHIP muxer", |
| 66 | + .item_name = av_default_item_name, |
| 67 | + .option = NULL, |
| 68 | + .version = LIBAVUTIL_VERSION_INT, |
| 69 | +}; |
| 70 | + |
| 71 | +const FFOutputFormat ff_rtc_muxer = { |
| 72 | + .p.name = "rtc", |
| 73 | + .p.long_name = NULL_IF_CONFIG_SMALL("WebRTC WHIP muxer"), |
| 74 | + .p.audio_codec = AV_CODEC_ID_OPUS, |
| 75 | + .p.video_codec = AV_CODEC_ID_H264, |
| 76 | + .p.flags = AVFMT_NOFILE, |
| 77 | + .p.priv_class = &rtc_muxer_class, |
| 78 | + .priv_data_size = sizeof(RTCContext), |
| 79 | + .init = rtc_init, |
| 80 | + .write_header = rtc_write_header, |
| 81 | + .write_packet = rtc_write_packet, |
| 82 | + .write_trailer = rtc_write_trailer, |
| 83 | + .deinit = rtc_deinit, |
| 84 | +}; |
0 commit comments