VLCLibVLCBridging.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  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. /**
  30. * Bridges functionality between libvlc and VLCMediaList implementation.
  31. */
  32. @interface VLCMediaList (LibVLCBridging)
  33. /* Factories */
  34. /**
  35. * Manufactures new object wrapped around specified media list.
  36. * \param p_new_mlist LibVLC media list pointer.
  37. * \return Newly create media list instance using specified media list
  38. * pointer.
  39. */
  40. + (id)mediaListWithLibVLCMediaList:(void *)p_new_mlist;
  41. /* Initializers */
  42. /**
  43. * Initializes new object wrapped around specified media list.
  44. * \param p_new_mlist LibVLC media list pointer.
  45. * \return Newly create media list instance using specified media list
  46. * pointer.
  47. */
  48. - (id)initWithLibVLCMediaList:(void *)p_new_mlist;
  49. /* Properties */
  50. @property (readonly) void * libVLCMediaList; //< LibVLC media list pointer.
  51. @end
  52. /**
  53. * Bridges functionality between libvlc and VLCMedia implementation.
  54. */
  55. @interface VLCMedia (LibVLCBridging)
  56. /* Factories */
  57. /**
  58. * Manufactures new object wrapped around specified media descriptor.
  59. * \param md LibVLC media descriptor pointer.
  60. * \return Newly created media instance using specified descriptor.
  61. */
  62. + (id)mediaWithLibVLCMediaDescriptor:(void *)md;
  63. /* Initializers */
  64. /**
  65. * Initializes new object wrapped around specified media descriptor.
  66. * \param md LibVLC media descriptor pointer.
  67. * \return Newly created media instance using specified descriptor.
  68. */
  69. - (id)initWithLibVLCMediaDescriptor:(void *)md;
  70. + (id)mediaWithMedia:(VLCMedia *)media andLibVLCOptions:(NSDictionary *)options;
  71. /**
  72. * Returns the receiver's internal media descriptor pointer.
  73. * \return The receiver's internal media descriptor pointer.
  74. */
  75. @property (readonly) void * libVLCMediaDescriptor;
  76. @end
  77. /**
  78. * Bridges functionality between VLCMedia and VLCMediaPlayer
  79. */
  80. @interface VLCMediaPlayer (LibVLCBridging)
  81. /* Properties */
  82. @property (readonly) void * libVLCMediaPlayer; //< LibVLC media list pointer.
  83. @end
  84. /**
  85. * Bridges functionality between VLCMediaPlayer and LibVLC core
  86. */
  87. @interface VLCMedia (VLCMediaPlayerBridging)
  88. /**
  89. * Set's the length of the media object. This value becomes available once the
  90. * media object is being played.
  91. * \param value
  92. */
  93. - (void)setLength:(VLCTime *)value;
  94. @end
  95. /**
  96. * Bridges functionality between VLCLibrary and LibVLC core.
  97. */
  98. @interface VLCLibrary (VLCLibVLCBridging)
  99. /**
  100. * Shared singleton instance of libvlc library instance.
  101. * \return libvlc pointer of library instance.
  102. */
  103. + (void *)sharedInstance;
  104. /**
  105. * Instance of libvlc library instance.
  106. * \return libvlc pointer of library instance.
  107. */
  108. @property (readonly) void * instance;
  109. @end
  110. /**
  111. * Bridges functionality between VLCLibrary and VLCAudio.
  112. */
  113. @interface VLCLibrary (VLCAudioBridging)
  114. /**
  115. * Called by VLCAudio, each library has a singleton VLCaudio instance. VLCAudio
  116. * calls this function to let the VLCLibrary instance know how to get in touch
  117. * with the VLCAudio instance. TODO: Each media player instance should have it's
  118. * own audio instance...not each library instance.
  119. */
  120. - (void)setAudio:(VLCAudio *)value;
  121. @end
  122. /**
  123. * Bridges functionality between VLCAudio and VLCLibrary.
  124. */
  125. @interface VLCAudio (VLCAudioBridging)
  126. /* Initializers */
  127. /**
  128. * Initializes a new object using the specified mediaPlayer instance.
  129. * \return Newly created audio object using specified VLCMediaPlayer instance.
  130. */
  131. - (id)initWithMediaPlayer:(VLCMediaPlayer *)mediaPlayer;
  132. @end
  133. /**
  134. * TODO: Documentation
  135. */
  136. #if !TARGET_OS_IPHONE
  137. @interface VLCStreamOutput (LibVLCBridge)
  138. - (NSString *)representedLibVLCOptions;
  139. @end
  140. #endif