Skip to content

Commit

Permalink
Bump the version, update README, LICENSE, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
hirohitokato committed Oct 19, 2017
1 parent b536fcf commit 0f6d029
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 107 deletions.
14 changes: 10 additions & 4 deletions HKLAVGaplessPlayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
1AA61A7A1A41044B00F2B2F6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1AA61A781A41044B00F2B2F6 /* Main.storyboard */; };
1AA61A7C1A41044B00F2B2F6 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1AA61A7B1A41044B00F2B2F6 /* Images.xcassets */; };
1AA61A7F1A41044B00F2B2F6 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1AA61A7D1A41044B00F2B2F6 /* LaunchScreen.xib */; };
1AC023A41F98BFA80072F4AE /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 1AC023A21F98BFA30072F4AE /* LICENSE */; };
1AEABB0C1A47C40400EF97E2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AEABB0A1A47C40400EF97E2 /* AppDelegate.swift */; };
1AEABB0D1A47C40400EF97E2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AEABB0B1A47C40400EF97E2 /* ViewController.swift */; };
1AEC97791A52F84100ACE922 /* taskInfo.c in Sources */ = {isa = PBXBuildFile; fileRef = 1AEC97771A52F84100ACE922 /* taskInfo.c */; };
Expand Down Expand Up @@ -89,6 +90,8 @@
1AA61A7B1A41044B00F2B2F6 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
1AA61A7E1A41044B00F2B2F6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
1AA61ADD1A41CCCB00F2B2F6 /* SimpleGaplessPlayer-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SimpleGaplessPlayer-Bridging-Header.h"; sourceTree = "<group>"; };
1AC023A21F98BFA30072F4AE /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
1AC023A31F98BFA30072F4AE /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
1AEABB0A1A47C40400EF97E2 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
1AEABB0B1A47C40400EF97E2 /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
1AEC97771A52F84100ACE922 /* taskInfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = taskInfo.c; sourceTree = "<group>"; };
Expand Down Expand Up @@ -186,6 +189,8 @@
1AA61A661A41044B00F2B2F6 = {
isa = PBXGroup;
children = (
1AC023A21F98BFA30072F4AE /* LICENSE */,
1AC023A31F98BFA30072F4AE /* README.md */,
1AA61A711A41044B00F2B2F6 /* SimpleGaplessPlayer */,
1A25A0A61A5BE41800106B11 /* HKLAVGaplessPlayer */,
1A25A0C71A5BE4D500106B11 /* Frameworks */,
Expand Down Expand Up @@ -328,6 +333,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1AC023A41F98BFA80072F4AE /* LICENSE in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -420,7 +426,7 @@
);
INFOPLIST_FILE = HKLAVGaplessPlayer/Info.plist;
INSTALL_PATH = "@rpath";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -445,7 +451,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = HKLAVGaplessPlayer/Info.plist;
INSTALL_PATH = "@rpath";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -562,7 +568,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
INFOPLIST_FILE = SimpleGaplessPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SimpleGaplessPlayer;
Expand All @@ -582,7 +588,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
INFOPLIST_FILE = SimpleGaplessPlayer/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = SimpleGaplessPlayer;
Expand Down
2 changes: 1 addition & 1 deletion HKLAVGaplessPlayer/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.6.1</string>
<string>0.8</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014, Hirohito Kato
Copyright (c) 2014-2017, Hirohito Kato
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
174 changes: 73 additions & 101 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,101 +1,73 @@
# HKLAVGaplessPlayer

[![License](https://img.shields.io/badge/license-NewBSD-green.svg?style=flat)](http://choosealicense.com/licenses/bsd-3-clause/)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/katokichisoft/SimpleGaplessPlayer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

HKLAVGaplessPlayer is similar Movie player class to AVQueuePlayer. But it can play multiple assets without gap.

## Requirements

iOS 8.0 or later, and Swift 1.2 or later.

## Installation

### Carthage

HKLAVGaplessPlayer is available through [Carthage](https://github.com/Carthage/Carthage). To install
it, simply add the following line to your Cartfile:

```
github "katokichisoft/SimpleGaplessPlayer" ~> 0.1.1
```

## What is this?

As you know, AVQueuePlayer is used to play a number of items in sequence. But the short gap that we can easily notice them is laid between movies. HKLAVGaplessPlayer plays them with no gap between assets.

The sample app loads video assets from camera-roll (via Photos.framework) when it is launched. Double tap the screen, it plays them with no gap.

This project includes HKLGLPixelBufferView class. It is a subclass of UIView so that you can display video frames.

## Usage

```swift
// Most simple case.

let player = HKLAVGaplessPlayer()
// append assets.
for asset in assets {
player.appendAsset(asset)
}

// connect playerView(=HKLGLPixelBufferView) to player.
player.delegate = playerView as? HKLAVGaplessPlayerDelegate

// start playing.
player.play()
```

## How to remove gaps?

See ViewController.swift. It creates AVAssetReaderVideoCompositionOutput, which is a subclass of AVAssetReader, enables you to read each frames based on the video composition settings.

To play movies continuously, it creates AVAssetReader for each movie. and it generates a frame in each CADisplayLink callback. Since Current devices' spec is so high, it is enough to play frames on real-time.

![](figure/howto-01.png)

However, only generating frames is not good for the gapless player. Because the displaylink callback timing and a framerate of the movie is different. So I use AVAssetReaderVideoCompositionOutput & AVMutableVideoComposition instead of AVAssetReader. They enable us to set output frame interval as we like.

![](figure/howto-02.png)

This is the way how to remove gaps.

## Current Limitation

HKLAVGaplessPlayer currently supports only video tracks. Audio is not supported yet.(TODO)

## License
SimpleGaplessPlayer is published under New BSD License

Copyright (c) 2014, Hirohito Kato
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of SimpleGaplessPlayer nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

## Special Thanks

- [Norio Nomura](https://github.com/norio-nomura)
# HKLAVGaplessPlayer

[![License](https://img.shields.io/badge/license-NewBSD-green.svg?style=flat)](http://choosealicense.com/licenses/bsd-3-clause/)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/katokichisoft/SimpleGaplessPlayer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

HKLAVGaplessPlayer is similar Movie player class to AVQueuePlayer. But it can play multiple assets without gap.

## Requirements

iOS 9.3 or later, and Swift 4 or later.

## Installation

### Carthage

HKLAVGaplessPlayer is available through [Carthage](https://github.com/Carthage/Carthage). To install
it, simply add the following line to your Cartfile:

```
github "katokichisoft/SimpleGaplessPlayer"
```

## What is this?

As you know, AVQueuePlayer is used to play a number of items in sequence. But the short gap that we can easily notice them is laid between movies. HKLAVGaplessPlayer plays them with no gap between assets.

The sample app loads video assets from camera-roll (via Photos.framework) when it is launched. Double tap the screen, it plays them with no gap.

This project includes HKLGLPixelBufferView class. It is a subclass of UIView so that you can display video frames.

## Usage

```swift
// Most simple case.

let player = HKLAVGaplessPlayer()
// append assets.
for asset in assets {
player.appendAsset(asset)
}

// connect playerView(=HKLGLPixelBufferView) to player.
player.delegate = playerView as? HKLAVGaplessPlayerDelegate

// start playing.
player.play(rate: 1.0)
```

## How to remove gaps?

See ViewController.swift. It creates AVAssetReaderVideoCompositionOutput, which is a subclass of AVAssetReader, enables you to read each frames based on the video composition settings.

To play movies continuously, it creates AVAssetReader for each movie. and it generates a frame in each CADisplayLink callback. Since Current devices' spec is so high, it is enough to play frames on real-time.

![](figure/howto-01.png)

However, only generating frames is not good for the gapless player. Because the displaylink callback timing and a framerate of the movie is different. So I use AVAssetReaderVideoCompositionOutput & AVMutableVideoComposition instead of AVAssetReader. They enable us to set output frame interval as we like.

![](figure/howto-02.png)

This is the way how to remove gaps.

## Current Limitation

HKLAVGaplessPlayer currently supports only video tracks. Audio is not supported yet.(TODO)

## License
SimpleGaplessPlayer is published under New BSD License

## Special Thanks

- [Norio Nomura](https://github.com/norio-nomura)

0 comments on commit 0f6d029

Please sign in to comment.