IJKFFOptions.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * IJKFFOptions.h
  3. *
  4. * Copyright (c) 2013-2015 Bilibili
  5. * Copyright (c) 2013-2015 Zhang Rui <bbcallen@gmail.com>
  6. *
  7. * This file is part of ijkPlayer.
  8. *
  9. * ijkPlayer is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU Lesser General Public
  11. * License as published by the Free Software Foundation; either
  12. * version 2.1 of the License, or (at your option) any later version.
  13. *
  14. * ijkPlayer is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  17. * Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public
  20. * License along with ijkPlayer; if not, write to the Free Software
  21. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  22. */
  23. #import <Foundation/Foundation.h>
  24. typedef enum IJKFFOptionCategory {
  25. kIJKFFOptionCategoryFormat = 1,
  26. kIJKFFOptionCategoryCodec = 2,
  27. kIJKFFOptionCategorySws = 3,
  28. kIJKFFOptionCategoryPlayer = 4,
  29. kIJKFFOptionCategorySwr = 5,
  30. } IJKFFOptionCategory;
  31. // for codec option 'skip_loop_filter' and 'skip_frame'
  32. typedef enum IJKAVDiscard {
  33. /* We leave some space between them for extensions (drop some
  34. * keyframes for intra-only or drop just some bidir frames). */
  35. IJK_AVDISCARD_NONE =-16, ///< discard nothing
  36. IJK_AVDISCARD_DEFAULT = 0, ///< discard useless packets like 0 size packets in avi
  37. IJK_AVDISCARD_NONREF = 8, ///< discard all non reference
  38. IJK_AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames
  39. IJK_AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
  40. IJK_AVDISCARD_ALL = 48, ///< discard all
  41. } IJKAVDiscard;
  42. struct IjkMediaPlayer;
  43. @interface IJKFFOptions : NSObject
  44. +(IJKFFOptions *)optionsByDefault;
  45. -(void)applyTo:(struct IjkMediaPlayer *)mediaPlayer;
  46. - (void)setOptionValue:(NSString *)value
  47. forKey:(NSString *)key
  48. ofCategory:(IJKFFOptionCategory)category;
  49. - (void)setOptionIntValue:(int64_t)value
  50. forKey:(NSString *)key
  51. ofCategory:(IJKFFOptionCategory)category;
  52. -(void)setFormatOptionValue: (NSString *)value forKey:(NSString *)key;
  53. -(void)setCodecOptionValue: (NSString *)value forKey:(NSString *)key;
  54. -(void)setSwsOptionValue: (NSString *)value forKey:(NSString *)key;
  55. -(void)setPlayerOptionValue: (NSString *)value forKey:(NSString *)key;
  56. -(void)setFormatOptionIntValue: (int64_t)value forKey:(NSString *)key;
  57. -(void)setCodecOptionIntValue: (int64_t)value forKey:(NSString *)key;
  58. -(void)setSwsOptionIntValue: (int64_t)value forKey:(NSString *)key;
  59. -(void)setPlayerOptionIntValue: (int64_t)value forKey:(NSString *)key;
  60. @property(nonatomic) BOOL showHudView;
  61. @end