Last change
on this file since 632 was 541, checked in by Nicholas Riley, 15 years ago |
Finish migrating NJRQTMediaPopUpButton to QTKit. The alert still needs to be migrated.
|
File size:
790 bytes
|
Line | |
---|
1 | //
|
---|
2 | // QTMovie-NJRExtensions.m
|
---|
3 | // Pester
|
---|
4 | //
|
---|
5 | // Created by Nicholas Riley on Sat Oct 26 2002.
|
---|
6 | // Copyright (c) 2002 Nicholas Riley. All rights reserved.
|
---|
7 | //
|
---|
8 |
|
---|
9 | #import "QTMovie-NJRExtensions.h"
|
---|
10 |
|
---|
11 | @implementation QTMovie (NJRExtensions)
|
---|
12 |
|
---|
13 | // at least on 10.5, QTMovie already implements undocumented "hasAudio" and "hasVideo"
|
---|
14 | - (BOOL)NJR_hasAudio;
|
---|
15 | {
|
---|
16 | return [[self attributeForKey: QTMovieHasAudioAttribute] boolValue];
|
---|
17 | }
|
---|
18 |
|
---|
19 | - (BOOL)NJR_hasVideo;
|
---|
20 | {
|
---|
21 | return [[self attributeForKey: QTMovieHasVideoAttribute] boolValue];
|
---|
22 | }
|
---|
23 |
|
---|
24 | - (BOOL)NJR_isStatic;
|
---|
25 | {
|
---|
26 | NSEnumerator *e = [[self tracks] objectEnumerator];
|
---|
27 | QTTrack *track;
|
---|
28 | while ( (track = [e nextObject]) != nil)
|
---|
29 | if ([[[track media] attributeForKey: QTMediaSampleCountAttribute] longValue] > 1)
|
---|
30 | return NO;
|
---|
31 | return YES;
|
---|
32 | }
|
---|
33 |
|
---|
34 | @end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.