Skip to content

Commit

Permalink
Removed extraneous commented code, added kTheoraKeyframeGranuleShift …
Browse files Browse the repository at this point in the history
…constant.
  • Loading branch information
toolness committed Jan 24, 2011
1 parent 4d31480 commit d74b871
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ScreenCapTheoraAppDelegate.m
Expand Up @@ -21,6 +21,7 @@
#define kFPS 1
#define kImageScaling 0.25
#define kTheoraQuality 32
#define kTheoraKeyframeGranuleShift 6

typedef struct {
int fd;
Expand Down Expand Up @@ -274,12 +275,12 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
NSLog(@"Picture size is %dx%d.", scaledWidth, scaledHeight);

/* Must be multiples of 16 */
mTheora.ti.frame_width = scaledWidth;//(width + 15) & ~0xF;
mTheora.ti.frame_height = scaledHeight;//(height + 15) & ~0xF;
mTheora.ti.frame_width = scaledWidth;
mTheora.ti.frame_height = scaledHeight;
mTheora.ti.pic_width = scaledWidth;
mTheora.ti.pic_height = scaledHeight;
mTheora.ti.pic_x = 0; //(mTheora.ti.frame_width - width) >> 1 & ~1;
mTheora.ti.pic_y = 0; //(mTheora.ti.frame_height - height) >> 1 & ~1;
mTheora.ti.pic_x = 0;
mTheora.ti.pic_y = 0;
mTheora.ti.fps_numerator = kFPS;
mTheora.ti.fps_denominator = 1;

Expand All @@ -290,8 +291,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
//mTheora.ti.target_bitrate = 128000;
mTheora.ti.colorspace = TH_CS_ITU_REC_470M;
mTheora.ti.pixel_fmt = TH_PF_420;
// TODO: Make granule shift a named constant.
mTheora.ti.keyframe_granule_shift = 6;
mTheora.ti.keyframe_granule_shift = kTheoraKeyframeGranuleShift;

mTheora.th = th_encode_alloc(&mTheora.ti);
th_info_clear(&mTheora.ti);
Expand Down

0 comments on commit d74b871

Please sign in to comment.