Skip to content

Commit 37417fd

Browse files
committed
Update CC2017
1 parent 5703d5a commit 37417fd

26 files changed

+420
-643
lines changed

.gitignore

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
SpoutAE/x64/Debug/
2-
*.sdf
1+
.vs/Spout-AfterEffects/v14/.suo
2+
Spout-AfterEffects.VC.db
3+
Spout-AfterEffects.aps
4+
Spout-AfterEffects.rc

README.md

-24
This file was deleted.

Spout-AfterEffects.sln

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 14
4+
VisualStudioVersion = 14.0.25420.1
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spout-AfterEffects", "Spout-AfterEffects.vcxproj", "{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|x64 = Debug|x64
11+
Debug|x86 = Debug|x86
12+
Release|x64 = Release|x64
13+
Release|x86 = Release|x86
14+
EndGlobalSection
15+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Debug|x64.ActiveCfg = Debug|x64
17+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Debug|x64.Build.0 = Debug|x64
18+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Debug|x86.ActiveCfg = Debug|Win32
19+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Debug|x86.Build.0 = Debug|Win32
20+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Release|x64.ActiveCfg = Release|x64
21+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Release|x64.Build.0 = Release|x64
22+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Release|x86.ActiveCfg = Release|Win32
23+
{6D4130D4-8DE3-4EA9-ACDC-8ED259E620D0}.Release|x86.Build.0 = Release|Win32
24+
EndGlobalSection
25+
GlobalSection(SolutionProperties) = preSolution
26+
HideSolutionNode = FALSE
27+
EndGlobalSection
28+
EndGlobal

SpoutAE/SpoutAE.vcxproj Spout-AfterEffects.vcxproj

+63-76
Large diffs are not rendered by default.

Spout-AfterEffects.vcxproj.filters

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup>
4+
<Filter Include="Source Files">
5+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
6+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
7+
</Filter>
8+
<Filter Include="Header Files">
9+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
10+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
11+
</Filter>
12+
<Filter Include="Resource Files">
13+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
14+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
15+
</Filter>
16+
</ItemGroup>
17+
<ItemGroup>
18+
<Text Include="ReadMe.txt" />
19+
</ItemGroup>
20+
<ItemGroup>
21+
<ClInclude Include="targetver.h">
22+
<Filter>Header Files</Filter>
23+
</ClInclude>
24+
<ClInclude Include="SpoutAE.h">
25+
<Filter>Header Files</Filter>
26+
</ClInclude>
27+
<ClInclude Include="resource.h">
28+
<Filter>Header Files</Filter>
29+
</ClInclude>
30+
</ItemGroup>
31+
<ItemGroup>
32+
<ClCompile Include="SpoutAE.cpp">
33+
<Filter>Source Files</Filter>
34+
</ClCompile>
35+
</ItemGroup>
36+
<ItemGroup>
37+
<ResourceCompile Include="SpoutPiPL.rc">
38+
<Filter>Resource Files</Filter>
39+
</ResourceCompile>
40+
</ItemGroup>
41+
<ItemGroup>
42+
<CustomBuild Include="SpoutPiPL.r">
43+
<Filter>Resource Files</Filter>
44+
</CustomBuild>
45+
</ItemGroup>
46+
</Project>

Spout-AfterEffects.vcxproj.user

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup />
4+
</Project>

SpoutAE.aex

-209 KB
Binary file not shown.

SpoutAE.cpp

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*******************************************************************/
2+
/* */
3+
/* ADOBE CONFIDENTIAL */
4+
/* _ _ _ _ _ _ _ _ _ _ _ _ _ */
5+
/* */
6+
/* Copyright 2007 Adobe Systems Incorporated */
7+
/* All Rights Reserved. */
8+
/* */
9+
/* NOTICE: All information contained herein is, and remains the */
10+
/* property of Adobe Systems Incorporated and its suppliers, if */
11+
/* any. The intellectual and technical concepts contained */
12+
/* herein are proprietary to Adobe Systems Incorporated and its */
13+
/* suppliers and may be covered by U.S. and Foreign Patents, */
14+
/* patents in process, and are protected by trade secret or */
15+
/* copyright law. Dissemination of this information or */
16+
/* reproduction of this material is strictly forbidden unless */
17+
/* prior written permission is obtained from Adobe Systems */
18+
/* Incorporated. */
19+
/* */
20+
/*******************************************************************/
21+
22+
#include "SpoutAE.h"
23+
24+
#ifdef AE_OS_WIN
25+
BOOL APIENTRY LibMain(HANDLE hInstance, DWORD fdwReason, LPVOID lpReserved)
26+
{
27+
printf("Spout.aex Initialization entry point.");
28+
return TRUE;
29+
}
30+
#endif
31+
32+
static PF_Err
33+
MyBlit(
34+
void *hook_refconPV,
35+
const AE_PixBuffer *pix_bufP0,
36+
const AE_ViewCoordinates *viewP,
37+
AE_BlitReceipt receipt,
38+
AE_BlitCompleteFunc complete_func0,
39+
AE_BlitInFlags in_flags,
40+
AE_BlitOutFlags *out_flags)
41+
{
42+
43+
bool shouldUpdate = false;
44+
45+
if (pix_bufP0->widthL != (tWidth - 4) || pix_bufP0->heightL != (tHeight + 4)) shouldUpdate = true;
46+
tWidth = pix_bufP0->widthL + 4;
47+
tHeight = pix_bufP0->heightL - 4;
48+
49+
50+
if (!bSenderInitialized)
51+
{
52+
printf("Create sender\n");
53+
bSenderInitialized = spoutsender->CreateSender(senderName, tWidth, tHeight);
54+
}
55+
else if (shouldUpdate)
56+
{
57+
printf("Update sender\n");
58+
spoutsender->ReleaseSender();
59+
bSenderInitialized = spoutsender->CreateSender(senderName, tWidth, tHeight);
60+
}
61+
62+
63+
if(bSenderInitialized)
64+
{
65+
66+
PF_Pixel8 * pixels = (PF_Pixel8 *)pix_bufP0->pixelsPV;
67+
PF_Pixel8 * pixels2 = (PF_Pixel8 *)malloc(tWidth*tHeight * sizeof(PF_Pixel8));
68+
69+
memcpy(pixels2, pixels, tWidth*tHeight * sizeof(PF_Pixel8));
70+
71+
for (int y = 0; y<tHeight; y++)
72+
{
73+
for (int x = 0; x<tWidth; x++)
74+
{
75+
int index = x + y*tWidth;
76+
int index2 = x + (tHeight - 1 - y)*tWidth;
77+
pixels2[index].alpha = pixels[index2].blue;
78+
pixels2[index].red = pixels[index2].green;
79+
pixels2[index].green = pixels[index2].red;
80+
pixels2[index].blue = pixels[index2].alpha;
81+
}
82+
}
83+
84+
spoutsender->SendImage((unsigned char *)pixels2, tWidth, tHeight,GL_BGRA_EXT,true);
85+
}
86+
87+
88+
return PF_Err_NONE;
89+
}
90+
91+
static void
92+
MyDeath(
93+
void *hook_refconPV)
94+
{
95+
// free anything you allocated.
96+
}
97+
98+
static void
99+
MyVersion(
100+
void *hook_refconPV,
101+
A_u_long *versionPV)
102+
{
103+
*versionPV = 1;
104+
}
105+
106+
DllExport PF_Err
107+
EntryPointFunc(
108+
A_long major_version,
109+
A_long minor_version,
110+
AE_FileSpecH file_specH,
111+
AE_FileSpecH res_specH,
112+
AE_Hooks *hooksP)
113+
{
114+
PF_Err err = PF_Err_NONE;
115+
hooksP->blit_hook_func = MyBlit;
116+
hooksP->death_hook_func = MyDeath;
117+
hooksP->version_hook_func = MyVersion;
118+
119+
120+
/*
121+
AllocConsole();
122+
freopen("CONIN$", "r", stdin);
123+
freopen("CONOUT$", "w", stdout);
124+
freopen("CONOUT$", "w", stderr);
125+
126+
printf("SpoutAE EntryPoint\n");
127+
*/
128+
129+
spoutsender = GetSpout(); // Create an instance of the Spout library
130+
bSenderInitialized = false; // Spout sender initialization
131+
bMemoryShare = false; // Memoryshare mode not detected yet
132+
strcpy(senderName, "After Effects"); // Set the sender name
133+
tWidth = 0;
134+
tHeight = 0;
135+
136+
return err;
137+
}
138+

SpoutAE.h

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#pragma once
2+
3+
#ifndef SPOUTAE_H
4+
#define SPOUTAE_H
5+
6+
#include "AEConfig.h"
7+
#include "A.h"
8+
#include "AE_Effect.h"
9+
#include "AE_EffectCB.h"
10+
#include "AE_Macros.h"
11+
#include "AE_Hook.h"
12+
#include "entry.h"
13+
14+
#ifdef AE_OS_WIN
15+
#include <stdio.h>
16+
#include <windows.h>
17+
#endif
18+
19+
#define MAJOR_VERSION 1
20+
#define MINOR_VERSION 0
21+
#define BUG_VERSION 0
22+
#define STAGE_VERSION PF_Stage_DEVELOP
23+
#define BUILD_VERSION 0
24+
25+
#define NAME "Spout"
26+
#define DESCRIPTION "Spout Sender Plugin"
27+
28+
#include "AE_Hook.h"
29+
30+
#define DllExport __declspec( dllexport )
31+
32+
33+
#include "SpoutLibrary.h"
34+
SPOUTLIBRARY * spoutsender;
35+
bool bSenderInitialized; // Sender initialization result
36+
char senderName[256]; // Sender name
37+
bool bMemoryShare;
38+
int tWidth ;
39+
int tHeight ;
40+
41+
extern "C" {
42+
DllExport PF_Err
43+
EntryPointFunc(
44+
A_long major_version, /* >> */
45+
A_long minor_version, /* >> */
46+
AE_FileSpecH file_specH, /* >> */
47+
AE_FileSpecH res_specH, /* >> */
48+
AE_Hooks *hooksP); /* <> */
49+
}
50+
#ifdef AE_OS_WIN
51+
BOOL WINAPI LibMain(HANDLE hInstance, DWORD fdwReason, LPVOID lpReserved);
52+
#endif
53+
54+
#endif //SPOUTAE_H

SpoutAE/ReadMe.txt

-48
This file was deleted.

0 commit comments

Comments
 (0)