summaryrefslogtreecommitdiffstats
path: root/libhb/rotate.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2014-12-16 16:50:50 +0000
committerjstebbins <[email protected]>2014-12-16 16:50:50 +0000
commitf56efd7b52c89da8cac55b4d4a187f2c87fdfee6 (patch)
tree24eacb856704fa8e4b8b8f0edc76568916f70255 /libhb/rotate.c
parentd0a975e42dcab93e1d2eead350fb1ba3951d977c (diff)
json: add json APIs
There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/rotate.c')
-rw-r--r--libhb/rotate.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/libhb/rotate.c b/libhb/rotate.c
index ba849c09d..654668fe2 100644
--- a/libhb/rotate.c
+++ b/libhb/rotate.c
@@ -26,8 +26,7 @@ struct hb_filter_private_s
int mode;
int width;
int height;
- int par_width;
- int par_height;
+ hb_rational_t par;
int cpu_count;
@@ -267,18 +266,17 @@ static int hb_rotate_init( hb_filter_object_t * filter,
if( pv->mode & 4 )
{
// 90 degree rotation, exchange width and height
- int tmp = init->width;
- init->width = init->height;
- init->height = tmp;
+ int tmp = init->geometry.width;
+ init->geometry.width = init->geometry.height;
+ init->geometry.height = tmp;
- tmp = init->par_width;
- init->par_width = init->par_height;
- init->par_height = tmp;
+ tmp = init->geometry.par.num;
+ init->geometry.par.num = init->geometry.par.den;
+ init->geometry.par.den = tmp;
}
- pv->width = init->width;
- pv->height = init->height;
- pv->par_width = init->par_width;
- pv->par_height = init->par_height;
+ pv->width = init->geometry.width;
+ pv->height = init->geometry.height;
+ pv->par = init->geometry.par;
return 0;
}
@@ -291,10 +289,9 @@ static int hb_rotate_info( hb_filter_object_t * filter,
return 1;
memset( info, 0, sizeof( hb_filter_info_t ) );
- info->out.width = pv->width;
- info->out.height = pv->height;
- info->out.par_width = pv->par_width;
- info->out.par_height = pv->par_height;
+ info->out.geometry.width = pv->width;
+ info->out.geometry.height = pv->height;
+ info->out.geometry.par = pv->par;
int pos = 0;
if( pv->mode & 1 )
pos += sprintf( &info->human_readable_desc[pos], "flip vertical" );