[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r23133 - Extractor/src/plugins
From: |
gnunet |
Subject: |
[GNUnet-SVN] r23133 - Extractor/src/plugins |
Date: |
Mon, 6 Aug 2012 12:49:58 +0200 |
Author: grothoff
Date: 2012-08-06 12:49:58 +0200 (Mon, 06 Aug 2012)
New Revision: 23133
Modified:
Extractor/src/plugins/mpeg_extractor.c
Log:
fast skip to end for non-compressed large mpeg files
Modified: Extractor/src/plugins/mpeg_extractor.c
===================================================================
--- Extractor/src/plugins/mpeg_extractor.c 2012-08-05 23:41:16 UTC (rev
23132)
+++ Extractor/src/plugins/mpeg_extractor.c 2012-08-06 10:49:58 UTC (rev
23133)
@@ -1,4 +1,3 @@
-
/*
This file is part of libextractor.
(C) 2004, 2005, 2006, 2009, 2012 Vidyut Samanta and Christian Grothoff
@@ -54,6 +53,7 @@
char format[256];
char gop_format[256];
int have_gop;
+ uint64_t fsize;
if (NULL == (handle = mpeg2_init ()))
return;
@@ -62,6 +62,7 @@
mpeg2_close (handle);
return;
}
+ fsize = ec->get_size (ec->cls);
buf = NULL;
have_gop = 0;
while (1)
@@ -102,7 +103,15 @@
if ((info->sequence->flags & SEQ_FLAG_MPEG2) > 0)
ADD ("MPEG2", EXTRACTOR_METATYPE_FORMAT_VERSION);
else
- ADD ("MPEG1", EXTRACTOR_METATYPE_FORMAT_VERSION);
+ ADD ("MPEG1", EXTRACTOR_METATYPE_FORMAT_VERSION);
+ if ( (fsize != -1) &&
+ (fsize > 1024 * 256 * 2) )
+ {
+ /* skip to the end of the mpeg for speed */
+ ec->seek (ec->cls,
+ fsize - 256 * 1024,
+ SEEK_SET);
+ }
break;
case STATE_GOP:
if ( (NULL != info->gop) &&
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r23133 - Extractor/src/plugins,
gnunet <=