1
mirror of https://github.com/mpv-player/mpv synced 2024-10-22 08:51:57 +02:00

Merge svn changes up to r31189

This commit is contained in:
Uoti Urpala 2010-05-30 15:42:42 +03:00
commit e74361c488
6 changed files with 37 additions and 25 deletions

View File

@ -1,4 +1,4 @@
.\" sync with en/mplayer.1 rev. 31028
.\" sync with en/mplayer.1 rev. 31173
.\" Encoding: UTF-8
.\" Reminder of hard terms which need better/final solution later:
.\" /capture; playtree in parent list; colorkey; retrace; desync; downmix;
@ -3899,10 +3899,11 @@ mga 视频输出驱动, 运行在 X11 窗口。
.PD 1
.
.TP
.B s3fb仅适用于Linux另参见 \-vf yuv2 \-dr
S3 Virge专用的视频输出驱动。
此驱动支持显卡的YUV转换与缩放、双重缓冲和直接渲染的功能。
使用\-vf yuy2以采用硬件加速下的YUV2渲染这种方式在此款显卡下比YV12快很多。
.B s3fb仅适用于 Linux )(另参见 \-dr
S3 Virge 专用的视频输出驱动。
此驱动支持显卡的 YUV 转换与缩放、双重缓冲和直接渲染的功能。
使用 \-vf format=yuy2 以采用硬件加速下的 YUV2 渲染,这种方式
在此款显卡下比 YV12 快很多。
.PD 0
.RSs
.IPs <device>
@ -5670,11 +5671,6 @@ spal 768x576 正方形像素PAL
.RE
.
.TP
.B "yuy2\ \ \ "
强制执行YV12/\:I420/\:422P至YUY2的软件转换。
对于那些对YV12支持较差但对YUY2支持较好的显卡很有用。
.
.TP
.B "yvu9\ \ \ "
强制执行YVU9至YV12色彩空间的软件转换。
不赞成使用,因为使用软件色彩调整器更好。

View File

@ -209,9 +209,11 @@ static void uninit(int immed){
#endif
if (broken_seek || fseek(fp, 0, SEEK_SET) != 0)
mp_msg(MSGT_AO, MSGL_ERR, "Could not seek to start, WAV size headers not updated!\n");
else if (data_length > 0x7ffff000)
mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n");
else {
if (data_length > 0xfffff000) {
mp_msg(MSGT_AO, MSGL_ERR, "File larger than allowed for WAV files, may play truncated!\n");
data_length = 0xfffff000;
}
write_wave_header(fp, data_length);
}
}

View File

@ -178,11 +178,11 @@ static int vf_open(vf_instance_t *vf, char *args){
plane==0 ? lum : (plane==1 ? cb : cr),
NULL
};
char * a;
vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2, func2_names, &a);
vf->priv->e[plane] = ff_parse_expr(eq[plane], const_names, NULL, NULL, func2_names, func2, 0, NULL);
if (!vf->priv->e[plane]) {
mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s': %s\n", eq[plane], a);
mp_msg(MSGT_VFILTER, MSGL_ERR, "geq: error loading equation `%s'\n", eq[plane]);
return 0;
}
}

View File

@ -66,11 +66,15 @@ static int config(struct vf_instance *vf,
"qp",
NULL
};
double temp_val;
const char *error = NULL;
vf->priv->lut[i+129]= lrintf(ff_parse_and_eval_expr(vf->priv->eq, const_values, const_names, NULL, NULL, NULL, NULL, NULL, &error));
if (error)
mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\": %s\n", vf->priv->eq, error);
temp_val= ff_parse_and_eval_expr(vf->priv->eq, const_names, const_values, NULL, NULL, NULL, NULL, NULL, 0, NULL);
if (isnan(temp_val)){
mp_msg(MSGT_VFILTER, MSGL_ERR, "qp: Error evaluating \"%s\" \n", vf->priv->eq);
return 0;
}
vf->priv->lut[i+129]= lrintf(temp_val);
}
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);

View File

@ -203,15 +203,19 @@ int vo_w32_check_events(void) {
DispatchMessage(&msg);
}
if (WinID >= 0) {
BOOL res;
RECT r;
GetClientRect(vo_window, &r);
if (r.right != vo_dwidth || r.bottom != vo_dheight) {
res = GetClientRect(vo_window, &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight)) {
vo_dwidth = r.right; vo_dheight = r.bottom;
event_flags |= VO_EVENT_RESIZE;
}
GetClientRect(WinID, &r);
if (r.right != vo_dwidth || r.bottom != vo_dheight)
res = GetClientRect(WinID, &r);
if (res && (r.right != vo_dwidth || r.bottom != vo_dheight))
MoveWindow(vo_window, 0, 0, r.right, r.bottom, FALSE);
if (!IsWindow(WinID))
// Window has probably been closed, e.g. due to program crash
mplayer_put_key(KEY_CLOSE_WIN);
}
return event_flags;
@ -389,7 +393,7 @@ static int createRenderingContext(void) {
int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) {
// we already have a fully initialized window, so nothing needs to be done
if (flags & VOFLAG_HIDDEN)
return;
return 1;
// store original size for videomode switching
o_dwidth = width;
o_dheight = height;
@ -409,6 +413,7 @@ int vo_w32_config(uint32_t width, uint32_t height, uint32_t flags) {
/**
* \brief return the name of the selected device if it is indepedant
* \return pointer to string, must be freed.
*/
static char *get_display_name(void) {
DISPLAY_DEVICE disp;
@ -416,7 +421,7 @@ static char *get_display_name(void) {
EnumDisplayDevices(NULL, vo_adapter_num, &disp, 0);
if (disp.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP)
return NULL;
return disp.DeviceName;
return strdup(disp.DeviceName);
}
/**
@ -493,6 +498,7 @@ int vo_w32_init(void) {
dev_hdc = 0;
dev = get_display_name();
if (dev) dev_hdc = CreateDC(dev, NULL, NULL, NULL);
free(dev);
updateScreenProperties();
vo_hdc = vo_w32_get_dc(vo_window);

View File

@ -861,6 +861,10 @@ int vo_x11_check_events(struct vo *vo)
XSetWMNormalHints(display, x11->window, &x11->vo_hint);
x11->fs_flip = 0;
break;
case DestroyNotify:
mp_msg(MSGT_VO, MSGL_WARN, "Our window was destroyed, exiting\n");
mplayer_put_key(vo->key_fifo, KEY_CLOSE_WIN);
break;
case ClientMessage:
if (Event.xclient.message_type == x11->XAWM_PROTOCOLS &&
Event.xclient.data.l[0] == x11->XAWM_DELETE_WINDOW)