ijksdl_codec_android_mediaformat.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*****************************************************************************
  2. * ijksdl_codec_android_mediaformat.h
  3. *****************************************************************************
  4. *
  5. * Copyright (c) 2014 Bilibili
  6. * copyright (c) 2014 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. #ifndef IJKSDL_ANDROID__ANDROID_CODEC_ANDROID_MEDIAFORMAT_H
  25. #define IJKSDL_ANDROID__ANDROID_CODEC_ANDROID_MEDIAFORMAT_H
  26. #include "../ijksdl_stdinc.h"
  27. #include <stdbool.h>
  28. #include <jni.h>
  29. #include <sys/types.h>
  30. #include "../ijksdl_mutex.h"
  31. #include "ijksdl_codec_android_mediadef.h"
  32. typedef struct SDL_AMediaFormat_Opaque SDL_AMediaFormat_Opaque;
  33. typedef struct SDL_AMediaFormat SDL_AMediaFormat;
  34. typedef struct SDL_AMediaFormat
  35. {
  36. SDL_mutex *mutex;
  37. SDL_AMediaFormat_Opaque *opaque;
  38. sdl_amedia_status_t (*func_delete)(SDL_AMediaFormat *aformat);
  39. bool (*func_getInt32)(SDL_AMediaFormat* aformat, const char* name, int32_t *out);
  40. void (*func_setInt32)(SDL_AMediaFormat* aformat, const char* name, int32_t value);
  41. void (*func_setBuffer)(SDL_AMediaFormat* aformat, const char* name, void* data, size_t size);
  42. } SDL_AMediaFormat;
  43. sdl_amedia_status_t SDL_AMediaFormat_delete(SDL_AMediaFormat* aformat);
  44. sdl_amedia_status_t SDL_AMediaFormat_deleteP(SDL_AMediaFormat** aformat);
  45. bool SDL_AMediaFormat_getInt32(SDL_AMediaFormat* aformat, const char* name, int32_t *out);
  46. void SDL_AMediaFormat_setInt32(SDL_AMediaFormat* aformat, const char* name, int32_t value);
  47. void SDL_AMediaFormat_setBuffer(SDL_AMediaFormat* aformat, const char* name, void* data, size_t size);
  48. #endif