-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@masc4ii Now you can remove tonemapping checkbox completely, and replace it with processing profile selector, there are 4 profiles: #define PROFILE_STANDARD 0 /* Gamma Corrected */ #define PROFILE_TONEMAPPED 1 /* Gamma Corrected + Tonemapped */ #define PROFILE_ALEXA_LOG 2 /* Alexa log (Also known as Log-C) */ #define PROFILE_LINEAR 3 /* Linear, idk who would want this */ Which you set with function: void processingSetImageProfile(processingObject_t * processing, int imageProfile); More will be added in the future Hope it didn't break the app, I think it should still compile with your version, I've tried to maintain backward compatibility(for the transition) Look at release to see how I implemented the profile selector menu, you decide where to put the selector, top or bottom, mines currently at the top but I'll probably put it at the bottom once I add histogram.
- Loading branch information
Showing
10 changed files
with
294 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef _session_methods_h_ | ||
#define _session_methods_h_ | ||
|
||
/* Methods/functions for handling sessions */ | ||
|
||
|
||
/* This is a function as it may be used in more than one place */ | ||
void sessionAddNewMlvClip(char * mlvPathString, char * mlvFileName); | ||
/* Called from -(void)openSessionDialog - currently only loads first clip */ | ||
void appLoadSession(char * sessionPath); | ||
/* Frees/deletes all mlv objects */ | ||
void appClearSession(); | ||
|
||
|
||
/* Button methods */ | ||
@interface NSButton (sessionMethods) | ||
|
||
/* Opens a dialog to select MLV file + sets MLV file to that */ | ||
-(void)openSessionDialog; | ||
|
||
@end | ||
|
||
|
||
/* Slider methods */ | ||
@interface NSSlider (sessionMethods) | ||
|
||
@end | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* Methods for user interface interactions | ||
* this is where some real code goes */ | ||
|
||
#include <math.h> | ||
#include <string.h> | ||
#include <unistd.h> | ||
|
||
#import "Cocoa/Cocoa.h" | ||
|
||
#include "gui_stuff/app_design.h" | ||
|
||
#include "main_methods.h" | ||
#include "../../src/mlv_include.h" | ||
|
||
#include "mac_info.h" | ||
|
||
#include "background_thread.h" | ||
|
||
/* God object used to share globals (type) */ | ||
#include "godobject.h" | ||
/* The godobject itsself */ | ||
extern godObject_t * App; | ||
|
||
|
||
/* Methods/functions for handling sessions */ | ||
|
||
/* This is a function as it may be used in more than one place */ | ||
void sessionAddNewMlvClip(char * mlvPathString, char * mlvFileName) | ||
{ | ||
return; | ||
/* Do clip adding stuff here... */ | ||
App->session.clipCount++; | ||
} | ||
|
||
/* Called from -(void)openSessionDialog - currently only loads first clip */ | ||
void appLoadSession(char * sessionPath) | ||
{ | ||
/* Open the MASXML file 4 reading */ | ||
FILE * session_file = fopen(sessionPath, "rb"); | ||
|
||
/* Get size of file */ | ||
fseek(session_file, 0, SEEK_END); | ||
uint64_t masxml_size = ftell(session_file); | ||
|
||
/* Don't allow files over over 8MB */ | ||
if (masxml_size > (1 << 23)) return; | ||
|
||
/* Read whole session in to memory */ | ||
char * session_xml = calloc(masxml_size, sizeof(char)); | ||
fread(session_xml, sizeof(char), masxml_size, session_file); | ||
fclose(session_file); | ||
|
||
/* Parse the XML... */ | ||
|
||
/* This will be boring to write :( */ | ||
|
||
free(session_xml); | ||
} | ||
|
||
/* Frees/deletes all mlv objects */ | ||
void appClearSession() | ||
{ | ||
/* Not done as you can see */ | ||
App->session.clipCount = 0; | ||
return; | ||
} | ||
|
||
|
||
/* Button methods */ | ||
@implementation NSButton (sessionMethods) | ||
|
||
/* Opens a dialog to select MLV file + sets MLV file to that */ | ||
-(void)openSessionDialog | ||
{ | ||
return; | ||
} | ||
|
||
@end | ||
|
||
|
||
/* Slider methods */ | ||
@implementation NSSlider (sessionMethods) | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
3824475
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NICE!