From patchwork Tue Jan 31 00:02:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas Sandery X-Patchwork-Id: 2375 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.89.21 with SMTP id n21csp1708116vsb; Mon, 30 Jan 2017 16:39:46 -0800 (PST) X-Received: by 10.28.8.130 with SMTP id 124mr15601957wmi.65.1485823186461; Mon, 30 Jan 2017 16:39:46 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 191si13706960wmk.94.2017.01.30.16.39.45; Mon, 30 Jan 2017 16:39:46 -0800 (PST) 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; 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 3087868A30A; Tue, 31 Jan 2017 02:39:40 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from icp-osb-irony-out7.external.iinet.net.au (icp-osb-irony-out7.external.iinet.net.au [203.59.1.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5721F68A139 for ; Tue, 31 Jan 2017 02:39:32 +0200 (EET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2A4BQBe3I9Y/2tRYIENUBwBAQQBAQoBAYQ1Kl+DVZtvk0KEGxoQhXiDAgECAQEBAQEChXMBKX4EAwECKwIETRsGAgEBiWuqOWiCJSaKcgELARYPhkuCBQiHQgksgjqCXwWbVFyDE4J4ixSCTIgDhiYCiwCHf4FyEwgRGYR0H4F0YgGIRQEBAQ X-IPAS-Result: A2A4BQBe3I9Y/2tRYIENUBwBAQQBAQoBAYQ1Kl+DVZtvk0KEGxoQhXiDAgECAQEBAQEChXMBKX4EAwECKwIETRsGAgEBiWuqOWiCJSaKcgELARYPhkuCBQiHQgksgjqCXwWbVFyDE4J4ixSCTIgDhiYCiwCHf4FyEwgRGYR0H4F0YgGIRQEBAQ X-IronPort-AV: E=Sophos;i="5.33,312,1477929600"; d="scan'208,223";a="862858174" Received: from unknown (HELO [10.27.36.55]) ([129.96.81.107]) by icp-osb-irony-out7.iinet.net.au with ESMTP; 31 Jan 2017 08:39:10 +0800 From: Lucas Sandery To: ffmpeg-devel@ffmpeg.org Message-ID: <137ead00-c5a5-2471-4ec8-42e5682e3f5b@adam.com.au> Date: Tue, 31 Jan 2017 10:32:14 +1030 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] Allow borderless playback windows 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" For a pure video tile effect, and enabling better integration of playback windows into other programs. It would improve the looks in many situations and avoid ugly hacks like this: http://stackoverflow.com/q/31465630/315024 From f1519f82373366596e4f2fee80a3e6be043daad6 Mon Sep 17 00:00:00 2001 From: Lucas Sandery Date: Tue, 31 Jan 2017 10:01:40 +1030 Subject: [PATCH] Allow borderless playback windows For a pure video tile effect, and enabling better integration of playback windows into other programs. It would improve the looks in many situations and avoid ugly hacks like this: http://stackoverflow.com/q/31465630/315024 Signed-off-by: Lucas Sandery --- ffplay.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ffplay.c b/ffplay.c index 7ea172f8da..6a426da33b 100644 --- a/ffplay.c +++ b/ffplay.c @@ -321,6 +321,7 @@ static int subtitle_disable; static const char* wanted_stream_spec[AVMEDIA_TYPE_NB] = {0}; static int seek_by_bytes = -1; static int display_disable; +static int borderless; static int startup_volume = 100; static int show_status = 1; static int av_sync_type = AV_SYNC_AUDIO_MASTER; @@ -1265,6 +1266,8 @@ static int video_open(VideoState *is) window_title = input_filename; if (is_full_screen) flags |= SDL_WINDOW_FULLSCREEN_DESKTOP; + if (borderless) + flags |= SDL_WINDOW_BORDERLESS; window = SDL_CreateWindow(window_title, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, w, h, flags); SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); if (window) { @@ -3513,6 +3516,7 @@ static const OptionDef options[] = { { "t", HAS_ARG, { .func_arg = opt_duration }, "play \"duration\" seconds of audio/video", "duration" }, { "bytes", OPT_INT | HAS_ARG, { &seek_by_bytes }, "seek by bytes 0=off 1=on -1=auto", "val" }, { "nodisp", OPT_BOOL, { &display_disable }, "disable graphical display" }, + { "noborder", OPT_BOOL, { &borderless }, "borderless display" }, { "volume", OPT_INT | HAS_ARG, { &startup_volume}, "set startup volume 0=min 100=max", "volume" }, { "f", HAS_ARG, { .func_arg = opt_format }, "force format", "fmt" }, { "pix_fmt", HAS_ARG | OPT_EXPERT | OPT_VIDEO, { .func_arg = opt_frame_pix_fmt }, "set pixel format", "format" }, -- 2.11.0.windows.3