Skip to content

Commit

Permalink
renamed a class, minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mrRay committed Apr 11, 2016
1 parent bb2861d commit b51f66a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
8 changes: 4 additions & 4 deletions HapInAVF Test App/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14B25" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="9531" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" customObjectInstantitationMethod="direct">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="9531"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
Expand All @@ -11,7 +11,7 @@
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate">
<customObject id="Voe-Tx-rLC" customClass="HapInAVFTestAppDelegate">
<connections>
<outlet property="glView" destination="31I-59-1lg" id="vVW-AH-0vN"/>
<outlet property="imgView" destination="0yA-2Z-CCI" id="8hU-jI-25O"/>
Expand Down Expand Up @@ -677,7 +677,7 @@
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1177"/>
<value key="minSize" type="size" width="360" height="305"/>
<view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="-7" width="400" height="380"/>
<rect key="frame" x="0.0" y="0.0" width="400" height="380"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" id="T5q-xd-X6Q">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@



@interface AppDelegate : NSObject <NSApplicationDelegate,NSTabViewDelegate> {
@interface HapInAVFTestAppDelegate : NSObject <NSApplicationDelegate,NSTabViewDelegate> {
CVDisplayLinkRef displayLink; // this "drives" rendering
NSOpenGLContext *sharedContext; // all GL contexts share this, so textures from one contact can be used in others
IBOutlet NSWindow *window;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#import "AppDelegate.h"
#import "HapInAVFTestAppDelegate.h"
#import <OpenGL/CGLMacro.h>




@implementation AppDelegate
@implementation HapInAVFTestAppDelegate


- (id) init {
Expand Down Expand Up @@ -423,7 +423,7 @@ CVReturn displayLinkCallback(CVDisplayLinkRef displayLink,
void *displayLinkContext)
{
NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];
[(AppDelegate *)displayLinkContext renderCallback];
[(HapInAVFTestAppDelegate *)displayLinkContext renderCallback];
[pool release];
return kCVReturnSuccess;
}
Expand Down
27 changes: 15 additions & 12 deletions HapInAVF Test App/HapPixelBufferTexture.m
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,13 @@ - (void) setDecodedFrame:(HapDecoderFrame *)newFrame {
// NOTE: NEEDS TESTING. this used to be the case- but this API is only available on 10.10+, so this may have been fixed.
backingWidths[texIndex] = 1;
while (backingWidths[texIndex] < roundedWidth) backingWidths[texIndex] <<= 1;

backingHeights[texIndex] = 1;
while (backingHeights[texIndex] < roundedHeight) backingHeights[texIndex] <<= 1;


// ...if we aren't doing POT dimensions, then we need to do this!
//backingWidths[texIndex] = roundedWidth;
//backingHeights[texIndex] = roundedHeight;

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
Expand All @@ -223,18 +226,18 @@ - (void) setDecodedFrame:(HapDecoderFrame *)newFrame {
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);

glCompressedTexSubImage2D(GL_TEXTURE_2D,
0,
0,
0,
roundedWidth,
roundedHeight,
newInternalFormat,
newDataLength,
baseAddress);

0,
0,
0,
roundedWidth,
roundedHeight,
newInternalFormat,
newDataLength,
baseAddress);
glPopClientAttrib();
glPopAttrib();

glFlush();
}
}
Expand Down
12 changes: 6 additions & 6 deletions HapInAVFoundation.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
1A0536231A38CA5D005B47BD /* YCoCg.c in Sources */ = {isa = PBXBuildFile; fileRef = 1A05361F1A38CA5D005B47BD /* YCoCg.c */; };
1A0536241A38CA5D005B47BD /* YCoCg.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A0536201A38CA5D005B47BD /* YCoCg.h */; };
1A0E542D1C85F809003EAED8 /* Utility.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0E542C1C85F809003EAED8 /* Utility.m */; };
1A32301A1A3BA14000DDB2E0 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A3230191A3BA14000DDB2E0 /* AppDelegate.m */; };
1A32301A1A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A3230191A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.m */; };
1A32301C1A3BA14000DDB2E0 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A32301B1A3BA14000DDB2E0 /* main.m */; };
1A32301E1A3BA14000DDB2E0 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A32301D1A3BA14000DDB2E0 /* Images.xcassets */; };
1A3230211A3BA14000DDB2E0 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1A32301F1A3BA14000DDB2E0 /* MainMenu.xib */; };
Expand Down Expand Up @@ -210,8 +210,8 @@
1A0E542C1C85F809003EAED8 /* Utility.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Utility.m; path = source/Utility.m; sourceTree = SOURCE_ROOT; };
1A3230141A3BA14000DDB2E0 /* HapInAVF Test App.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HapInAVF Test App.app"; sourceTree = BUILT_PRODUCTS_DIR; };
1A3230171A3BA14000DDB2E0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1A3230181A3BA14000DDB2E0 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
1A3230191A3BA14000DDB2E0 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
1A3230181A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HapInAVFTestAppDelegate.h; sourceTree = "<group>"; };
1A3230191A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HapInAVFTestAppDelegate.m; sourceTree = "<group>"; };
1A32301B1A3BA14000DDB2E0 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
1A32301D1A3BA14000DDB2E0 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
1A3230201A3BA14000DDB2E0 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
Expand Down Expand Up @@ -376,8 +376,8 @@
1A3230151A3BA14000DDB2E0 /* HapInAVF Test App */ = {
isa = PBXGroup;
children = (
1A3230181A3BA14000DDB2E0 /* AppDelegate.h */,
1A3230191A3BA14000DDB2E0 /* AppDelegate.m */,
1A3230181A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.h */,
1A3230191A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.m */,
1A05185A1A3E17CF00FC80D2 /* GLView.h */,
1A05185B1A3E17CF00FC80D2 /* GLView.m */,
1A05185C1A3E17CF00FC80D2 /* HapPixelBufferTexture.h */,
Expand Down Expand Up @@ -761,7 +761,7 @@
files = (
1A05185F1A3E17CF00FC80D2 /* HapPixelBufferTexture.m in Sources */,
1A32301C1A3BA14000DDB2E0 /* main.m in Sources */,
1A32301A1A3BA14000DDB2E0 /* AppDelegate.m in Sources */,
1A32301A1A3BA14000DDB2E0 /* HapInAVFTestAppDelegate.m in Sources */,
1A05185E1A3E17CF00FC80D2 /* GLView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down

0 comments on commit b51f66a

Please sign in to comment.