summaryrefslogtreecommitdiffstats
path: root/mpeglib_artsplug/nullPlayObject_impl.cpp
blob: 2e291ac2f0ad1b97d13914fa5048735d4062cfce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/*
  base class for all mpeglib decoders
  Copyright (C) 2000  Martin Vogt

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Library General Public License as published by
  the Free Software Foundation.

  For more information look at the file COPYRIGHT in this package

 */

#include "nullPlayObject_impl.h"
#include "debug.h"

NULLPlayObject_impl::NULLPlayObject_impl() {
  _state=Arts::posIdle;

}

NULLPlayObject_impl::~NULLPlayObject_impl() {
  arts_debug("~NULLPlayObject_impl -s");
}


bool NULLPlayObject_impl::loadMedia(const string &filename) {
  arts_debug("NULLPlayObject_impl::loadMedia");
  return true;
}



string NULLPlayObject_impl::description() {
  arts_debug("description");
  string back;
  return back;
}

void NULLPlayObject_impl::description(const string &) {
  arts_debug("description");
  // what should do this?
}

Arts::poTime NULLPlayObject_impl::currentTime() {
  poTime time;
  return time;
}



poTime NULLPlayObject_impl::overallTime() {
  poTime time;
  return time;
}

poCapabilities NULLPlayObject_impl::capabilities() {
  arts_debug("capabilities");
  return Arts::capPause;  /* no seek supported */
}

string NULLPlayObject_impl::mediaName() {
  arts_debug("mediaName");
  string back;
  // whats a mediaName?
  return back;
}

poState NULLPlayObject_impl::state() {
  return _state;
}

void NULLPlayObject_impl::play() {
  arts_debug("NULLPlayObject_impl::play");
  _state = Arts::posPlaying;
}

void NULLPlayObject_impl::seek(const class poTime& seekTime) {
  long sec=seekTime.seconds;

  arts_debug("NULLPlayObject_impl::sec is %d:", sec);

}

void NULLPlayObject_impl::pause() {
  arts_debug("NULLPlayObject_impl::pause");
  _state = Arts::posPaused;
}

void NULLPlayObject_impl::halt() {
  arts_debug("NULLPlayObject_impl::halt");
  _state=Arts::posIdle;
}
 

void NULLPlayObject_impl::streamInit() {
  arts_debug(" NULLPlayObject_impl::streamInit");
}


void NULLPlayObject_impl::streamStart() {
  arts_debug(" NULLPlayObject_impl::streamStart");
}

void NULLPlayObject_impl::calculateBlock(unsigned long samples,
					    float* left , float* right) {


  arts_debug(" NULLPlayObject_impl::calculateBlock");
  
  unsigned int i;
  for(i=0;i<samples;i++)
    left[i] = right[i] = 0.0;
}

void NULLPlayObject_impl::streamEnd() {
  arts_debug("NULLPlayObject_impl::streamEnd");
}


REGISTER_IMPLEMENTATION(NULLPlayObject_impl);