Open zakgilbert opened 5 years ago
Issue #35
Sorry for the huge delay! I tried this on OSX and it errors out with a redefinition of time spec:
Scanning dependencies of target catimg
[ 20%] Building C object CMakeFiles/catimg.dir/src/catimg.c.o
/Users/posva/catimg/src/catimg.c:41:8: error: redefinition of 'timespec'
struct timespec {
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_timespec.h:33:1: note: previous definition is here
_STRUCT_TIMESPEC
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/sys/_types/_timespec.h:29:40: note: expanded from macro '_STRUCT_TIMESPEC'
#define _STRUCT_TIMESPEC struct timespec
^
1 error generated.
make[2]: *** [CMakeFiles/catimg.dir/src/catimg.c.o] Error 1
make[1]: *** [CMakeFiles/catimg.dir/all] Error 2
make: *** [all] Error 2
Using an #ifndef
around the struct seems to make it work. Could you share the 2 or 3 of the gifs you tested with?
I apologize, its been so long. First of all, this program, in my opinion, reaches into the highest branches of top notchery, so good on you @posva, most people can't reach that high.
As for myself, I'll look into this issue a bit more.
No worries! Take the time you need And thank you so much for the kind words 😄
timespec should be getting defined by time.h already, I don't see the need for defining the struct.
Was able to get nanosleep working
Declared the
timespec
struct above main incatimg.c
, wasn't sure where you wanted it.I tested multiple gifs and provided them in the test-gifs directory, goku.gif is my only concern, as hes going super sayan way quicker with the nanosleep.
I checkout the gif in gimp and the background layer is labled as
Background (1000ms)
as where every other layer is formated such asframe 1 (40ms) (combine)
. Not sure what the deal is. But besides for this, everything (all the other gifs I tested) appears to look very close to the same.