and_vid_mediacodec.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C)2020 Teluu Inc. (http://www.teluu.com)
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation; either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. */
  18. #ifndef __PJMEDIA_CODEC_AND_VID_MEDIACODEC_H__
  19. #define __PJMEDIA_CODEC_AND_VID_MEDIACODEC_H__
  20. #include <pjmedia-codec/types.h>
  21. #include <pjmedia/vid_codec.h>
  22. /**
  23. * @file pjmedia-codec/and_vid_mediacodec.h
  24. * @brief Android video Mediacodec codecs.
  25. */
  26. PJ_BEGIN_DECL
  27. /**
  28. * @defgroup PJMEDIA_HAS_ANDROID_MEDIACODEC Android Mediacodec Codec
  29. * @ingroup PJMEDIA_CODEC_VID_CODECS
  30. * @{
  31. *
  32. *
  33. * Video MediaCodec codec wrapper for Android.
  34. *
  35. * This codec wrapper contains varius codecs: i.e: H.264/AVC, VP8 and VP9.
  36. * The H.264 codec wrapper only supports non-interleaved packetization
  37. * mode. If remote uses a different mode (e.g: single-nal), this will cause
  38. * unpacketization issue and affect decoding process.
  39. */
  40. /**
  41. * Initialize and register Android Mediacodec video codec factory.
  42. *
  43. * @param mgr The video codec manager instance where this codec will
  44. * be registered to. Specify NULL to use default instance
  45. * (in that case, an instance of video codec manager must
  46. * have been created beforehand).
  47. * @param pf Pool factory.
  48. *
  49. * @return PJ_SUCCESS on success.
  50. */
  51. PJ_DECL(pj_status_t) pjmedia_codec_and_media_vid_init(
  52. pjmedia_vid_codec_mgr *mgr,
  53. pj_pool_factory *pf);
  54. /**
  55. * Unregister Android Mediacodec video codecs factory from the video codec
  56. * manager and deinitialize the codec library.
  57. *
  58. * @return PJ_SUCCESS on success.
  59. */
  60. PJ_DECL(pj_status_t) pjmedia_codec_and_media_vid_deinit(void);
  61. /**
  62. * @}
  63. */
  64. PJ_END_DECL
  65. #endif /* __PJMEDIA_CODEC_AND_VID_MEDIACODEC_H__ */