~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/output/outPlugin.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  generic output plugin
 
3
  Copyright (C) 1999  Martin Vogt
 
4
 
 
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.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
 
 
15
#include "outPlugin.h"
 
16
 
 
17
 
 
18
 
 
19
 
 
20
OutPlugin::OutPlugin() {
 
21
}
 
22
 
 
23
 
 
24
OutPlugin::~OutPlugin() {
 
25
}
 
26
 
 
27
 
 
28
 
 
29
OutputStream* OutPlugin::createOutputStream(int outputType) {
 
30
 
 
31
  // make checks which input routine to use
 
32
  OutputStream* outputStream;
 
33
  int method;
 
34
 
 
35
  outputStream=NULL;
 
36
  method=outputType;
 
37
 
 
38
  switch(method) {
 
39
  case _OUTPUT_LOCAL: {
 
40
    outputStream=new DspX11OutputStream(1024*64);
 
41
    break;
 
42
  }
 
43
  case _OUTPUT_ARTS: {
 
44
    outputStream=new ArtsOutputStream(NULL);
 
45
    break;
 
46
  }
 
47
  case _OUTPUT_EMPTY: {
 
48
    outputStream=new OutputStream();
 
49
    break;
 
50
  }
 
51
  default:
 
52
    cout << "error cannot create default output stream"<<endl;
 
53
    exit(0);
 
54
  }
 
55
 
 
56
  return outputStream;
 
57
 
 
58
 
 
59
}
 
60
 
 
61
OutputStream* OutPlugin::createOutputStream(int outputType,int lThreadSafe) {
 
62
  OutputStream* output=OutPlugin::createOutputStream(outputType);
 
63
  if (lThreadSafe==false) {
 
64
    return output;
 
65
  }
 
66
  OutputStream* tsOutput=new ThreadSafeOutputStream(output);
 
67
  return tsOutput;
 
68
}
 
69