Skip to content

Commit aae0e24

Browse files
committed
AVFoundation Looping Player: Using AVQueuePlayer and AVPlayerLooper to demonstrate loop playback: Version 2.0, 2016-09-13
Added new project to show AVPlayerLooper This sample is a collection of projects showing how to play an audio visual item in a loop using AVFoundation's AVQueuePlayer and/or AVPlayerLooper. Signed-off-by: Liu Lantao <[email protected]>
1 parent 71ab3de commit aae0e24

File tree

20 files changed

+1701
-0
lines changed

20 files changed

+1701
-0
lines changed

avloopplayer/AVPlayerLooping.xcworkspace/contents.xcworkspacedata

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

avloopplayer/LICENSE.txt

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Sample code project: AVFoundation Looping Player: Using AVQueuePlayer and AVPlayerLooper to demonstrate loop playback
2+
Version: 2.0
3+
4+
IMPORTANT: This Apple software is supplied to you by Apple
5+
Inc. ("Apple") in consideration of your agreement to the following
6+
terms, and your use, installation, modification or redistribution of
7+
this Apple software constitutes acceptance of these terms. If you do
8+
not agree with these terms, please do not use, install, modify or
9+
redistribute this Apple software.
10+
11+
In consideration of your agreement to abide by the following terms, and
12+
subject to these terms, Apple grants you a personal, non-exclusive
13+
license, under Apple's copyrights in this original Apple software (the
14+
"Apple Software"), to use, reproduce, modify and redistribute the Apple
15+
Software, with or without modifications, in source and/or binary forms;
16+
provided that if you redistribute the Apple Software in its entirety and
17+
without modifications, you must retain this notice and the following
18+
text and disclaimers in all such redistributions of the Apple Software.
19+
Neither the name, trademarks, service marks or logos of Apple Inc. may
20+
be used to endorse or promote products derived from the Apple Software
21+
without specific prior written permission from Apple. Except as
22+
expressly stated in this notice, no other rights or licenses, express or
23+
implied, are granted by Apple herein, including but not limited to any
24+
patent rights that may be infringed by your derivative works or by other
25+
works in which the Apple Software may be incorporated.
26+
27+
The Apple Software is provided by Apple on an "AS IS" basis. APPLE
28+
MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
29+
THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS
30+
FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND
31+
OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS.
32+
33+
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL
34+
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
35+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
36+
INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION,
37+
MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED
38+
AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE),
39+
STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE
40+
POSSIBILITY OF SUCH DAMAGE.
41+
42+
Copyright (C) 2016 Apple Inc. All Rights Reserved.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
FEF6D26419468F0000E3F8DB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FEF6D26319468F0000E3F8DB /* main.m */; };
11+
/* End PBXBuildFile section */
12+
13+
/* Begin PBXCopyFilesBuildPhase section */
14+
FEF6D25E19468F0000E3F8DB /* CopyFiles */ = {
15+
isa = PBXCopyFilesBuildPhase;
16+
buildActionMask = 2147483647;
17+
dstPath = /usr/share/man/man1/;
18+
dstSubfolderSpec = 0;
19+
files = (
20+
);
21+
runOnlyForDeploymentPostprocessing = 1;
22+
};
23+
/* End PBXCopyFilesBuildPhase section */
24+
25+
/* Begin PBXFileReference section */
26+
B5E3A2C51D886F66003B5158 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
27+
FEF6D26019468F0000E3F8DB /* LoopPlayer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LoopPlayer; sourceTree = BUILT_PRODUCTS_DIR; };
28+
FEF6D26319468F0000E3F8DB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29+
/* End PBXFileReference section */
30+
31+
/* Begin PBXFrameworksBuildPhase section */
32+
FEF6D25D19468F0000E3F8DB /* Frameworks */ = {
33+
isa = PBXFrameworksBuildPhase;
34+
buildActionMask = 2147483647;
35+
files = (
36+
);
37+
runOnlyForDeploymentPostprocessing = 0;
38+
};
39+
/* End PBXFrameworksBuildPhase section */
40+
41+
/* Begin PBXGroup section */
42+
FEF6D25719468F0000E3F8DB = {
43+
isa = PBXGroup;
44+
children = (
45+
B5E3A2C51D886F66003B5158 /* README.md */,
46+
FEF6D26219468F0000E3F8DB /* LoopPlayer */,
47+
FEF6D26119468F0000E3F8DB /* Products */,
48+
);
49+
sourceTree = "<group>";
50+
};
51+
FEF6D26119468F0000E3F8DB /* Products */ = {
52+
isa = PBXGroup;
53+
children = (
54+
FEF6D26019468F0000E3F8DB /* LoopPlayer */,
55+
);
56+
name = Products;
57+
sourceTree = "<group>";
58+
};
59+
FEF6D26219468F0000E3F8DB /* LoopPlayer */ = {
60+
isa = PBXGroup;
61+
children = (
62+
FEF6D26319468F0000E3F8DB /* main.m */,
63+
);
64+
path = LoopPlayer;
65+
sourceTree = "<group>";
66+
};
67+
/* End PBXGroup section */
68+
69+
/* Begin PBXNativeTarget section */
70+
FEF6D25F19468F0000E3F8DB /* LoopPlayer */ = {
71+
isa = PBXNativeTarget;
72+
buildConfigurationList = FEF6D26719468F0000E3F8DB /* Build configuration list for PBXNativeTarget "LoopPlayer" */;
73+
buildPhases = (
74+
FEF6D25C19468F0000E3F8DB /* Sources */,
75+
FEF6D25D19468F0000E3F8DB /* Frameworks */,
76+
FEF6D25E19468F0000E3F8DB /* CopyFiles */,
77+
);
78+
buildRules = (
79+
);
80+
dependencies = (
81+
);
82+
name = LoopPlayer;
83+
productName = avloopplayer;
84+
productReference = FEF6D26019468F0000E3F8DB /* LoopPlayer */;
85+
productType = "com.apple.product-type.tool";
86+
};
87+
/* End PBXNativeTarget section */
88+
89+
/* Begin PBXProject section */
90+
FEF6D25819468F0000E3F8DB /* Project object */ = {
91+
isa = PBXProject;
92+
attributes = {
93+
LastUpgradeCheck = 0800;
94+
ORGANIZATIONNAME = Apple;
95+
};
96+
buildConfigurationList = FEF6D25B19468F0000E3F8DB /* Build configuration list for PBXProject "LoopPlayer" */;
97+
compatibilityVersion = "Xcode 3.2";
98+
developmentRegion = English;
99+
hasScannedForEncodings = 0;
100+
knownRegions = (
101+
en,
102+
);
103+
mainGroup = FEF6D25719468F0000E3F8DB;
104+
productRefGroup = FEF6D26119468F0000E3F8DB /* Products */;
105+
projectDirPath = "";
106+
projectRoot = "";
107+
targets = (
108+
FEF6D25F19468F0000E3F8DB /* LoopPlayer */,
109+
);
110+
};
111+
/* End PBXProject section */
112+
113+
/* Begin PBXSourcesBuildPhase section */
114+
FEF6D25C19468F0000E3F8DB /* Sources */ = {
115+
isa = PBXSourcesBuildPhase;
116+
buildActionMask = 2147483647;
117+
files = (
118+
FEF6D26419468F0000E3F8DB /* main.m in Sources */,
119+
);
120+
runOnlyForDeploymentPostprocessing = 0;
121+
};
122+
/* End PBXSourcesBuildPhase section */
123+
124+
/* Begin XCBuildConfiguration section */
125+
FEF6D26519468F0000E3F8DB /* Debug */ = {
126+
isa = XCBuildConfiguration;
127+
buildSettings = {
128+
ALWAYS_SEARCH_USER_PATHS = NO;
129+
AXLE_ENABLE_DEBUG_INFO = YES;
130+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
131+
CLANG_CXX_LIBRARY = "libc++";
132+
CLANG_ENABLE_MODULES = YES;
133+
CLANG_ENABLE_OBJC_ARC = YES;
134+
CLANG_WARN_ASSIGN_ENUM = YES;
135+
CLANG_WARN_BOOL_CONVERSION = YES;
136+
CLANG_WARN_CONSTANT_CONVERSION = YES;
137+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
138+
CLANG_WARN_EMPTY_BODY = YES;
139+
CLANG_WARN_ENUM_CONVERSION = YES;
140+
CLANG_WARN_INT_CONVERSION = YES;
141+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
142+
CLANG_WARN_UNREACHABLE_CODE = YES;
143+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
144+
COPY_PHASE_STRIP = NO;
145+
ENABLE_STRICT_OBJC_MSGSEND = YES;
146+
ENABLE_TESTABILITY = YES;
147+
GCC_C_LANGUAGE_STANDARD = gnu99;
148+
GCC_DYNAMIC_NO_PIC = NO;
149+
GCC_NO_COMMON_BLOCKS = YES;
150+
GCC_OPTIMIZATION_LEVEL = 0;
151+
GCC_PREPROCESSOR_DEFINITIONS = (
152+
"DEBUG=1",
153+
"$(inherited)",
154+
);
155+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
156+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
157+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
158+
GCC_WARN_UNDECLARED_SELECTOR = YES;
159+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
160+
GCC_WARN_UNUSED_FUNCTION = YES;
161+
GCC_WARN_UNUSED_VARIABLE = YES;
162+
MACOSX_DEPLOYMENT_TARGET = 10.9;
163+
ONLY_ACTIVE_ARCH = YES;
164+
SDKROOT = macosx;
165+
};
166+
name = Debug;
167+
};
168+
FEF6D26619468F0000E3F8DB /* Release */ = {
169+
isa = XCBuildConfiguration;
170+
buildSettings = {
171+
ALWAYS_SEARCH_USER_PATHS = NO;
172+
AXLE_ENABLE_DEBUG_INFO = NO;
173+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
174+
CLANG_CXX_LIBRARY = "libc++";
175+
CLANG_ENABLE_MODULES = YES;
176+
CLANG_ENABLE_OBJC_ARC = YES;
177+
CLANG_WARN_ASSIGN_ENUM = YES;
178+
CLANG_WARN_BOOL_CONVERSION = YES;
179+
CLANG_WARN_CONSTANT_CONVERSION = YES;
180+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
181+
CLANG_WARN_EMPTY_BODY = YES;
182+
CLANG_WARN_ENUM_CONVERSION = YES;
183+
CLANG_WARN_INT_CONVERSION = YES;
184+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
185+
CLANG_WARN_UNREACHABLE_CODE = YES;
186+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
187+
COPY_PHASE_STRIP = YES;
188+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
189+
ENABLE_NS_ASSERTIONS = NO;
190+
ENABLE_STRICT_OBJC_MSGSEND = YES;
191+
GCC_C_LANGUAGE_STANDARD = gnu99;
192+
GCC_NO_COMMON_BLOCKS = YES;
193+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
194+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
195+
GCC_WARN_UNDECLARED_SELECTOR = YES;
196+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
197+
GCC_WARN_UNUSED_FUNCTION = YES;
198+
GCC_WARN_UNUSED_VARIABLE = YES;
199+
MACOSX_DEPLOYMENT_TARGET = 10.9;
200+
SDKROOT = macosx;
201+
};
202+
name = Release;
203+
};
204+
FEF6D26819468F0000E3F8DB /* Debug */ = {
205+
isa = XCBuildConfiguration;
206+
buildSettings = {
207+
PRODUCT_NAME = "$(TARGET_NAME)";
208+
};
209+
name = Debug;
210+
};
211+
FEF6D26919468F0000E3F8DB /* Release */ = {
212+
isa = XCBuildConfiguration;
213+
buildSettings = {
214+
PRODUCT_NAME = "$(TARGET_NAME)";
215+
};
216+
name = Release;
217+
};
218+
/* End XCBuildConfiguration section */
219+
220+
/* Begin XCConfigurationList section */
221+
FEF6D25B19468F0000E3F8DB /* Build configuration list for PBXProject "LoopPlayer" */ = {
222+
isa = XCConfigurationList;
223+
buildConfigurations = (
224+
FEF6D26519468F0000E3F8DB /* Debug */,
225+
FEF6D26619468F0000E3F8DB /* Release */,
226+
);
227+
defaultConfigurationIsVisible = 0;
228+
defaultConfigurationName = Release;
229+
};
230+
FEF6D26719468F0000E3F8DB /* Build configuration list for PBXNativeTarget "LoopPlayer" */ = {
231+
isa = XCConfigurationList;
232+
buildConfigurations = (
233+
FEF6D26819468F0000E3F8DB /* Debug */,
234+
FEF6D26919468F0000E3F8DB /* Release */,
235+
);
236+
defaultConfigurationIsVisible = 0;
237+
defaultConfigurationName = Release;
238+
};
239+
/* End XCConfigurationList section */
240+
};
241+
rootObject = FEF6D25819468F0000E3F8DB /* Project object */;
242+
}

0 commit comments

Comments
 (0)