From patchwork Thu Sep 22 19:28:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josh Dekker X-Patchwork-Id: 687 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.66 with SMTP id o63csp183662vsd; Thu, 22 Sep 2016 12:29:31 -0700 (PDT) X-Received: by 10.194.223.8 with SMTP id qq8mr3560238wjc.7.1474572571802; Thu, 22 Sep 2016 12:29:31 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z2si3522423wjl.141.2016.09.22.12.29.30; Thu, 22 Sep 2016 12:29:31 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@itanimul.li; dkim=neutral (body hash did not verify) header.i=@messagingengine.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C021689D50; Thu, 22 Sep 2016 22:28:33 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C738689D4B for ; Thu, 22 Sep 2016 22:28:26 +0300 (EEST) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8B78E20ACE for ; Thu, 22 Sep 2016 15:28:40 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Thu, 22 Sep 2016 15:28:40 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=itanimul.li; h= date:from:in-reply-to:message-id:references:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=6Qd9ojnJvNDh65/ctfelj7OiCU0 =; b=iGLPjjkX4W8C+yiCCo5n4TPlO9RxWbxNQDkVx4rko/VUQWKvIALw55CU3SH 1v0UTx0psE7F6MHUG19mDoqB3tuNRavqpYSDCMLtn0ObYCmvrub8OxIOZzRmV/Oy iTsxE2/y7qKwuVgfsvHR9g5DrwXHwz71UVGZsOoZcvrjqTUw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:in-reply-to:message-id :references:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=6Qd9 ojnJvNDh65/ctfelj7OiCU0=; b=SSrs+r5BHmc5ZYSlCvdJ64qOnYBYJj7Whkjw sQK8wtumNZGtoOZuGuZYL6j1AzumZ92kMzFZ9lbWQSr9GtDpraUIcHr2Oc1hXY6j bcsaiBfF/yyb80AOsEZ9DGos3gokLFvQ8mLNQ29olzw4waXoGYVIPSAaLn7bPjw6 dk9nI/k= X-Sasl-enc: Kjjt0uMhv9iyXm1unAy536pIVpbNQKRxH8C/AbM47A/b 1474572519 Received: from localhost (cpc75394-sotn16-2-0-cust168.15-1.cable.virginm.net [82.22.8.169]) by mail.messagingengine.com (Postfix) with ESMTPA id DF025F2985 for ; Thu, 22 Sep 2016 15:28:39 -0400 (EDT) From: Josh de Kock To: ffmpeg-devel@ffmpeg.org Date: Thu, 22 Sep 2016 20:28:51 +0100 Message-Id: <20160922192851.98019-6-josh@itanimul.li> X-Mailer: git-send-email 2.8.4 (Apple Git-73) In-Reply-To: <20160922192851.98019-1-josh@itanimul.li> References: <20160922192851.98019-1-josh@itanimul.li> Subject: [FFmpeg-devel] [PATCH 5/5] lavd: drop SDL1 device & drop SDL1 support in general X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Josh de Kock --- Changelog | 2 + configure | 33 +---- libavdevice/Makefile | 1 - libavdevice/alldevices.c | 1 - libavdevice/sdl.c | 377 ----------------------------------------------- 5 files changed, 3 insertions(+), 411 deletions(-) delete mode 100644 libavdevice/sdl.c diff --git a/Changelog b/Changelog index 32278f0..2652cd5 100644 --- a/Changelog +++ b/Changelog @@ -33,6 +33,8 @@ version : - Meridian Lossless Packing (MLP) encoder - sdl2 output device - sdl2 support for ffplay +- sdl1 output device removed +- sdl1 support removed version 3.1: diff --git a/configure b/configure index be9dee8..75d91d0 100755 --- a/configure +++ b/configure @@ -291,7 +291,6 @@ External library support: if gnutls is not used [no] --disable-schannel disable SChannel SSP, needed for TLS support on Windows if openssl and gnutls are not used [autodetect] - --disable-sdl disable sdl [autodetect] --disable-sdl2 disable sdl2 [autodetect] --disable-securetransport disable Secure Transport, needed for TLS support on OSX if openssl and gnutls are not used [autodetect] @@ -1548,7 +1547,6 @@ EXTERNAL_LIBRARY_LIST=" opengl openssl schannel - sdl sdl2 securetransport videotoolbox @@ -2023,7 +2021,6 @@ HAVE_LIST=" MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS perl pod2man - sdl sdl2 section_data_rel_ro texi2html @@ -2950,7 +2947,6 @@ pulse_indev_deps="libpulse" pulse_outdev_deps="libpulse" qtkit_indev_extralibs="-framework QTKit -framework Foundation -framework QuartzCore" qtkit_indev_select="qtkit" -sdl_outdev_deps="sdl" sdl2_outdev_deps="sdl2" sndio_indev_deps="sndio_h" sndio_outdev_deps="sndio_h" @@ -5857,7 +5853,7 @@ if enabled gcrypt; then fi fi -if ! disabled sdl2 && ! enabled sdl; then +if ! disabled sdl2; then SDL2_CONFIG="${cross_prefix}sdl2-config" if check_pkg_config sdl2 SDL_events.h SDL_PollEvent; then check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags && @@ -5878,32 +5874,6 @@ if ! disabled sdl2 && ! enabled sdl; then fi enabled sdl2 && add_cflags $sdl2_cflags && add_extralibs $sdl2_libs -if ! disabled sdl && ! enabled sdl2; then - SDL_CONFIG="${cross_prefix}sdl-config" - if check_pkg_config sdl SDL_events.h SDL_PollEvent; then - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags && - enable sdl - else - if "${SDL_CONFIG}" --version > /dev/null 2>&1; then - sdl_cflags=$("${SDL_CONFIG}" --cflags) - sdl_libs=$("${SDL_CONFIG}" --libs) - check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags && - check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags && - enable sdl - elif enabled sdl ; then - die "ERROR: SDL not found" - else - disable sdl - fi - fi - if test $target_os = "mingw32"; then - sdl_libs="$sdl_libs -mconsole" - fi -fi -enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs - disabled securetransport || { check_func SecIdentityCreate "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && check_lib2 "Security/SecureTransport.h Security/Security.h" "SSLCreateContext SecItemImport" "-Wl,-framework,CoreFoundation -Wl,-framework,Security" && enable securetransport; } @@ -6507,7 +6477,6 @@ echo "new filter support ${avfilter-no}" echo "network support ${network-no}" echo "threading support ${thread_type-no}" echo "safe bitstream reader ${safe_bitstream_reader-no}" -echo "SDL support ${sdl-no}" echo "SDL2 support ${sdl2-no}" echo "opencl enabled ${opencl-no}" echo "JNI support ${jni-no}" diff --git a/libavdevice/Makefile b/libavdevice/Makefile index 1c4b4d3..256e140 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -40,7 +40,6 @@ OBJS-$(CONFIG_PULSE_INDEV) += pulse_audio_dec.o \ OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o -OBJS-$(CONFIG_SDL_OUTDEV) += sdl.o OBJS-$(CONFIG_SDL2_OUTDEV) += sdl2.o OBJS-$(CONFIG_SNDIO_INDEV) += sndio_dec.o sndio.o OBJS-$(CONFIG_SNDIO_OUTDEV) += sndio_enc.o sndio.o diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index c0a9d9a..a761be4 100644 --- a/libavdevice/alldevices.c +++ b/libavdevice/alldevices.c @@ -63,7 +63,6 @@ void avdevice_register_all(void) REGISTER_INOUTDEV(OSS, oss); REGISTER_INOUTDEV(PULSE, pulse); REGISTER_INDEV (QTKIT, qtkit); - REGISTER_OUTDEV (SDL, sdl); REGISTER_OUTDEV (SDL2, sdl2); REGISTER_INOUTDEV(SNDIO, sndio); REGISTER_INOUTDEV(V4L2, v4l2); diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c deleted file mode 100644 index 4322750..0000000 --- a/libavdevice/sdl.c +++ /dev/null @@ -1,377 +0,0 @@ -/* - * Copyright (c) 2011 Stefano Sabatini - * - * This file is part of FFmpeg. - * - * FFmpeg is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * FFmpeg is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with FFmpeg; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * libSDL output device - */ - -#include -#include - -#include "libavutil/avstring.h" -#include "libavutil/imgutils.h" -#include "libavutil/opt.h" -#include "libavutil/parseutils.h" -#include "libavutil/pixdesc.h" -#include "libavutil/time.h" -#include "avdevice.h" - -typedef struct { - AVClass *class; - SDL_Surface *surface; - SDL_Overlay *overlay; - char *window_title; - char *icon_title; - int window_width, window_height; /**< size of the window */ - int window_fullscreen; - - SDL_Rect overlay_rect; - int overlay_fmt; - - int sdl_was_already_inited; - SDL_Thread *event_thread; - SDL_mutex *mutex; - SDL_cond *init_cond; - int init_ret; /* return code used to signal initialization errors */ - int inited; - int quit; -} SDLContext; - -static const struct sdl_overlay_pix_fmt_entry { - enum AVPixelFormat pix_fmt; int overlay_fmt; -} sdl_overlay_pix_fmt_map[] = { - { AV_PIX_FMT_YUV420P, SDL_IYUV_OVERLAY }, - { AV_PIX_FMT_YUYV422, SDL_YUY2_OVERLAY }, - { AV_PIX_FMT_UYVY422, SDL_UYVY_OVERLAY }, - { AV_PIX_FMT_NONE, 0 }, -}; - -static int sdl_write_trailer(AVFormatContext *s) -{ - SDLContext *sdl = s->priv_data; - - sdl->quit = 1; - - if (sdl->overlay) - SDL_FreeYUVOverlay(sdl->overlay); - sdl->overlay = NULL; - if (sdl->event_thread) - SDL_WaitThread(sdl->event_thread, NULL); - sdl->event_thread = NULL; - if (sdl->mutex) - SDL_DestroyMutex(sdl->mutex); - sdl->mutex = NULL; - if (sdl->init_cond) - SDL_DestroyCond(sdl->init_cond); - sdl->init_cond = NULL; - - if (!sdl->sdl_was_already_inited) - SDL_Quit(); - - return 0; -} - -static void compute_overlay_rect(AVFormatContext *s) -{ - AVRational sar, dar; /* sample and display aspect ratios */ - SDLContext *sdl = s->priv_data; - AVStream *st = s->streams[0]; - AVCodecParameters *par = st->codecpar; - SDL_Rect *overlay_rect = &sdl->overlay_rect; - - /* compute overlay width and height from the codec context information */ - sar = st->sample_aspect_ratio.num ? st->sample_aspect_ratio : (AVRational){ 1, 1 }; - dar = av_mul_q(sar, (AVRational){ par->width, par->height }); - - /* we suppose the screen has a 1/1 sample aspect ratio */ - if (sdl->window_width && sdl->window_height) { - /* fit in the window */ - if (av_cmp_q(dar, (AVRational){ sdl->window_width, sdl->window_height }) > 0) { - /* fit in width */ - overlay_rect->w = sdl->window_width; - overlay_rect->h = av_rescale(overlay_rect->w, dar.den, dar.num); - } else { - /* fit in height */ - overlay_rect->h = sdl->window_height; - overlay_rect->w = av_rescale(overlay_rect->h, dar.num, dar.den); - } - } else { - if (sar.num > sar.den) { - overlay_rect->w = par->width; - overlay_rect->h = av_rescale(overlay_rect->w, dar.den, dar.num); - } else { - overlay_rect->h = par->height; - overlay_rect->w = av_rescale(overlay_rect->h, dar.num, dar.den); - } - sdl->window_width = overlay_rect->w; - sdl->window_height = overlay_rect->h; - } - - overlay_rect->x = (sdl->window_width - overlay_rect->w) / 2; - overlay_rect->y = (sdl->window_height - overlay_rect->h) / 2; -} - -#define SDL_BASE_FLAGS (SDL_SWSURFACE|SDL_RESIZABLE) - -static int event_thread(void *arg) -{ - AVFormatContext *s = arg; - SDLContext *sdl = s->priv_data; - int flags = SDL_BASE_FLAGS | (sdl->window_fullscreen ? SDL_FULLSCREEN : 0); - AVStream *st = s->streams[0]; - AVCodecParameters *par = st->codecpar; - - /* initialization */ - if (SDL_Init(SDL_INIT_VIDEO) != 0) { - av_log(s, AV_LOG_ERROR, "Unable to initialize SDL: %s\n", SDL_GetError()); - sdl->init_ret = AVERROR(EINVAL); - goto init_end; - } - - SDL_WM_SetCaption(sdl->window_title, sdl->icon_title); - sdl->surface = SDL_SetVideoMode(sdl->window_width, sdl->window_height, - 24, flags); - if (!sdl->surface) { - av_log(sdl, AV_LOG_ERROR, "Unable to set video mode: %s\n", SDL_GetError()); - sdl->init_ret = AVERROR(EINVAL); - goto init_end; - } - - sdl->overlay = SDL_CreateYUVOverlay(par->width, par->height, - sdl->overlay_fmt, sdl->surface); - if (!sdl->overlay || sdl->overlay->pitches[0] < par->width) { - av_log(s, AV_LOG_ERROR, - "SDL does not support an overlay with size of %dx%d pixels\n", - par->width, par->height); - sdl->init_ret = AVERROR(EINVAL); - goto init_end; - } - - sdl->init_ret = 0; - av_log(s, AV_LOG_VERBOSE, "w:%d h:%d fmt:%s -> w:%d h:%d\n", - par->width, par->height, av_get_pix_fmt_name(par->format), - sdl->overlay_rect.w, sdl->overlay_rect.h); - -init_end: - SDL_LockMutex(sdl->mutex); - sdl->inited = 1; - SDL_UnlockMutex(sdl->mutex); - SDL_CondSignal(sdl->init_cond); - - if (sdl->init_ret < 0) - return sdl->init_ret; - - /* event loop */ - while (!sdl->quit) { - int ret; - SDL_Event event; - SDL_PumpEvents(); - ret = SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_ALLEVENTS); - if (ret < 0) { - av_log(s, AV_LOG_ERROR, "Error when getting SDL event: %s\n", SDL_GetError()); - continue; - } - if (ret == 0) { - SDL_Delay(10); - continue; - } - - switch (event.type) { - case SDL_KEYDOWN: - switch (event.key.keysym.sym) { - case SDLK_ESCAPE: - case SDLK_q: - sdl->quit = 1; - break; - } - break; - case SDL_QUIT: - sdl->quit = 1; - break; - - case SDL_VIDEORESIZE: - sdl->window_width = event.resize.w; - sdl->window_height = event.resize.h; - - SDL_LockMutex(sdl->mutex); - sdl->surface = SDL_SetVideoMode(sdl->window_width, sdl->window_height, 24, SDL_BASE_FLAGS); - if (!sdl->surface) { - av_log(s, AV_LOG_ERROR, "Failed to set SDL video mode: %s\n", SDL_GetError()); - sdl->quit = 1; - } else { - compute_overlay_rect(s); - } - SDL_UnlockMutex(sdl->mutex); - break; - - default: - break; - } - } - - return 0; -} - -static int sdl_write_header(AVFormatContext *s) -{ - SDLContext *sdl = s->priv_data; - AVStream *st = s->streams[0]; - AVCodecParameters *par = st->codecpar; - int i, ret; - - if (!sdl->window_title) - sdl->window_title = av_strdup(s->filename); - if (!sdl->icon_title) - sdl->icon_title = av_strdup(sdl->window_title); - - if (SDL_WasInit(SDL_INIT_VIDEO)) { - av_log(s, AV_LOG_ERROR, - "SDL video subsystem was already inited, aborting\n"); - sdl->sdl_was_already_inited = 1; - ret = AVERROR(EINVAL); - goto fail; - } - - if ( s->nb_streams > 1 - || par->codec_type != AVMEDIA_TYPE_VIDEO - || par->codec_id != AV_CODEC_ID_RAWVIDEO) { - av_log(s, AV_LOG_ERROR, "Only supports one rawvideo stream\n"); - ret = AVERROR(EINVAL); - goto fail; - } - - for (i = 0; sdl_overlay_pix_fmt_map[i].pix_fmt != AV_PIX_FMT_NONE; i++) { - if (sdl_overlay_pix_fmt_map[i].pix_fmt == par->format) { - sdl->overlay_fmt = sdl_overlay_pix_fmt_map[i].overlay_fmt; - break; - } - } - - if (!sdl->overlay_fmt) { - av_log(s, AV_LOG_ERROR, - "Unsupported pixel format '%s', choose one of yuv420p, yuyv422, or uyvy422\n", - av_get_pix_fmt_name(par->format)); - ret = AVERROR(EINVAL); - goto fail; - } - - /* compute overlay width and height from the codec context information */ - compute_overlay_rect(s); - - sdl->init_cond = SDL_CreateCond(); - if (!sdl->init_cond) { - av_log(s, AV_LOG_ERROR, "Could not create SDL condition variable: %s\n", SDL_GetError()); - ret = AVERROR_EXTERNAL; - goto fail; - } - sdl->mutex = SDL_CreateMutex(); - if (!sdl->mutex) { - av_log(s, AV_LOG_ERROR, "Could not create SDL mutex: %s\n", SDL_GetError()); - ret = AVERROR_EXTERNAL; - goto fail; - } - sdl->event_thread = SDL_CreateThread(event_thread, s); - if (!sdl->event_thread) { - av_log(s, AV_LOG_ERROR, "Could not create SDL event thread: %s\n", SDL_GetError()); - ret = AVERROR_EXTERNAL; - goto fail; - } - - /* wait until the video system has been inited */ - SDL_LockMutex(sdl->mutex); - while (!sdl->inited) { - SDL_CondWait(sdl->init_cond, sdl->mutex); - } - SDL_UnlockMutex(sdl->mutex); - if (sdl->init_ret < 0) { - ret = sdl->init_ret; - goto fail; - } - return 0; - -fail: - sdl_write_trailer(s); - return ret; -} - -static int sdl_write_packet(AVFormatContext *s, AVPacket *pkt) -{ - SDLContext *sdl = s->priv_data; - AVCodecParameters *par = s->streams[0]->codecpar; - uint8_t *data[4]; - int linesize[4]; - int i; - - if (sdl->quit) { - sdl_write_trailer(s); - return AVERROR(EIO); - } - av_image_fill_arrays(data, linesize, pkt->data, par->format, par->width, par->height, 1); - - SDL_LockMutex(sdl->mutex); - SDL_FillRect(sdl->surface, &sdl->surface->clip_rect, - SDL_MapRGB(sdl->surface->format, 0, 0, 0)); - SDL_LockYUVOverlay(sdl->overlay); - for (i = 0; i < 3; i++) { - sdl->overlay->pixels [i] = data [i]; - sdl->overlay->pitches[i] = linesize[i]; - } - SDL_DisplayYUVOverlay(sdl->overlay, &sdl->overlay_rect); - SDL_UnlockYUVOverlay(sdl->overlay); - - SDL_UpdateRect(sdl->surface, - sdl->overlay_rect.x, sdl->overlay_rect.y, - sdl->overlay_rect.w, sdl->overlay_rect.h); - SDL_UnlockMutex(sdl->mutex); - - return 0; -} - -#define OFFSET(x) offsetof(SDLContext,x) - -static const AVOption options[] = { - { "window_title", "set SDL window title", OFFSET(window_title), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, - { "icon_title", "set SDL iconified window title", OFFSET(icon_title) , AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, - { "window_size", "set SDL window forced size", OFFSET(window_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, 0, AV_OPT_FLAG_ENCODING_PARAM }, - { "window_fullscreen", "set SDL window fullscreen", OFFSET(window_fullscreen), AV_OPT_TYPE_INT, { .i64 = 0 }, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM }, - { NULL }, -}; - -static const AVClass sdl_class = { - .class_name = "sdl outdev", - .item_name = av_default_item_name, - .option = options, - .version = LIBAVUTIL_VERSION_INT, - .category = AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT, -}; - -AVOutputFormat ff_sdl_muxer = { - .name = "sdl", - .long_name = NULL_IF_CONFIG_SMALL("SDL output device"), - .priv_data_size = sizeof(SDLContext), - .audio_codec = AV_CODEC_ID_NONE, - .video_codec = AV_CODEC_ID_RAWVIDEO, - .write_header = sdl_write_header, - .write_packet = sdl_write_packet, - .write_trailer = sdl_write_trailer, - .flags = AVFMT_NOFILE | AVFMT_VARIABLE_FPS | AVFMT_NOTIMESTAMPS, - .priv_class = &sdl_class, -};