| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Memory buffer source filter | 2 * Memory buffer source filter |
| 3 * Copyright (c) 2008 Vitor Sessak | 3 * Copyright (c) 2008 Vitor Sessak |
| 4 * | 4 * |
| 5 * This file is part of FFmpeg. | 5 * This file is part of FFmpeg. |
| 6 * | 6 * |
| 7 * FFmpeg is free software; you can redistribute it and/or | 7 * FFmpeg is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Lesser General Public | 8 * modify it under the terms of the GNU Lesser General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2.1 of the License, or (at your option) any later version. | 10 * version 2.1 of the License, or (at your option) any later version. |
| 11 * | 11 * |
| 12 * FFmpeg is distributed in the hope that it will be useful, | 12 * FFmpeg is distributed in the hope that it will be useful, |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 * Lesser General Public License for more details. | 15 * Lesser General Public License for more details. |
| 16 * | 16 * |
| 17 * You should have received a copy of the GNU Lesser General Public | 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 | 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 | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 */ | 20 */ |
| 21 | 21 |
| 22 #include "avfilter.h" | 22 #include "avfilter.h" |
| 23 #include "vsrc_buffer.h" | 23 #include "vsrc_buffer.h" |
| 24 | 24 |
| 25 typedef struct { | 25 typedef struct { |
| 26 int64_t pts; | 26 int64_t pts; |
| 27 AVFrame frame; | 27 AVFrame frame; |
| 28 int has_frame; | 28 int has_frame; |
| 29 int h, w, pix_fmt; | 29 int h, w; |
| 30 enum PixelFormat pix_fmt; |
| 30 AVRational pixel_aspect; | 31 AVRational pixel_aspect; |
| 31 } BufferSourceContext; | 32 } BufferSourceContext; |
| 32 | 33 |
| 33 | 34 |
| 34 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, | 35 int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, |
| 35 int64_t pts, AVRational pixel_aspect) | 36 int64_t pts, AVRational pixel_aspect) |
| 36 { | 37 { |
| 37 BufferSourceContext *c = buffer_filter->priv; | 38 BufferSourceContext *c = buffer_filter->priv; |
| 38 | 39 |
| 39 if (c->has_frame) { | 40 if (c->has_frame) { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 .init = init, | 136 .init = init, |
| 136 | 137 |
| 137 .inputs = (AVFilterPad[]) {{ .name = NULL }}, | 138 .inputs = (AVFilterPad[]) {{ .name = NULL }}, |
| 138 .outputs = (AVFilterPad[]) {{ .name = "default", | 139 .outputs = (AVFilterPad[]) {{ .name = "default", |
| 139 .type = AVMEDIA_TYPE_VIDEO, | 140 .type = AVMEDIA_TYPE_VIDEO, |
| 140 .request_frame = request_frame, | 141 .request_frame = request_frame, |
| 141 .poll_frame = poll_frame, | 142 .poll_frame = poll_frame, |
| 142 .config_props = config_props, }, | 143 .config_props = config_props, }, |
| 143 { .name = NULL}}, | 144 { .name = NULL}}, |
| 144 }; | 145 }; |
| OLD | NEW |