Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix library linking paths and add building instructions #23

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions CocoaSplit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@
34AE3C43164E410D0052C95E /* XPCListenerDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPCListenerDelegate.m; sourceTree = "<group>"; };
34AE3C46164E560C0052C95E /* QTHelperProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QTHelperProtocol.h; sourceTree = "<group>"; };
34AE3C69164F01800052C95E /* CapturedFrameProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CapturedFrameProtocol.h; sourceTree = "<group>"; };
34AE3C6A164F04B30052C95E /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = ../../../../System/Library/Frameworks/IOSurface.framework; sourceTree = "<group>"; };
34AE3C6C164F04C90052C95E /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = ../../../../System/Library/Frameworks/CoreVideo.framework; sourceTree = "<group>"; };
34AE3C6A164F04B30052C95E /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = System/Library/Frameworks/IOSurface.framework; sourceTree = SDKROOT; };
34AE3C6C164F04C90052C95E /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
34B026581712D8BA0063BB2D /* CmdLineDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CmdLineDelegate.h; sourceTree = "<group>"; };
34B026591712D8BA0063BB2D /* CmdLineDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CmdLineDelegate.m; sourceTree = "<group>"; };
34B74BC71648D23B00818DE2 /* QTCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QTCapture.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -989,6 +989,7 @@
/usr/local/lib/libmp3lame.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libx264.a,
/usr/lib/libiconv.dylib,
);
PRODUCT_NAME = CocoaSplit;
SDKROOT = macosx;
Expand All @@ -1012,12 +1013,13 @@
INFOPLIST_FILE = "CocoaSplit/CocoaSplit-Info.plist";
"LIBRARY_SEARCH_PATHS[arch=*]" = /usr/local/lib;
"OTHER_LDFLAGS[arch=*]" = (
/usr/local/lib/libavformat.a,
/usr/local/lib/libavutil.a,
/usr/local/lib/libavformat.a,
/usr/local/lib/libavcodec.a,
/usr/local/lib/libmp3lame.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libx264.a,
/usr/lib/libiconv.dylib,
);
PRODUCT_NAME = CocoaSplit;
SDKROOT = macosx;
Expand Down Expand Up @@ -1072,12 +1074,13 @@
MACOSX_DEPLOYMENT_TARGET = 10.8;
ONLY_ACTIVE_ARCH = YES;
"OTHER_LDFLAGS[arch=*]" = (
/usr/local/lib/libavformat.a,
/usr/local/lib/libavutil.a,
/usr/local/lib/libavformat.a,
/usr/local/lib/libavcodec.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libmp3lame.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libx264.a,
/usr/lib/libiconv.dylib,
);
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand All @@ -1100,12 +1103,13 @@
GCC_PREFIX_HEADER = "CocoaSplitCmd/CocoaSplitCmd-Prefix.pch";
MACOSX_DEPLOYMENT_TARGET = 10.8;
"OTHER_LDFLAGS[arch=*]" = (
/usr/local/lib/libavutil.a,
/usr/local/lib/libavformat.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libavcodec.a,
/usr/local/lib/libavutil.a,
/usr/local/lib/libx264.a,
/usr/local/lib/libmp3lame.a,
/usr/local/lib/libswscale.a,
/usr/local/lib/libx264.a,
/usr/lib/libiconv.dylib,
);
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = macosx;
Expand Down
2 changes: 1 addition & 1 deletion CocoaSplit/FFMpegTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ -(void) writeAVPacket:(AVPacket *)pkt codec_ctx:(AVCodecContext *)codec_ctx

AVPacket *p = av_malloc(sizeof (AVPacket));

memcpy(p, pkt, sizeof(AVPacket));
av_copy_packet(p, pkt);
p->destruct = NULL;
av_dup_packet(p);

Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ Supported Platforms

So far only tested on a Retina MacbookPro running Mountain Lion (10.8)

Building:
Install [Homebrew](http://brew.sh/#install)
Run `brew install ffmpeg --without-lame --without-faac --without-xvid && brew install imagemagick` in Terminal
Xcode project should now compile