From 87f7586126979ed4327e32d29a795972301f2ee9 Mon Sep 17 00:00:00 2001 From: Iwan Timmer Date: Sun, 6 Sep 2015 20:23:30 +0200 Subject: [PATCH] Remove unneeded files added by commit "Move OMX and IMX code to libraries" --- src/a.out | Bin 6064 -> 0 bytes src/sdl/input.h | 53 ------------------------- src/sdl/platform.c | 71 --------------------------------- src/sdl/sdl.h | 31 --------------- src/sdl/video.c | 97 --------------------------------------------- 5 files changed, 252 deletions(-) delete mode 100755 src/a.out delete mode 100644 src/sdl/input.h delete mode 100644 src/sdl/platform.c delete mode 100644 src/sdl/sdl.h delete mode 100644 src/sdl/video.c diff --git a/src/a.out b/src/a.out deleted file mode 100755 index 1449be5f219e02c88c7d491277c9f782923cb9a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6064 zcmb7IYiv}<6`t!|lZBY|@+i-wY!kc1DJ+;68j6~*eqcjvFvf&7BwVe%YwyB7+}*p> zM36wYgt%Y{C8%<$D5V0mM4}REqsWk`wlN_g{ZR)sX{Ab4s*uVqX`6%woP@CbzL`7b znupZP>g>#!^PMwi&Yj1(_ote2$fG)}^ zb^`;F3Q#IUpBv<&41C2N$U!tgqKvjlvQQUvc%l#_>Ia$35erTUV!R2 z@W&w|4TC39&M`=Jz}I1HQZ;yzmNkB0g)NT|)-!GoNzTO~Uk^Fhn+ok?c(EuRYgrTz zFO0{M+0H;F64dRCMj3rWX&qv}oas z4KHwB#LD%$ruct6_TaPXAh3983@ImQ%GEClA!O8=J$ zbM-niV})Z$GnL@H_bn4-3Rb!C;gB(NA3>3xCp z-M~NRz<99uVzJ4TRVr2-`nlUP0q~=!?*Q-^Yw*WeBS0H+A9{wL19;Ei7c+&}pSzmR z=lAwog~I`K=FWIF589T5$S-{XTKUq$_-ALnlvbl`j=Tr8d?~F*DH|D*JV%MrwUK`C z<^S5!_4nL`j~bhsqKgrm=+Hj5XZ<75hxcM#{SkowwjFf-_TN=9=;V7}g}H^j_{)t> z*gmJ11H;uR8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He7O5sI{VaB<(0%LyG4LRBKuBT!}*TkIA{xQS9~a5?t|W&9in1FDp@pJ;2(< zoEC*SJ!_YpfgT&tZT)B{n`@u5{MTIkJwphW2 zUHqsw5s&$CB~LAwEE3@L^YPvZ6`8h#4?3*dQA(EhWi_4D%q|2%k}xqw3M6~6%A z2%h%&PIUx)vxEONcs(BVUk3kuhx{aXUHoXg3I1h!zEcWjiFd#|-`OrW@buR}Ao$9{ z`-lEc0e{BU_aPoL7%2PsQhqmh?icNE33#TTik~g+1Al$Kv&Ay-d>7(L08P zHmt4!${~@j*ut!>UsoBdH`lFNwV|fjYz|h|*U+4N3vbP2rK^}dFQN$E*_#{8>+xxB zsA6=QLoIR0%+3dv1==H)+0klR(QI;Cprupr!cgz-_8b1nmDk_kTT@BcwS*aw_lg=T zfp`8ys1x=ax^3|gVB^080FX(U(NHqX(Z_#Hxal*3b6Cgh7!M4eM3C%wv~`%#ABl7* z+0H59rn3d|TSRDkyD-;mH=FDQQWXznGFTm^iBRZA!5Hb~GCo3bG%myct1!3X*5h)P z-?hN-Y}Q3@%X`tmTaY;U{Rsj;+PZMxu#|%|j`wdAxDqK*e;QW}_A>G)+T*=^z_!O+ zj)geVS`cqf;+WeV2d)uq-q2`D40F6kK)mINV=j0VLgs+F5X-`QgL#~s2li_n8oaIb zxa=ow12OMooA-V*8h*5$ z0NV7Gw*%L0Y1ngN!(q9+1ZI9;krR zDoc=JX^X8FZ5)P^=WQKu-=@GW+P`0cr#<4BxA41Ug^gjQaWA8-am;6q0XKRJ-0#uH ztccH;_b9)kY8!;>_FHH(TOyA4@zLAh-i4gw632V}*llosg`CfVINs;{K09ppp_1dm zW%-Vy?J~3`MYbM9#+CsR- O+1riIryPpf-v0oIx{JmD diff --git a/src/sdl/input.h b/src/sdl/input.h deleted file mode 100644 index e2831d4..0000000 --- a/src/sdl/input.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This file is part of Moonlight Embedded. - * - * Copyright (C) 2015 Iwan Timmer - * - * Moonlight is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Moonlight 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Moonlight; if not, see . - */ - -#include -#include - -static const short keyCodes[] = { - 0x14, //SDLK_CAPSLOCK - 0x70, //SDLK_F1 - 0x71, //SDLK_F2 - 0x72, //SDLK_F3 - 0x73, //SDLK_F4 - 0x74, //SDLK_F5 - 0x75, //SDLK_F6 - 0x76, //SDLK_F7 - 0x77, //SDLK_F8 - 0x78, //SDLK_F9 - 0x79, //SDLK_F10 - 0x7A, //SDLK_F11 - 0x7B, //SDLK_F12 - 0, //SDLK_PRINTSCREEN - 0x91, //SDLK_SCROLLLOCK - 0x13, //SDLK_PAUSE - 0x9B, //SDLK_INSERT - 0x24, //SDLK_HOME - 0x21, //SDLK_PAGEUP - 0, //Not used - 0x23, //SDLK_END - 0x22, //SDLK_PAGEDOWN - 0x27, //SDLK_RIGHT - 0x25, //SDLK_LEFT - 0x28, //SDLK_DOWN - 0x26, //SDLK_UP -}; - -void sdlinput_init(); -int sdlinput_handle_event(SDL_Event* event); diff --git a/src/sdl/platform.c b/src/sdl/platform.c deleted file mode 100644 index 716513f..0000000 --- a/src/sdl/platform.c +++ /dev/null @@ -1,71 +0,0 @@ -/* - * This file is part of Moonlight Embedded. - * - * Copyright (C) 2015 Iwan Timmer - * - * Moonlight is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Moonlight 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Moonlight; if not, see . - */ - -#include "sdl.h" -#include "input.h" - -#include "limelight-common/Limelight.h" - -#include - -static bool done; -static int fullscreen_flags; - -SDL_Window *sdl_window; - -void sdl_init(int width, int height) { - if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS)) { - fprintf(stderr, "Could not initialize SDL - %s\n", SDL_GetError()); - exit(1); - } - - sdl_window = SDL_CreateWindow("Moonlight", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, 0); - if(!sdl_window) { - fprintf(stderr, "SDL: could not create window - exiting\n"); - exit(1); - } - SDL_SetRelativeMouseMode(SDL_TRUE); - sdlinput_init(); -} - -void sdl_loop() { - SDL_Event event; - while(!done && SDL_WaitEvent(&event)) { - switch (sdlinput_handle_event(&event)) { - case SDL_QUIT_APPLICATION: - done = true; - break; - case SDL_TOGGLE_FULLSCREEN: - fullscreen_flags ^= SDL_WINDOW_FULLSCREEN; - SDL_SetWindowFullscreen(sdl_window, fullscreen_flags); - case SDL_MOUSE_GRAB: - SDL_SetRelativeMouseMode(SDL_TRUE); - break; - case SDL_MOUSE_UNGRAB: - SDL_SetRelativeMouseMode(SDL_FALSE); - break; - default: - if (event.type == SDL_QUIT) - done = true; - } - } - - SDL_DestroyWindow(sdl_window); - SDL_Quit(); -} diff --git a/src/sdl/sdl.h b/src/sdl/sdl.h deleted file mode 100644 index 0ec51d1..0000000 --- a/src/sdl/sdl.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * This file is part of Moonlight Embedded. - * - * Copyright (C) 2015 Iwan Timmer - * - * Moonlight is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Moonlight 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Moonlight; if not, see . - */ - -#include - -#define SDL_NOTHING 0 -#define SDL_QUIT_APPLICATION 1 -#define SDL_MOUSE_GRAB 2 -#define SDL_MOUSE_UNGRAB 3 -#define SDL_TOGGLE_FULLSCREEN 4 - -SDL_Window *sdl_window; - -void sdl_init(int width, int height); -void sdl_loop(); diff --git a/src/sdl/video.c b/src/sdl/video.c deleted file mode 100644 index 09e3eac..0000000 --- a/src/sdl/video.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file is part of Moonlight Embedded. - * - * Copyright (C) 2015 Iwan Timmer - * - * Moonlight is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * Moonlight 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Moonlight; if not, see . - */ - -#include "../video/ffmpeg.h" - -#include "limelight-common/Limelight.h" - -#include -#include - -#define DECODER_BUFFER_SIZE 92*1024 - -static SDL_Window *window; -static SDL_Renderer *renderer; -static SDL_Texture *bmp = NULL; -static int screen_width, screen_height; -static char* ffmpeg_buffer; - -static void sdl_setup(int width, int height, int redrawRate, void* context, int drFlags) { - int avc_flags = FAST_BILINEAR_FILTERING; - if (ffmpeg_init(width, height, 2, avc_flags) < 0) { - fprintf(stderr, "Couldn't initialize video decoding\n"); - exit(1); - } - - ffmpeg_buffer = malloc(DECODER_BUFFER_SIZE + FF_INPUT_BUFFER_PADDING_SIZE); - if (ffmpeg_buffer == NULL) { - fprintf(stderr, "Not enough memory\n"); - exit(1); - } - - SDL_Window *window = (SDL_Window*) context; - renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED); - if (!renderer) { - fprintf(stderr, "SDL: could not create renderer - exiting\n"); - exit(1); - } - - bmp = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12, SDL_TEXTUREACCESS_TARGET, width, height); - if (!bmp) { - fprintf(stderr, "SDL: could not create texture - exiting\n"); - exit(1); - } -} - -static void sdl_cleanup() { - ffmpeg_destroy(); -} - -static int sdl_submit_decode_unit(PDECODE_UNIT decodeUnit) { - if (decodeUnit->fullLength < DECODER_BUFFER_SIZE) { - PLENTRY entry = decodeUnit->bufferList; - int length = 0; - while (entry != NULL) { - memcpy(ffmpeg_buffer+length, entry->data, entry->length); - length += entry->length; - entry = entry->next; - } - - int ret = ffmpeg_decode(ffmpeg_buffer, length); - if (ret == 1) { - AVFrame* frame = ffmpeg_get_frame(); - - SDL_UpdateYUVTexture(bmp, NULL, frame->data[0], frame->linesize[0], frame->data[1], frame->linesize[1], frame->data[2], frame->linesize[2]); - SDL_RenderClear(renderer); - SDL_RenderCopy(renderer, bmp, NULL, NULL); - SDL_RenderPresent(renderer); - } - } else { - fprintf(stderr, "Video decode buffer too small"); - exit(1); - } - - return DR_OK; -} - -DECODER_RENDERER_CALLBACKS decoder_callbacks_sdl = { - .setup = sdl_setup, - .cleanup = sdl_cleanup, - .submitDecodeUnit = sdl_submit_decode_unit, -};