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

« back to all changes in this revision

Viewing changes to mpeglib/example/yaf/yafcore/outputInterface.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
  This class sends an output to the outputstream
 
3
  Copyright (C) 1998  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
 
 
17
 
 
18
#ifndef __OUTPUTINTERFACE_H
 
19
#define __OUTPUTINTERFACE_H
 
20
 
 
21
#include <pthread.h>
 
22
#include <iostream.h>
 
23
#include <fstream.h>
 
24
#include "buffer.h"
 
25
 
 
26
// uncomment this for debugging the output stream
 
27
// (written to file outstream.dbg)
 
28
//#define _DEBUG_OUTPUT
 
29
 
 
30
 
 
31
class OutputInterface {
 
32
 
 
33
  int protocolSyntax;
 
34
  int nr;
 
35
  Buffer* outBuffer;
 
36
  ostream* out;
 
37
  pthread_mutex_t writeOutMut;
 
38
 
 
39
 
 
40
 public:
 
41
 
 
42
  OutputInterface(ostream* out);
 
43
  ~OutputInterface();
 
44
 
 
45
 
 
46
  void flushBuffer();
 
47
  void setProtocolSyntax(int proto);
 
48
  void setNr(int nr);
 
49
  void clearBuffer();
 
50
  void appendBuffer(const char* msg);
 
51
 
 
52
  // make this interface threadsafe
 
53
  void lock();
 
54
  void unlock();
 
55
 
 
56
};
 
57
 
 
58
 
 
59
 
 
60
#endif