Pārlūkot izejas kodu

Fixed some video decoding problems.

Caijinglong 6 gadi atpakaļ
vecāks
revīzija
716f8b649d

+ 4 - 0
CHANGELOG.md

@@ -1,3 +1,7 @@
+## 0.1.7
+
+Fixed some video decoding problems.
+
 ## 0.1.6
 
 - add problem left vertical gesture to control brightness.

+ 1 - 1
TODOLIST.md

@@ -55,4 +55,4 @@
   - [ ] 设置选项的使用
   - [x] 切换全屏播放的示例代码
   - [x] 在列表中(ListView)
-- [ ] iOS 部分视频无法显示图像的问题: 可能很长时间内都无法解决
+- [x] iOS 部分视频无法显示图像的问题: 可能很长时间内都无法解决

+ 8 - 14
example/ios/Podfile.lock

@@ -2,18 +2,15 @@ PODS:
   - Flutter (1.0.0)
   - flutter_ijkplayer (0.0.1):
     - Flutter
-    - FlutterIJK (~> 0.0.8)
-  - FlutterIJK (0.0.8)
-  - orientation (0.0.1):
-    - Flutter
+    - FlutterIJK (~> 0.0.9)
+  - FlutterIJK (0.0.9)
   - photo_manager (0.0.1):
     - Flutter
 
 DEPENDENCIES:
   - Flutter (from `.symlinks/flutter/ios`)
-  - flutter_ijkplayer (from `/Users/caijinglong/Documents/GitHub/flutter_ijkplayer/ios/flutter_ijkplayer.podspec`)
-  - orientation (from `/Users/caijinglong/.pub-cache/hosted/pub.flutter-io.cn/orientation-1.0.4/ios/orientation.podspec`)
-  - photo_manager (from `/Users/caijinglong/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-0.3.3/ios/photo_manager.podspec`)
+  - flutter_ijkplayer (from `/Users/cai/Documents/GitHub/flutter_ijkplayer/ios/flutter_ijkplayer.podspec`)
+  - photo_manager (from `/Users/cai/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-0.3.3/ios/photo_manager.podspec`)
 
 SPEC REPOS:
   https://github.com/cocoapods/specs.git:
@@ -23,17 +20,14 @@ EXTERNAL SOURCES:
   Flutter:
     :path: ".symlinks/flutter/ios"
   flutter_ijkplayer:
-    :path: "/Users/caijinglong/Documents/GitHub/flutter_ijkplayer/ios/flutter_ijkplayer.podspec"
-  orientation:
-    :path: "/Users/caijinglong/.pub-cache/hosted/pub.flutter-io.cn/orientation-1.0.4/ios/orientation.podspec"
+    :path: "/Users/cai/Documents/GitHub/flutter_ijkplayer/ios/flutter_ijkplayer.podspec"
   photo_manager:
-    :path: "/Users/caijinglong/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-0.3.3/ios/photo_manager.podspec"
+    :path: "/Users/cai/.pub-cache/hosted/pub.flutter-io.cn/photo_manager-0.3.3/ios/photo_manager.podspec"
 
 SPEC CHECKSUMS:
   Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
-  flutter_ijkplayer: 319c057084d453fd81310129f75f5e6770c6d306
-  FlutterIJK: bdcc10a74e25fe5f82ec2331a20ac9cd8c0c7a4b
-  orientation: 46fe7528896a5c3e6215366bcb462c182ebfd4e9
+  flutter_ijkplayer: e7cd28f617bf87bad4a11aaaa13cfc59f18c6c49
+  FlutterIJK: 9e3ccb3d74cca7ebe77db65d30a19b630ea8648e
   photo_manager: d47ddf6cb25cbfa837dc334540eb9a99b208e191
 
 PODFILE CHECKSUM: a14c63eb48a9d676ed6d876506b3258fd9c85235

+ 11 - 4
example/lib/page/network.dart

@@ -13,14 +13,21 @@ class _NetworkPageState extends State<NetworkPage> {
   @override
   void initState() {
     super.initState();
+
+    // some init mp4s
+
     editingController.text =
         "https://www.sample-videos.com/video123/mp4/720/big_buck_bunny_720p_30mb.mp4";
     editingController.text =
         "http://img.ksbbs.com/asset/Mon_1703/05cacb4e02f9d9e.mp4";
-    editingController.text =
-        "http://172.16.100.245:5000/05-2%20ffmpeg%E5%BC%80%E5%8F%91%E5%85%A5%E9%97%A8Log%E7%B3%BB%E7%BB%9F.mp4";
-    editingController.text =
-        "http://172.16.100.245:5000/09-01%20%E7%AC%AC%E4%B8%80%E4%B8%AAJNI%E7%A8%8B%E5%BA%8F.mp4";
+
+    // editingController.text = "http://172.16.100.245:5000/meng.mp4";
+    // editingController.text = "http://172.16.100.245:5000/sample1.mp4";
+    // editingController.text =
+    //     "http://172.16.100.245:5000/05-2%20ffmpeg%E5%BC%80%E5%8F%91%E5%85%A5%E9%97%A8Log%E7%B3%BB%E7%BB%9F.mp4";
+    // editingController.text =
+    //     "http://172.16.100.245:5000/09-01%20%E7%AC%AC%E4%B8%80%E4%B8%AAJNI%E7%A8%8B%E5%BA%8F.mp4";
+    // editingController.text = "http://172.16.100.245:5000/trailer.mp4";
   }
 
   @override

+ 6 - 6
example/pubspec.lock

@@ -7,7 +7,7 @@ packages:
       name: async
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.0.8"
+    version: "2.1.0"
   boolean_selector:
     dependency: transitive
     description:
@@ -47,7 +47,7 @@ packages:
       path: ".."
       relative: true
     source: path
-    version: "0.1.6"
+    version: "0.1.7"
   flutter_test:
     dependency: "direct dev"
     description: flutter
@@ -59,7 +59,7 @@ packages:
       name: matcher
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "0.12.3+1"
+    version: "0.12.5"
   meta:
     dependency: transitive
     description:
@@ -101,7 +101,7 @@ packages:
       name: quiver
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.0.1"
+    version: "2.0.2"
   sky_engine:
     dependency: transitive
     description: flutter
@@ -127,7 +127,7 @@ packages:
       name: stream_channel
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "1.6.8"
+    version: "2.0.0"
   string_scanner:
     dependency: transitive
     description:
@@ -148,7 +148,7 @@ packages:
       name: test_api
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "0.2.2"
+    version: "0.2.4"
   typed_data:
     dependency: transitive
     description:

+ 3 - 1
ios/Classes/CoolFlutterIJK.m

@@ -162,7 +162,9 @@
 //    [options setFormatOptionIntValue:5 forKey:@"reconnect"];
 //    [options setFormatOptionIntValue:5 forKey:@"framedrop"];
 //    [options setFormatOptionIntValue:1 forKey:@"enable-accurate-seek"];
-//    [options setFormatOptionIntValue:1 forKey:@"mediacodec"]; //硬解
+    
+//    [options setPlayerOptionIntValue:0      forKey:@"video-max-frame-width-default"];
+//    [options setPlayerOptionIntValue:1      forKey:@"videotoolbox"];
 
     return options;
 }

+ 1 - 1
ios/flutter_ijkplayer.podspec

@@ -21,7 +21,7 @@ A new flutter plugin project.
   # s.ios.vendored_frameworks = 'IJKMediaFramework.framework'
   # s.frameworks  = "AudioToolbox", "AVFoundation", "CoreGraphics", "CoreMedia", "CoreVideo", "MobileCoreServices", "OpenGLES", "QuartzCore", "VideoToolbox", "Foundation", "UIKit", "MediaPlayer"
   # s.libraries   = "bz2", "z", "stdc++"
-  s.dependency 'FlutterIJK', '~> 0.0.8'
+  s.dependency 'FlutterIJK', '~> 0.0.9'
 
   # s.script_phase = {:name => 'extract framework', :script=> 'echo "Hello World"; pwd' ,:execution_position => :before_compile}
 

+ 5 - 5
pubspec.lock

@@ -7,7 +7,7 @@ packages:
       name: async
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.0.8"
+    version: "2.1.0"
   boolean_selector:
     dependency: transitive
     description:
@@ -45,7 +45,7 @@ packages:
       name: matcher
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "0.12.3+1"
+    version: "0.12.5"
   meta:
     dependency: transitive
     description:
@@ -73,7 +73,7 @@ packages:
       name: quiver
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "2.0.1"
+    version: "2.0.2"
   sky_engine:
     dependency: transitive
     description: flutter
@@ -99,7 +99,7 @@ packages:
       name: stream_channel
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "1.6.8"
+    version: "2.0.0"
   string_scanner:
     dependency: transitive
     description:
@@ -120,7 +120,7 @@ packages:
       name: test_api
       url: "https://pub.flutter-io.cn"
     source: hosted
-    version: "0.2.2"
+    version: "0.2.4"
   typed_data:
     dependency: transitive
     description:

+ 1 - 39
pubspec.yaml

@@ -1,6 +1,6 @@
 name: flutter_ijkplayer
 description: Flutter version of bilibilibili ijkplayer, supports common playback protocols, easy to use.
-version: 0.1.6
+version: 0.1.7
 author: caijinglong<cjl_spy@163.com>
 homepage: https://github.com/CaiJingLong/flutter_ijkplayer
 
@@ -14,45 +14,7 @@ dependencies:
 dev_dependencies:
   flutter_test:
     sdk: flutter
-
-# For information on the generic Dart part of this file, see the
-# following page: https://www.dartlang.org/tools/pub/pubspec
-
-# The following section is specific to Flutter.
 flutter:
-  # This section identifies this Flutter project as a plugin project.
-  # The androidPackage and pluginClass identifiers should not ordinarily
-  # be modified. They are used by the tooling to maintain consistency when
-  # adding or updating assets for this project.
   plugin:
     androidPackage: top.kikt.ijkplayer
     pluginClass: IjkplayerPlugin
-  # To add assets to your plugin package, add an assets section, like this:
-  # assets:
-  #  - images/a_dot_burr.jpeg
-  #  - images/a_dot_ham.jpeg
-  #
-  # For details regarding assets in packages, see
-  # https://flutter.io/assets-and-images/#from-packages
-  #
-  # An image asset can refer to one or more resolution-specific "variants", see
-  # https://flutter.io/assets-and-images/#resolution-aware.
-  # To add custom fonts to your plugin package, add a fonts section here,
-  # in this "flutter" section. Each entry in this list should have a
-  # "family" key with the font family name, and a "fonts" key with a
-  # list giving the asset and other descriptors for the font. For
-  # example:
-  # fonts:
-  #   - family: Schyler
-  #     fonts:
-  #       - asset: fonts/Schyler-Regular.ttf
-  #       - asset: fonts/Schyler-Italic.ttf
-  #         style: italic
-  #   - family: Trajan Pro
-  #     fonts:
-  #       - asset: fonts/TrajanPro.ttf
-  #       - asset: fonts/TrajanPro_Bold.ttf
-  #         weight: 700
-  #
-  # For details regarding fonts in packages, see
-  # https://flutter.io/custom-fonts/#from-packages