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

« back to all changes in this revision

Viewing changes to mpeglib/lib/input/inputStream.h

  • 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
 
 
15
 
 
16
#ifndef __INPUTSTREAM_H
 
17
#define __INPUTSTREAM_H
 
18
 
 
19
 
 
20
 
 
21
#include <iostream.h>
 
22
 
 
23
extern "C" {
 
24
#include <string.h>
 
25
#include <stdio.h>
 
26
#include <sys/stat.h>
 
27
}
 
28
 
 
29
#include "../util/timeStampArray.h"
 
30
#include "../util/dynBuffer.h"
 
31
 
 
32
 
 
33
 
 
34
 
 
35
/**
 
36
   The abstraction for the input stream. In derived classes
 
37
   we implement http,file and cdi access.
 
38
*/
 
39
 
 
40
 
 
41
class InputStream {
 
42
 
 
43
 
 
44
 
 
45
 public:
 
46
  InputStream();
 
47
 
 
48
 
 
49
  virtual ~InputStream();
 
50
 
 
51
  virtual int open(const char* dest);
 
52
  virtual void close();
 
53
  virtual int isOpen();
 
54
 
 
55
  virtual int eof();
 
56
  virtual int read(char* ptr,int size);
 
57
  virtual int seek(long bytePos);
 
58
  // clears possible input buffers
 
59
  // (called by the decoderPlugin after a resyncCommit)
 
60
  virtual void clear();
 
61
 
 
62
  virtual long getByteLength();
 
63
  virtual long getBytePosition();
 
64
 
 
65
  virtual void insertTimeStamp(TimeStamp* src,long key,int len);
 
66
  virtual TimeStamp* getTimeStamp(long key);
 
67
  virtual int bytesUntilNext(long key);
 
68
  virtual void print();
 
69
  char* getUrl();
 
70
 
 
71
 
 
72
 
 
73
 protected:
 
74
  DynBuffer* urlBuffer;
 
75
 
 
76
 
 
77
  class TimeStampArray* timeStampArray;
 
78
  void setUrl(const char* url);
 
79
 
 
80
 
 
81
};
 
82
#endif