tdav_session_audio.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango.org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. /**@file tdav_session_audio.h
  23. * @brief Audio Session plugin.
  24. *
  25. * @author Mamadou Diop <diopmamadou(at)doubango.org>
  26. *
  27. */
  28. #ifndef TINYDAV_SESSION_AUDIO_H
  29. #define TINYDAV_SESSION_AUDIO_H
  30. #include "tinydav_config.h"
  31. #include "tinydav/tdav_session_av.h"
  32. #include "tsk_timer.h"
  33. TDAV_BEGIN_DECLS
  34. typedef tsk_list_t tdav_session_audio_dtmfe_L_t;
  35. typedef struct tdav_session_audio_s {
  36. TDAV_DECLARE_SESSION_AV;
  37. tsk_bool_t is_started;
  38. struct {
  39. unsigned started:1;
  40. tsk_timer_manager_handle_t* handle_mgr_global;
  41. } timer;
  42. struct {
  43. uint32_t payload_type;
  44. struct tmedia_codec_s* codec;
  45. void* buffer;
  46. tsk_size_t buffer_size;
  47. struct {
  48. void* buffer;
  49. tsk_size_t buffer_size;
  50. struct tmedia_resampler_s* instance;
  51. } resampler;
  52. } encoder;
  53. struct {
  54. uint32_t payload_type;
  55. struct tmedia_codec_s* codec;
  56. void* buffer;
  57. tsk_size_t buffer_size;
  58. struct {
  59. void* buffer;
  60. tsk_size_t buffer_size;
  61. struct tmedia_resampler_s* instance;
  62. } resampler;
  63. } decoder;
  64. struct tmedia_denoise_s* denoise;
  65. struct tmedia_jitterbuffer_s* jitterbuffer;
  66. tdav_session_audio_dtmfe_L_t* dtmf_events;
  67. tsk_bool_t is_sending_dtmf_events;
  68. }
  69. tdav_session_audio_t;
  70. #define TDAV_SESSION_AUDIO(self) ((tdav_session_audio_t*)(self))
  71. TINYDAV_GEXTERN const tmedia_session_plugin_def_t *tdav_session_audio_plugin_def_t;
  72. TINYDAV_GEXTERN const tmedia_session_plugin_def_t *tdav_session_bfcpaudio_plugin_def_t;
  73. TDAV_END_DECLS
  74. #endif /* TINYDAV_SESSION_AUDIO_H */