X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=x264cli.h;h=cc7a82252a7128ff5bd84039c891631c0fab6d6c;hb=refs%2Fheads%2Fspeedcontrol;hp=1acca5617955a385142e56ee9a352c6500e9d3cf;hpb=43a4334670ae60d0f8a30d3e4bd530d3b90a1ce1;p=x264 diff --git a/x264cli.h b/x264cli.h index 1acca561..cc7a8225 100644 --- a/x264cli.h +++ b/x264cli.h @@ -1,7 +1,7 @@ /***************************************************************************** * x264cli.h: x264cli common ***************************************************************************** - * Copyright (C) 2003-2010 x264 project + * Copyright (C) 2003-2016 x264 project * * Authors: Laurent Aimar * Loren Merritt @@ -19,6 +19,9 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA. + * + * This program is also available under a commercial proprietary license. + * For more information, contact us at licensing@x264.com. *****************************************************************************/ #ifndef X264_CLI_H @@ -26,9 +29,12 @@ #include "common/common.h" +/* In microseconds */ +#define UPDATE_INTERVAL 250000 + typedef void *hnd_t; -static inline int64_t gcd( int64_t a, int64_t b ) +static inline uint64_t gcd( uint64_t a, uint64_t b ) { while( 1 ) { @@ -40,7 +46,7 @@ static inline int64_t gcd( int64_t a, int64_t b ) } } -static inline int64_t lcm( int64_t a, int64_t b ) +static inline uint64_t lcm( uint64_t a, uint64_t b ) { return ( a / gcd( a, b ) ) * b; } @@ -57,11 +63,27 @@ static inline char *get_filename_extension( char *filename ) void x264_cli_log( const char *name, int i_level, const char *fmt, ... ); void x264_cli_printf( int i_level, const char *fmt, ... ); -#define FAIL_IF_ERR( cond, name, ... )\ +#ifdef _WIN32 +void x264_cli_set_console_title( const char *title ); +int x264_ansi_filename( const char *filename, char *ansi_filename, int size, int create_file ); +#else +#define x264_cli_set_console_title( title ) +#endif + +#define RETURN_IF_ERR( cond, name, ret, ... )\ if( cond )\ {\ x264_cli_log( name, X264_LOG_ERROR, __VA_ARGS__ );\ - return -1;\ + return ret;\ } +#define FAIL_IF_ERR( cond, name, ... ) RETURN_IF_ERR( cond, name, -1, __VA_ARGS__ ) + +typedef enum +{ + RANGE_AUTO = -1, + RANGE_TV, + RANGE_PC +} range_enum; + #endif