annotate Gui/mplayer/play.c @ 5429:e9e2dc1306b1

BITMAPINFOHEADER fixed to be accepted by win32 decoders (divx,divxds)
author arpi
date Sun, 31 Mar 2002 20:17:27 +0000
parents b3bd4b29a03b
children 3e7f39c4110c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4428
3e1378354c2e Compilation fixing
nick
parents: 3479
diff changeset
1 #include <inttypes.h>
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 #include <stdlib.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #include <stdio.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 #include <unistd.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6 #include <signal.h>
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 #include "../wm/ws.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9 #include "../../config.h"
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1866
diff changeset
10 #include "../../help_mp.h"
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
11 #include "../../libvo/x11_common.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
12
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
13 #include "../app.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
14
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
15 #include "../wm/wskeys.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
16 #include "../wm/widget.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
17 #include "../interface.h"
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
18
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19 #include "widgets.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 #include "./mplayer.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21 #include "play.h"
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
23 #include "../skin/skin.h"
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
24 #include "../skin/font.h"
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
26 extern float rel_seek_secs;
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
27 extern int abs_seek_pos;
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
28
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 void mplFullScreen( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
30 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
31 static int sx,sy;
2979
6d341644ee28 smal; bugfix for main redraw
pontscho
parents: 2911
diff changeset
32
5032
931ce1e11ad1 fix fs handling
pontscho
parents: 4983
diff changeset
33 // if ( !guiIntfStruct.Playing )
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
34 {
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
35 wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
36 if ( appMPlayer.subWindow.isFullScreen )
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
37 {
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
38 wsResizeWindow( &appMPlayer.subWindow,sx,sy );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
39 wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
40 wsWindowDecoration( &appMPlayer.subWindow,appMPlayer.subWindow.Decorations );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
41 appMPlayer.subWindow.isFullScreen=0;
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
42 }
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
43 else
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
44 {
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
45 sx=appMPlayer.subWindow.Width; sy=appMPlayer.subWindow.Height;
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
46 wsResizeWindow( &appMPlayer.subWindow,wsMaxX,wsMaxY );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
47 wsMoveWindow( &appMPlayer.subWindow,True,0,0 );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
48 wsWindowDecoration( &appMPlayer.subWindow,0 );
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
49 appMPlayer.subWindow.isFullScreen=1;
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
50 }
5032
931ce1e11ad1 fix fs handling
pontscho
parents: 4983
diff changeset
51 vo_fs=appMPlayer.subWindow.isFullScreen;
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
52 wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
5032
931ce1e11ad1 fix fs handling
pontscho
parents: 4983
diff changeset
53 }// else { vo_x11_fullscreen(); appMPlayer.subWindow.isFullScreen=vo_fs; }
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
54
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4963
diff changeset
55 fullscreen=appMPlayer.subWindow.isFullScreen;
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
56 if ( guiIntfStruct.Playing ) wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2029
diff changeset
57 else wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 extern int mplSubRender;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 void mplStop()
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
64 guiIntfStruct.Playing=0;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
65 guiIntfStruct.TimeSec=0;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
66 guiIntfStruct.Position=0;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
67 guiIntfStruct.AudioType=0;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
68 // if ( !guiIntfStruct.Playing ) return;
1796
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
69 if ( !appMPlayer.subWindow.isFullScreen )
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
70 {
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
71 wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
72 wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
1796
13ea5f992185 fix stop subimage
pontscho
parents: 1791
diff changeset
73 }
4963
13262bd21965 small changes
pontscho
parents: 4818
diff changeset
74 guiGetEvent( guiCEvent,guiSetStop );
1797
d1aabeb7274f fix after stop redraw. vagy nem.
pontscho
parents: 1796
diff changeset
75 mplSubRender=1;
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2029
diff changeset
76 wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
1953
041483da104e stop bug fix.
pontscho
parents: 1952
diff changeset
77 wsClearWindow( appMPlayer.subWindow );
1797
d1aabeb7274f fix after stop redraw. vagy nem.
pontscho
parents: 1796
diff changeset
78 wsPostRedisplay( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 void mplPlay( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
83 if ( ( !guiIntfStruct.Filename )||
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
84 ( guiIntfStruct.Filename[0] == 0 )||
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
85 ( guiIntfStruct.Playing == 1 ) ) return;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
86 if ( guiIntfStruct.Playing == 2 ) { mplPause(); return; }
4963
13262bd21965 small changes
pontscho
parents: 4818
diff changeset
87 guiGetEvent( guiCEvent,guiSetPlay );
1791
2e86c5c8071e fix subvindov
pontscho
parents: 1784
diff changeset
88 mplSubRender=0;
1858
88a88d0a3f94 fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents: 1852
diff changeset
89 wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
90 wsClearWindow( appMPlayer.subWindow );
4963
13262bd21965 small changes
pontscho
parents: 4818
diff changeset
91 // wsPostRedisplay( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
94 void mplPause( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
95 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
96 switch( guiIntfStruct.Playing )
1804
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
97 {
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
98 case 1: // playing
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
99 guiIntfStruct.Playing=2;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
100 break;
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
101 case 2: // paused
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
102 guiIntfStruct.Playing=1;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
103 break;
1804
76b4f7bcd087 play->pause fix ?
pontscho
parents: 1802
diff changeset
104 }
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
105 mplState();
1815
eff8f3c200fa fix resize
pontscho
parents: 1812
diff changeset
106 mplSubRender=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
107 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
108
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
109 void mplState( void )
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
110 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
111 if ( ( guiIntfStruct.Playing == 0 )||( guiIntfStruct.Playing == 2 ) )
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
112 {
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
113 btnModify( evPlaySwitchToPause,btnReleased );
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
114 btnModify( evPauseSwitchToPlay,btnDisabled );
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
115 }
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
116 else
4465
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
117 {
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
118 btnModify( evPlaySwitchToPause,btnDisabled );
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
119 btnModify( evPauseSwitchToPlay,btnReleased );
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
120 }
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
121 }
b013d01d9968 small bugfixes, and kill other warning
pontscho
parents: 4428
diff changeset
122
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
123 void mplMPlayerInit( int argc,char* argv[], char *envp[] )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
124 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
125 guiIntfStruct.Balance=50.0f;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
126 guiIntfStruct.StreamType=-1;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
127 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
129 float mplGetPosition( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
130 { // return 0.0 ... 100.0
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
131 return guiIntfStruct.Position;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
133
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
134 void mplRelSeek( float s )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 { // -+s
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
136 rel_seek_secs=s; abs_seek_pos=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
137 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 void mplAbsSeek( float s )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
140 { // 0.0 ... 100.0
1723
5e4214a7540e GUI stuff. now seeking works, and xmga renders to video window
arpi
parents: 1693
diff changeset
141 rel_seek_secs=0.01*s; abs_seek_pos=3;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
142 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
143
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
144 listItems tmpList;
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
145
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
146 void ChangeSkin( char * name )
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
147 {
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
148 int ret;
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
149 // if ( !strcmp( skinName,name ) ) return;
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
150 mainVisible=0;
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
151
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
152 appInitStruct( &tmpList );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
153 skinAppMPlayer=&tmpList;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
154 fntFreeFont();
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
155 ret=skinRead( name );
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
156
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
157 appInitStruct( &tmpList );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
158 skinAppMPlayer=&appMPlayer;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
159 appInitStruct( &appMPlayer );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
160 if ( ret ) name=skinName;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
161 if ( skinRead( name ) )
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
162 {
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
163 mainVisible=1;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
164 return;
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
165 }
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
166
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
167 if ( appMPlayer.menuBase.Bitmap.Image )
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
168 {
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
169 if ( mplMenuDrawBuffer ) free( mplMenuDrawBuffer );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
170 if ( ( mplMenuDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.menuBase.Bitmap.ImageSize ) ) == NULL )
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
171 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
172 wsResizeWindow( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
173 wsResizeImage( &appMPlayer.menuWindow,appMPlayer.menuBase.width,appMPlayer.menuBase.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
174 }
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
175
2226
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
176 if ( appMPlayer.sub.Bitmap.Image ) wsResizeImage( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Width,appMPlayer.sub.Bitmap.Height );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
177 if ( ( !appMPlayer.subWindow.isFullScreen )&&( !guiIntfStruct.Playing ) )
2226
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
178 {
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
179 wsResizeWindow( &appMPlayer.subWindow,appMPlayer.sub.width,appMPlayer.sub.height );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
180 wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
181 }
2226
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
182 if ( appMPlayer.sub.Bitmap.Image ) wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
183 if ( !guiIntfStruct.Playing )
2226
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
184 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
185 mplSubRender=1;
2911
7a8cc25832fa skin change bug fix
pontscho
parents: 2854
diff changeset
186 wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
2226
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
187 wsClearWindow( appMPlayer.subWindow );
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
188 wsPostRedisplay( &appMPlayer.subWindow );
9582af160d04 skin chaning bug fix.
pontscho
parents: 2045
diff changeset
189 }
1866
32b1bb50a0e8 some bug fix, and add decoration item to skin conffile. faszom(C)
pontscho
parents: 1861
diff changeset
190
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
191 if ( mplDrawBuffer ) free( mplDrawBuffer );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
192 if ( ( mplDrawBuffer = (unsigned char *)calloc( 1,appMPlayer.main.Bitmap.ImageSize ) ) == NULL )
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
193 { mp_msg( MSGT_GPLAYER,MSGL_STATUS,MSGTR_NEMDB ); return; }
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
194 wsVisibleWindow( &appMPlayer.mainWindow,wsHideWindow );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
195 wsResizeWindow( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
196 wsMoveWindow( &appMPlayer.mainWindow,True,appMPlayer.main.x,appMPlayer.main.y );
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
197 wsResizeImage( &appMPlayer.mainWindow,appMPlayer.main.width,appMPlayer.main.height );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
198 wsSetShape( &appMPlayer.mainWindow,appMPlayer.main.Mask.Image );
2979
6d341644ee28 smal; bugfix for main redraw
pontscho
parents: 2911
diff changeset
199 wsWindowDecoration( &appMPlayer.mainWindow,appMPlayer.mainDecoration );
1907
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
200 mainVisible=1; mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow );
83291fafe66c add new features. and fix skin error loop.
pontscho
parents: 1888
diff changeset
201 wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
202
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
203 btnModify( evSetVolume,guiIntfStruct.Volume );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
204 btnModify( evSetBalance,guiIntfStruct.Balance );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
205 btnModify( evSetMoviePosition,guiIntfStruct.Position );
3479
2704448de713 fs button bug fix
pontscho
parents: 2979
diff changeset
206 btnModify( evFullScreen,!appMPlayer.subWindow.isFullScreen );
1800
f5ffb03ebdb5 move skin changing here.
pontscho
parents: 1797
diff changeset
207 }
1802
82e77faa7341 async reply fix ?
pontscho
parents: 1800
diff changeset
208
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
209 void mplResizeToMovieSize( unsigned int width,unsigned int height )
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
210 {
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
211 if ( !appMPlayer.subWindow.isFullScreen )
2025
0653e90b3118 some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents: 1953
diff changeset
212 {
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
213 wsResizeWindow( &appMPlayer.subWindow,width,height );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
214 wsMoveWindow( &appMPlayer.subWindow,True,appMPlayer.sub.x,appMPlayer.sub.y );
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
215 }
1952
b55163894e30 compile bug fixed.
pontscho
parents: 1907
diff changeset
216 }
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
217
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
218 void mplSetFileName( char * fname )
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
219 {
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
220 if ( !fname ) return;
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
221 if ( guiIntfStruct.Filename ) free( guiIntfStruct.Filename );
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4798
diff changeset
222 guiIntfStruct.Filename=strdup( fname );
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2447
diff changeset
223 }