2
C interface creator for input_plugins
3
Copyright (C) 1999 Martin Vogt
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation.
9
For more information look at the file COPYRIGHT in this package
14
#include "inputPlugin.h"
19
InputPlugin::InputPlugin() {
23
InputPlugin::~InputPlugin() {
28
int InputPlugin::getInputType(const char* dest) {
29
return InputDetector::getInputType(dest);
33
InputStream* InputPlugin::createInputStream(int inputType) {
34
// make checks which input routine to use
35
InputStream* inputStream;
43
inputStream=new FileInputStream();
47
inputStream=new CDDAInputStream();
52
inputStream=new HttpInputStream();
56
inputStream=new CDRomInputStream();
60
cout << "error cannot create default input stream"<<endl;
67
InputStream* InputPlugin::createInputStream(int inputType,int lThreadSafe) {
68
InputStream* input=InputPlugin::createInputStream(inputType);
69
if (lThreadSafe == false) {
72
InputStream* tsInput=new ThreadSafeInputStream(input);
77
InputStream* InputPlugin::createInputStream(const char* dest) {
80
method=InputPlugin::getInputType(dest);
81
return (InputPlugin::createInputStream(method));
85
InputStream* InputPlugin::createInputStream(const char* dest,int lThreadSafe) {
88
method=InputPlugin::getInputType(dest);
89
return (InputPlugin::createInputStream(method,lThreadSafe));