Debian Codegraph @

samples/qtvidcap/fullscreen_renderer.h

raw
1 #ifndef AVICAP_RENDERER_H
2 #define AVICAP_RENDERER_H
3
4 #include "avm_stl.h"
5 #include "image.h"
6 #include "subtitle.h"
7 #include "renderer.h"
8 #include "playerwidget.h"
9 #include <videodecoder.h>
10 #include <aviplay.h>
11 #include <avifile.h>
12 #include <avm_creators.h>
13
14 #include "capproc.h"
15 #include "v4lwindow.h"
16
17 class V4LWindow;
18
19 AVM_BEGIN_NAMESPACE;
20
21 class AvicapRenderer : public IPlayerWidget
22 {
23 IPlayerWidget* m_pPW;
24 void* m_pDpy;
25 //int m_iResizeCount;
26 int zx, zy, zw, zh;
27 Colorspaces recording_csp;
28 V4LWindow *v4lw;
29 bool my_useyuv;
30 int m_iWidth,m_iHeight;
31 avm::vector<IVideoRenderer*> m_VideoRenderers; // we could draw image to more places
32 int GetWidth() const {return m_iWidth;}
33 int GetHeight() const {return m_iHeight;}
34 uint_t m_CSP; // used colorspace by renderer
35
36 public:
37 AvicapRenderer(void *dpy);
38 virtual ~AvicapRenderer();
39 virtual void createVideoRenderer();
40 virtual int Refresh();
41 virtual int Resize(int& new_w, int& new_h);
42 virtual int Zoom(int x, int y, int w, int h);
43 virtual void PW_resize(int w, int h) { Resize(w,h); } // resize event
44 virtual void PW_menu_slot() { v4lw->avicap_renderer_popup(); }
45 virtual void PW_quit_func() { v4lw->avicap_renderer_close(); }
46 virtual void PW_key_func(int sym, int mod) { v4lw->avicap_renderer_keypress(sym,mod); }
47
48 virtual int ToggleFullscreen(bool maximize=false);
49 void updateResize();
50 bool checkColorSpace(fourcc_t csp);
51 int drawFrame(avm::CImage* im);
52 void setSize(int w,int h);
53 void setV4LWindow(V4LWindow *v4lwindow) { v4lw=v4lwindow; };
54 void setYUVrendering(bool mode) { my_useyuv=mode; };
55
56 // void PopupMenu();
57
58 void setRecordingColorSpace(Colorspaces colorspace);
59
60 void setCaption(avm::string capstr);
61 };
62
63 AVM_END_NAMESPACE;
64
65 #endif // AVICAP_RENDERER_H