VLCLibVLCBridging.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /*****************************************************************************
  2. * VLCLibVLCbridging.h: VLCKit.framework VLCLibVLCBridging (Private) header
  3. *****************************************************************************
  4. * Copyright (C) 2007 Pierre d'Herbemont
  5. * Copyright (C) 2007 VLC authors and VideoLAN
  6. * $Id$
  7. *
  8. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU Lesser General Public License as published by
  12. * the Free Software Foundation; either version 2.1 of the License, or
  13. * (at your option) any later version.
  14. *
  15. * This program 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
  18. * GNU Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public License
  21. * along with this program; if not, write to the Free Software Foundation,
  22. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  23. *****************************************************************************/
  24. #import "VLCLibrary.h"
  25. #if !TARGET_OS_IPHONE
  26. #import "VLCStreamOutput.h"
  27. #endif
  28. #import "VLCMediaPlayer.h"
  29. #import "VLCRendererItem.h"
  30. /**
  31. * Bridges functionality between libvlc and VLCMediaList implementation.
  32. */
  33. @interface VLCMediaList (LibVLCBridging)
  34. /* Factories */
  35. /**
  36. * Manufactures new object wrapped around specified media list.
  37. * \param p_new_mlist LibVLC media list pointer.
  38. * \return Newly create media list instance using specified media list
  39. * pointer.
  40. */
  41. + (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
  42. /* Initializers */
  43. /**
  44. * Initializes new object wrapped around specified media list.
  45. * \param p_new_mlist LibVLC media list pointer.
  46. * \return Newly create media list instance using specified media list
  47. * pointer.
  48. */
  49. - (id)initWithLibVLCMediaList:(void *)p_new_mlist;
  50. /* Properties */
  51. @property (readonly) void * libVLCMediaList; ///< LibVLC media list pointer.
  52. @end
  53. /**
  54. * Bridges functionality between libvlc and VLCMedia implementation.
  55. */
  56. @interface VLCMedia (LibVLCBridging)
  57. /* Factories */
  58. /**
  59. * Manufactures new object wrapped around specified media descriptor.
  60. * \param md LibVLC media descriptor pointer.
  61. * \return Newly created media instance using specified descriptor.
  62. */
  63. + (id)mediaWithLibVLCMediaDescriptor:(void *)md;
  64. /* Initializers */
  65. /**
  66. * Initializes new object wrapped around specified media descriptor.
  67. * \param md LibVLC media descriptor pointer.
  68. * \return Newly created media instance using specified descriptor.
  69. */
  70. - (id)initWithLibVLCMediaDescriptor:(void *)md;
  71. + (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;
  72. /**
  73. * Returns the receiver's internal media descriptor pointer.
  74. * \return The receiver's internal media descriptor pointer.
  75. */
  76. @property (readonly) void * libVLCMediaDescriptor;
  77. @end
  78. /**
  79. * Bridges functionality between VLCMedia and VLCMediaPlayer
  80. */
  81. @interface VLCMediaPlayer (LibVLCBridging)
  82. /* Properties */
  83. @property (readonly) void * libVLCMediaPlayer; ///< LibVLC media list pointer.
  84. @end
  85. /**
  86. * Bridges functionality between VLCMediaPlayer and LibVLC core
  87. */
  88. @interface VLCMedia (VLCMediaPlayerBridging)
  89. /**
  90. * Set's the length of the media object. This value becomes available once the
  91. * media object is being played.
  92. * \param value the length value
  93. */
  94. - (void)setLength:(VLCTime *)value;
  95. @end
  96. /**
  97. * Bridges functionality between VLCLibrary and LibVLC core.
  98. */
  99. @interface VLCLibrary (VLCLibVLCBridging)
  100. /**
  101. * Shared singleton instance of libvlc library instance.
  102. * \return libvlc pointer of library instance.
  103. */
  104. + (void *)sharedInstance;
  105. /**
  106. * Instance of libvlc library instance.
  107. * \return libvlc pointer of library instance.
  108. */
  109. @property (readonly) void * instance;
  110. @end
  111. /**
  112. * Bridges functionality between VLCLibrary and VLCAudio.
  113. */
  114. @interface VLCLibrary (VLCAudioBridging)
  115. /**
  116. * Called by VLCAudio, each library has a singleton VLCaudio instance. VLCAudio
  117. * calls this function to let the VLCLibrary instance know how to get in touch
  118. * with the VLCAudio instance. TODO: Each media player instance should have it's
  119. * own audio instance...not each library instance.
  120. */
  121. - (void)setAudio:(VLCAudio *)value;
  122. @end
  123. /**
  124. * Bridges functionality between VLCAudio and VLCLibrary.
  125. */
  126. @interface VLCAudio (VLCAudioBridging)
  127. /* Initializers */
  128. /**
  129. * Initializes a new object using the specified mediaPlayer instance.
  130. * \return Newly created audio object using specified VLCMediaPlayer instance.
  131. */
  132. - (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer;
  133. @end
  134. /**
  135. * Bridges functionality between libvlc and VLCRendererItem implementation.
  136. */
  137. @interface VLCRendererItem (VLCRendererItemBridging)
  138. /**
  139. * Initializer method to create an VLCRendererItem with an `libvlc_renderer_item_t *`.
  140. *
  141. * \param renderer item.
  142. * \note This initializer is not meant to be used externally.
  143. * \return An instance of `VLCRendererItem`, can be nil.
  144. */
  145. - (instancetype)initWithRendererItem:(void *)item;
  146. /**
  147. * Returns a `libvlc_renderer_item_t *` renderer item.
  148. * \return Renderer item.
  149. */
  150. - (void *)libVLCRendererItem;
  151. @end
  152. /**
  153. * TODO: Documentation
  154. */
  155. #if !TARGET_OS_IPHONE
  156. @interface VLCStreamOutput (LibVLCBridge)
  157. - (NSString *)representedLibVLCOptions;
  158. @end
  159. #endif