ijksdl_vout_dummy.c 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*****************************************************************************
  2. * ijksdl_vout_dummy.c
  3. *****************************************************************************
  4. *
  5. * Copyright (c) 2013 Bilibili
  6. * copyright (c) 2013 Zhang Rui <bbcallen@gmail.com>
  7. *
  8. * This file is part of ijkPlayer.
  9. *
  10. * ijkPlayer is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation; either
  13. * version 2.1 of the License, or (at your option) any later version.
  14. *
  15. * ijkPlayer is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with ijkPlayer; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. */
  24. #include "ijksdl_vout_dummy.h"
  25. #include "../ijksdl_vout.h"
  26. #include "../ijksdl_vout_internal.h"
  27. typedef struct SDL_VoutSurface_Opaque {
  28. SDL_Vout *vout;
  29. } SDL_VoutSurface_Opaque;
  30. struct SDL_Vout_Opaque {
  31. char dummy;
  32. };
  33. static void func_free_l(SDL_Vout *vout)
  34. {
  35. if (!vout)
  36. return;
  37. SDL_Vout_Opaque *opaque = vout->opaque;
  38. if (opaque) {
  39. }
  40. SDL_Vout_FreeInternal(vout);
  41. }
  42. static int func_display_overlay_l(SDL_Vout *vout, SDL_VoutOverlay *overlay)
  43. {
  44. return 0;
  45. }
  46. static int func_display_overlay(SDL_Vout *vout, SDL_VoutOverlay *overlay)
  47. {
  48. SDL_LockMutex(vout->mutex);
  49. int retval = func_display_overlay_l(vout, overlay);
  50. SDL_UnlockMutex(vout->mutex);
  51. return retval;
  52. }
  53. SDL_Vout *SDL_VoutDummy_Create()
  54. {
  55. SDL_Vout *vout = SDL_Vout_CreateInternal(sizeof(SDL_Vout_Opaque));
  56. if (!vout)
  57. return NULL;
  58. // SDL_Vout_Opaque *opaque = vout->opaque;
  59. vout->free_l = func_free_l;
  60. vout->display_overlay = func_display_overlay;
  61. return vout;
  62. }