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

« back to all changes in this revision

Viewing changes to mpeglib/lib/input/inputStream.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 input class
 
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
#include "inputStream.h"
 
15
#include "../util/mmx.h"
 
16
 
 
17
InputStream::InputStream() {
 
18
  timeStampArray=new TimeStampArray((char*)"Input",3000);
 
19
  urlBuffer=new DynBuffer(20);
 
20
  // we call mm_support() here because it is the only position
 
21
  // where we gurantee that not threads are
 
22
  // running (the call is not thread safe)
 
23
  // afer the call we never execute the asm part again
 
24
  // and everything is fine
 
25
  mm_support();
 
26
}
 
27
 
 
28
 
 
29
 
 
30
InputStream::~InputStream() {
 
31
  delete timeStampArray;
 
32
  delete urlBuffer;
 
33
  
 
34
}
 
35
 
 
36
 
 
37
int InputStream::open(const char* dest) {
 
38
  cout << "direct virtual call InputStream::open:"<<dest<<endl;
 
39
  return false;
 
40
}
 
41
 
 
42
 
 
43
void InputStream::close() {
 
44
  cout << "direct virtual call InputStream::close"<<endl;
 
45
  exit(0); 
 
46
}
 
47
 
 
48
 
 
49
int InputStream::isOpen() {
 
50
  cout << "direct virtual call InputStream::isOpen"<<endl;
 
51
  exit(0);
 
52
  return false; 
 
53
}
 
54
 
 
55
 
 
56
int InputStream::eof() {
 
57
  cout << "direct virtual call InputStream::eof"<<endl;
 
58
  exit(0);
 
59
  return true;  
 
60
}
 
61
 
 
62
 
 
63
int InputStream::read(char* ,int ) {
 
64
  cout << "direct virtual call InputStream::read"<<endl;
 
65
  exit(0);
 
66
  return 0;  
 
67
}
 
68
 
 
69
 
 
70
int InputStream::seek(long bytePos) {
 
71
  cout << "direct virtual call InputStream::seek:"<<bytePos<<endl;
 
72
  exit(0);
 
73
  return false;  
 
74
}
 
75
 
 
76
void InputStream::clear() {
 
77
  cout << "direct virtual call InputStream::clear:"<<endl;
 
78
  exit(0);
 
79
}
 
80
 
 
81
 
 
82
long InputStream::getByteLength() {
 
83
  cout << "direct virtual call InputStream::getByteLength"<<endl;
 
84
  return 0;
 
85
}
 
86
 
 
87
 
 
88
long InputStream::getBytePosition() {
 
89
  cout << "direct virtual call InputStream::getBytePosition"<<endl;
 
90
  return 0;
 
91
}
 
92
 
 
93
 
 
94
void InputStream::insertTimeStamp(TimeStamp* src,long key,int len) {
 
95
  timeStampArray->insertTimeStamp(src,key,len);
 
96
}
 
97
 
 
98
TimeStamp* InputStream::getTimeStamp(long key) {
 
99
  return timeStampArray->getTimeStamp(key);
 
100
}
 
101
 
 
102
 
 
103
int InputStream::bytesUntilNext(long key) {
 
104
  return timeStampArray->bytesUntilNext(key);
 
105
}
 
106
 
 
107
void InputStream::print() {
 
108
  cout << "direct virtual call InputStream::print"<<endl;
 
109
}
 
110
 
 
111
 
 
112
 
 
113
 
 
114
 
 
115
char* InputStream::getUrl() {
 
116
  return urlBuffer->getData();
 
117
}
 
118
 
 
119
 
 
120
void InputStream::setUrl(const char* url) {
 
121
  urlBuffer->clear();
 
122
  if (url != NULL) {
 
123
    urlBuffer->append(url);
 
124
  }
 
125
}
 
126
 
 
127
 
 
128
 
 
129
 
 
130