summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-09-08 16:51:59 +0000
committerjstebbins <[email protected]>2010-09-08 16:51:59 +0000
commita007891bf9f7e53d3705c51b5b41f9e56a144031 (patch)
treeb7a532c24a458d549afb0174c374e631b896a46e /test
parent772c3574758e9bc29cb76bbc86343cf9ad5ddd71 (diff)
Add Bluray support
Unencrypted BD directory trees only. Doesn't support iso images. Also, no PGS subtitle support yet. Chapters and angles are supported. Adds a new contrib libbluray. Adds new option to hb_scan() for duration of short titles to filter. This applies to BD and DVD multi-title scans only. Does not apply to any single title scans. Fixes memory leak during scan. hb_buffer_close() was not freeing all buffers in a chain of buffers passed to it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3510 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'test')
-rw-r--r--test/module.defs2
-rw-r--r--test/test.c14
2 files changed, 11 insertions, 5 deletions
diff --git a/test/module.defs b/test/module.defs
index 6fb748e12..cd79c05c0 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -11,7 +11,7 @@ TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI)
TEST.libs = $(LIBHB.a) $(foreach n, \
a52 avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
- ogg samplerate swscale theora vorbis vorbisenc x264, \
+ ogg samplerate swscale theora vorbis vorbisenc x264 bluray, \
$(CONTRIB.build/)lib/lib$(n).a )
TEST.install.exe = $(DESTDIR)$(PREFIX/)bin/$(notdir $(TEST.exe))
diff --git a/test/test.c b/test/test.c
index 34daa7377..cff30ef4b 100644
--- a/test/test.c
+++ b/test/test.c
@@ -126,6 +126,7 @@ static int64_t stop_at_pts = 0;
static int stop_at_frame = 0;
static char * stop_at_string = NULL;
static char * stop_at_token = NULL;
+static uint64_t min_title_duration = 900000LL;
/* Exit cleanly on Ctrl-C */
static volatile int die = 0;
@@ -241,7 +242,7 @@ int main( int argc, char ** argv )
titleindex = 0;
}
- hb_scan( h, input, titleindex, preview_count, store_previews );
+ hb_scan( h, input, titleindex, preview_count, store_previews, min_title_duration );
/* Wait... */
while( !die )
@@ -388,11 +389,11 @@ static void PrintTitleInfo( hb_title_t * title )
}
else if ( title->type == HB_DVD_TYPE )
{
- fprintf( stderr, " + vts %d, ttn %d, cells %d->%d (%d blocks)\n",
+ fprintf( stderr, " + vts %d, ttn %d, cells %d->%d (%"PRIu64" blocks)\n",
title->vts, title->ttn, title->cell_start, title->cell_end,
title->block_count );
}
- if (dvdnav)
+ if (title->angle_count > 1)
fprintf( stderr, " + angle(s) %d\n", title->angle_count );
fprintf( stderr, " + duration: %02d:%02d:%02d\n",
title->hours, title->minutes, title->seconds );
@@ -408,7 +409,7 @@ static void PrintTitleInfo( hb_title_t * title )
for( i = 0; i < hb_list_count( title->list_chapter ); i++ )
{
chapter = hb_list_item( title->list_chapter, i );
- fprintf( stderr, " + %d: cells %d->%d, %d blocks, duration "
+ fprintf( stderr, " + %d: cells %d->%d, %"PRIu64" blocks, duration "
"%02d:%02d:%02d\n", chapter->index,
chapter->cell_start, chapter->cell_end,
chapter->block_count, chapter->hours, chapter->minutes,
@@ -2607,6 +2608,7 @@ static int ParseOptions( int argc, char ** argv )
#define ROTATE_FILTER 275
#define SCAN_ONLY 276
#define MAIN_FEATURE 277
+ #define MIN_DURATION 278
for( ;; )
{
@@ -2626,6 +2628,7 @@ static int ParseOptions( int argc, char ** argv )
{ "ipod-atom", no_argument, NULL, 'I' },
{ "title", required_argument, NULL, 't' },
+ { "min-duration",required_argument, NULL, MIN_DURATION },
{ "scan", no_argument, NULL, SCAN_ONLY },
{ "main-feature",no_argument, NULL, MAIN_FEATURE },
{ "chapters", required_argument, NULL, 'c' },
@@ -3154,6 +3157,9 @@ static int ParseOptions( int argc, char ** argv )
else if( atoi( optarg ) == 709 )
color_matrix = 2;
break;
+ case MIN_DURATION:
+ min_title_duration = strtol( optarg, NULL, 0 );
+ break;
default:
fprintf( stderr, "unknown option (%s)\n", argv[cur_optind] );
return -1;