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

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/render/renderMachine.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
  puts the yuv images onto a surface
 
3
  Copyright (C) 2000  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 __RENDERMACHINE_H
 
17
#define __RENDERMACHINE_H
 
18
 
 
19
 
 
20
 
 
21
 
 
22
/**
 
23
   RenderMachine. We still have the problem, because of performance,
 
24
   that we cannot have a yuv picture format in the decoder
 
25
   and one in the output to x11. they must be shared.
 
26
   XV support then directly works on them and SDL images
 
27
   can be exported to the decoder as well.
 
28
 
 
29
   Another point is : mode switch. User want desktop->fullscreen switch.
 
30
   Due to the threaded nature, we must have a single synchronization
 
31
   point, when we know that the decoder currently does _not_ decode
 
32
   so that we can switch the imaged and free the memory.
 
33
 
 
34
   Some points are currently unclear, for example how to handle 
 
35
   applications, which want to redirect the image into their own 
 
36
   buffers, but hey, there are that many classes and layers
 
37
   I really think it should be doable somehow
 
38
 
 
39
*/
 
40
 
 
41
#ifdef HAVE_CONFIG_H
 
42
#include "config.h"
 
43
#endif
 
44
 
 
45
#ifndef SDL_WRAPPER
 
46
#include "x11/x11Surface.h"
 
47
#endif
 
48
 
 
49
#ifdef SDL_WRAPPER
 
50
#include "sdl/sdlSurface.h"
 
51
#endif
 
52
 
 
53
#include "pictureArray.h"
 
54
#include "../abstract/abs_thread.h"
 
55
 
 
56
class RenderMachine {
 
57
 
 
58
 
 
59
  Surface* surface;
 
60
  PictureArray* pictureArray;
 
61
 
 
62
  
 
63
  TimeStamp* startTime;
 
64
  TimeStamp* endTime;
 
65
 
 
66
  int initialMode;
 
67
 
 
68
 public:
 
69
  RenderMachine();
 
70
  ~RenderMachine();
 
71
 
 
72
  int openWindow(int width, int height,const char *title);
 
73
  void closeWindow();
 
74
  void flushWindow();
 
75
 
 
76
  
 
77
  PictureArray* lockPictureArray();
 
78
  void unlockPictureArray(PictureArray* pictureArray);
 
79
 
 
80
  void config(const char* key, const char* value,void* user_data);
 
81
 
 
82
 private:
 
83
  void waitRestTime();
 
84
  void putImage(YUVPicture* pic,TimeStamp* waitTime,TimeStamp* earlyTime);
 
85
 
 
86
  int switchToMode(int mode);
 
87
 
 
88
};
 
89
#endif