VLCMediaListPlayer.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. /*****************************************************************************
  2. * VLCMediaListPlayer.h: VLCKit.framework VLCMediaListPlayer implementation
  3. *****************************************************************************
  4. * Copyright (C) 2009 Pierre d'Herbemont
  5. * Partial Copyright (C) 2009-2013 Felix Paul Kühne
  6. * Copyright (C) 2009-2013 VLC authors and VideoLAN
  7. * $Id$
  8. *
  9. * Authors: Pierre d'Herbemont <pdherbemont # videolan.org>
  10. * Felix Paul Kühne <fkuehne # videolan.org
  11. *
  12. * This program is free software; you can redistribute it and/or modify it
  13. * under the terms of the GNU Lesser General Public License as published by
  14. * the Free Software Foundation; either version 2.1 of the License, or
  15. * (at your option) any later version.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Lesser General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Lesser General Public License
  23. * along with this program; if not, write to the Free Software Foundation,
  24. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  25. *****************************************************************************/
  26. @class VLCMedia, VLCMediaPlayer, VLCMediaList;
  27. /**
  28. * VLCRepeatMode
  29. * (don't repeat anything, repeat one, repeat all)
  30. */
  31. typedef NS_ENUM(NSInteger, VLCRepeatMode) {
  32. VLCDoNotRepeat,
  33. VLCRepeatCurrentItem,
  34. VLCRepeatAllItems
  35. };
  36. /**
  37. * A media list player, which eases the use of playlists
  38. */
  39. @interface VLCMediaListPlayer : NSObject
  40. /**
  41. * setter/getter for mediaList to play within the player
  42. * \note This list is erased when setting a rootMedia on the list player instance
  43. */
  44. @property (readwrite) VLCMediaList *mediaList;
  45. /**
  46. * rootMedia - Use this method to play a media and its subitems.
  47. * This will erase mediaList.
  48. * Setting mediaList will erase rootMedia.
  49. */
  50. @property (readwrite) VLCMedia *rootMedia;
  51. /**
  52. * the media player instance used for playback by the list player
  53. */
  54. @property (readonly) VLCMediaPlayer *mediaPlayer;
  55. /**
  56. * initializer with a certain drawable
  57. * \note drawable can also be set later
  58. */
  59. - (instancetype)initWithDrawable:(id)drawable;
  60. /**
  61. * initializer with a custom options
  62. * \note This is will initialize a new VLCLibrary instance, which WILL have a major memory impact
  63. */
  64. - (instancetype)initWithOptions:(NSArray *)options;
  65. /**
  66. * initializer with a certain drawable and options
  67. * \see initWithDrawable
  68. * \see initWithOptions
  69. */
  70. - (instancetype)initWithOptions:(NSArray *)options andDrawable:(id)drawable;
  71. /**
  72. * start playback
  73. */
  74. - (void)play;
  75. /**
  76. * pause playback
  77. */
  78. - (void)pause;
  79. /**
  80. * stop playback
  81. */
  82. - (void)stop;
  83. /**
  84. * play next item
  85. * \returns YES on success, NO if there is no such item
  86. */
  87. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL next;
  88. /**
  89. * play previous item
  90. * \returns YES on success, NO if there is no such item
  91. */
  92. @property (NS_NONATOMIC_IOSONLY, readonly) BOOL previous;
  93. /**
  94. * play an item at at a given index in the media list attached to the player
  95. * \deprecated This method is not thread safe. Use playItemAtNumber: instead
  96. */
  97. - (BOOL)playItemAtIndex:(int)index __attribute__((deprecated));
  98. /**
  99. * play an item at a given index in the media list attached to the player
  100. */
  101. - (void)playItemAtNumber:(NSNumber *)index;
  102. /**
  103. * Playmode selection (don't repeat anything, repeat one, repeat all)
  104. * See VLCRepeatMode.
  105. */
  106. @property (readwrite) VLCRepeatMode repeatMode;
  107. /**
  108. * media must be in the current media list.
  109. */
  110. - (void)playMedia:(VLCMedia *)media;
  111. @end