[MPlayer-users] gl/g2 don't work well with -wid in windows

Pepe rvm3000 at ya.com
Sun Feb 18 18:19:22 CET 2007


El Domingo, 18 de Febrero de 2007 15:32, Reimar Döffinger escribió:
> Hello,
>
> On Sat, Feb 17, 2007 at 06:17:10PM +0100, Pepe wrote:
> > The manpage says that the option -wid works with X11, OpenGL and DirectX
> > (it seems it works too with xv).
> >
> > I'm developing smplayer, which works both in linux and windows. I use the
> > option -wid to embed mplayer in my application. Under Windows it works
> > well with directx (and directx:noaccel) but not with gl or gl2.
> >
> > The problem is that when I resize the window some strange things appear.
> > See screenshot: http://www.uploadfile.info/uploads/c0ec0c871e.jpg
>
> With the smplayer versions I could find it does not work at all, MPlayer
> can't create an OpenGL context...

Unfortunately the sourceforge shell server where I have smplayer hosted is 
down for several days, so I couldn't upload updates.

Meanwhile I've uploaded to other site. This is the latest version:

http://www.escomposlinux.org/rvm/temp/SMP/smplayer-0.1.15.tar.gz
This is the source code (Qt opensource is needed to compile it).

Binaries for Windows:

http://downloads.sourceforge.net/smplayer/smplayer_070204_without_mplayer_installer.exe
That is the latest full package (includes Qt shared libraries, but not 
mplayer)

Unfortunately that version is a little bit old, so I've made an update:
http://www.escomposlinux.org/rvm/temp/SMP/smplayer_update_0.1.15.zip
This is a small zip containing the binary only.

I think that in this version gl/gl2 works (showing the problem mentioned).

This is the mplayer log, when running embed in smplayer:

(gl)

[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
[gl] Using 4 as slice height (0 means image height).
[vo] query(Planar YV12) -> 0
[vo] query(Planar I420) -> 0
[vo] query(Planar IYUV) -> 0
Opening video filter: [scale]
(...) 
VO Config (624x352->624x352,flags=4,'MPlayer',0x32315659)
SwScaler: using unscaled yuv420p -> rgb32 special converter
REQ: flags=0x24B7  req=0x0
REQ: flags=0x24B7  req=0x0
VO: [gl] 624x352 => 624x352 BGRA  [zoom]
VO: Description: X11 (OpenGL)
VO: Author: Arpad Gereoffy <arpi at esp-team.scene.hu>
vo: win32: running at 1280x800 with depth 32

OpenGL extensions string:
GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array 
GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program 
GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample 
GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite 
GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow 
GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression 
GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine 
GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float 
GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle 
GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object 
GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos 
GL_ARB_draw_buffers GL_ATI_draw_buffers GL_ATI_envmap_bumpmap 
GL_ATI_fragment_shader GL_ATI_separate_stencil GL_ATI_texture_env_combine3 
GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_streams 
GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route 
GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra 
GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax 
GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements 
GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays 
GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal 
GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs 
GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D 
GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map 
GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 
GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias 
GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle 
GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test 
GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection 
GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_multitexture 
GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod 
GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string 
WGL_EXT_swap_control
 
[gl] Creating 1024x512 texture...
[gl] Resize: 624x352
 
Video attribute 'hue' is not supported by selected vo & vd.
 
*** [vo] Allocating mp_image_t, 624x352x32bpp BGR packed, 878592 bytes
*** [screenshot] Direct Rendering mp_image_t, 624x352x32bpp BGR packed, 878592 
bytes
*** [scale] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 329472 
bytes
 


And this is what it says with gl2:

[vo] query(Planar YV12) -> 0
[vo] query(Planar I420) -> 0
[vo] query(Planar IYUV) -> 0
Opening video filter: [scale]
(...) 
 
Starting playback...
XXX initial  v_pts=0.000  a_pos=7776 (0.480)
[ffmpeg] aspect_ratio: 1.772727
VDec: vo config request - 624 x 352 (preferred colorspace: Planar YV12)
Trying filter chain: screenshot ass scale vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7727
VO Config (624x352->624x352,flags=4,'MPlayer',0x32315659)
SwScaler: using unscaled yuv420p -> bgr24 special converter
REQ: flags=0x2445  req=0x0
REQ: flags=0x445  req=0x0
REQ: flags=0x7  req=0x0
VO: [gl2] 624x352 => 624x352 BGR 24-bit  [zoom]
VO: Description: X11 (OpenGL) - multiple textures version
VO: Author: Arpad Gereoffy & Sven Goethel
vo: win32: running at 1280x800 with depth 32

OpenGL extensions string:
GL_ARB_multitexture GL_EXT_texture_env_add GL_EXT_compiled_vertex_array 
GL_S3_s3tc GL_ARB_depth_texture GL_ARB_fragment_program 
GL_ARB_fragment_program_shadow GL_ARB_fragment_shader GL_ARB_multisample 
GL_ARB_occlusion_query GL_ARB_point_parameters GL_ARB_point_sprite 
GL_ARB_shader_objects GL_ARB_shading_language_100 GL_ARB_shadow 
GL_ARB_shadow_ambient GL_ARB_texture_border_clamp GL_ARB_texture_compression 
GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_texture_env_combine 
GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_float 
GL_ARB_texture_mirrored_repeat GL_ARB_texture_rectangle 
GL_ARB_transpose_matrix GL_ARB_vertex_blend GL_ARB_vertex_buffer_object 
GL_ARB_vertex_program GL_ARB_vertex_shader GL_ARB_window_pos 
GL_ARB_draw_buffers GL_ATI_draw_buffers GL_ATI_envmap_bumpmap 
GL_ATI_fragment_shader GL_ATI_separate_stencil GL_ATI_texture_env_combine3 
GL_ATI_texture_float GL_ATI_texture_mirror_once GL_ATI_vertex_streams 
GL_ATIX_texture_env_combine3 GL_ATIX_texture_env_route 
GL_ATIX_vertex_shader_output_point_size GL_EXT_abgr GL_EXT_bgra 
GL_EXT_blend_color GL_EXT_blend_func_separate GL_EXT_blend_minmax 
GL_EXT_blend_subtract GL_EXT_clip_volume_hint GL_EXT_draw_range_elements 
GL_EXT_fog_coord GL_EXT_framebuffer_object GL_EXT_multi_draw_arrays 
GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal 
GL_EXT_secondary_color GL_EXT_separate_specular_color GL_EXT_shadow_funcs 
GL_EXT_stencil_wrap GL_EXT_texgen_reflection GL_EXT_texture3D 
GL_EXT_texture_compression_s3tc GL_EXT_texture_cube_map 
GL_EXT_texture_edge_clamp GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 
GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias 
GL_EXT_texture_mirror_clamp GL_EXT_texture_object GL_EXT_texture_rectangle 
GL_EXT_vertex_array GL_EXT_vertex_shader GL_HP_occlusion_test 
GL_NV_blend_square GL_NV_occlusion_query GL_NV_texgen_reflection 
GL_SGI_color_matrix GL_SGIS_generate_mipmap GL_SGIS_multitexture 
GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod 
GL_SUN_multi_draw_arrays GL_WIN_swap_hint WGL_EXT_extensions_string 
WGL_EXT_swap_control
 
[gl2] OpenGL Driver Information:
	vendor: ATI Technologies Inc.,
	renderer RADEON XPRESS Series x86/MMX/3DNow!/SSE2,
	version 2.0.6120 WinXP Release
 
[gl2] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)
[gl2] Creating 1x1 textures of size 1024x512 ...
[gl2] antialiasing off
[gl2] bilinear linear
[gl2] Using image_bpp=24, image_bytes=3,
	gl_bitmap_format=GL_BGR, gl_bitmap_type=GL_UNSIGNED_BYTE,
	rgb_size=24 (8,8,8), a_sz=8,
	gl_internal_format=GL_RGBA8
[gl2] Resize: 624x352
 
Video attribute 'hue' is not supported by selected vo & vd.
 
*** [ass] Allocating mp_image_t, 624x352x12bpp YUV planar, 329472 bytes
*** [screenshot] Allocating (slices) mp_image_t, 624x352x12bpp YUV planar, 
329472 bytes
 

When smplayer resizes, the only thing that does is resizing the window passed 
to mplayer with -wid. Directx (and xv, x11 in linux) resizes the video 
accordingly when that happens.

> > It happens too with another program: MPI, which also embeds mplayer with
> > -wid.
>
> I can't find that program anywhere.

Sorry. As Jack Holt said I meant MPUI.

-- 
Pepe



More information about the MPlayer-users mailing list