diff options
author | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-04 14:48:11 +0000 |
---|---|---|
committer | Miguel Freitas <miguelfreitas@users.sourceforge.net> | 2003-01-04 14:48:11 +0000 |
commit | 4b91fa7eb32d3337e0ac6dc3fc6b210ca480b7b9 (patch) | |
tree | 24cfafb063e21ca2f61878b04c948bc5f74690ec /src/input/input_file.c | |
parent | feb5575abd810ae0a21de9c3f8dd3033cd4cf573 (diff) | |
download | xine-lib-4b91fa7eb32d3337e0ac6dc3fc6b210ca480b7b9.tar.gz xine-lib-4b91fa7eb32d3337e0ac6dc3fc6b210ca480b7b9.tar.bz2 |
add 2 demuxer groups (audio and games) with multiple plugins at the
same shared library (reduce loading time). demuxer api increased so
old ungrouped plugins won't be loaded.
Bill Fink patch to enable playback of live rawdv streams.
obs: non-regular files are now supposed non-seekable.
CVS patchset: 3771
CVS date: 2003/01/04 14:48:11
Diffstat (limited to 'src/input/input_file.c')
-rw-r--r-- | src/input/input_file.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/input/input_file.c b/src/input/input_file.c index 42702855e..372e864a8 100644 --- a/src/input/input_file.c +++ b/src/input/input_file.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_file.c,v 1.72 2002/12/29 16:48:34 mroi Exp $ + * $Id: input_file.c,v 1.73 2003/01/04 14:48:12 miguelfreitas Exp $ */ #ifdef HAVE_CONFIG_H @@ -71,7 +71,20 @@ typedef struct { static uint32_t file_plugin_get_capabilities (input_plugin_t *this_gen) { - return INPUT_CAP_SEEKABLE; + struct stat buf ; + file_input_plugin_t *this = (file_input_plugin_t *) this_gen; + + if (this->fh <0) + return 0; + + if (fstat (this->fh, &buf) == 0) { + if (S_ISREG(buf.st_mode)) + return INPUT_CAP_SEEKABLE; + else + return 0; + } else + perror ("system call fstat"); + return 0; } |