[MPlayer-dev-eng] Direct3D OSD discussion
Jim Hauxwell
james at dattrax.co.uk
Wed Nov 26 20:26:10 CET 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Diego Biurrun wrote:
> On Wed, Nov 26, 2008 at 07:56:18AM +0000, Jim Hauxwell wrote:
>>> This patch is broken and does not apply. I suspect Windows linebreaks.
>> Sorry, my mistake. Visual Studio had decided to add CR/LF to all the
>> lines and svn diff doesn't take this into account.
>>
>> New, smaller patch file
>>
>> --- libvo/vo_direct3d.c (revision 28034)
>> +++ libvo/vo_direct3d.c (working copy)
>> @@ -71,8 +71,14 @@
>> IDirect3DSurface9 *d3d_surface; /**< Offscreen Direct3D Surface. MPlayer
>> renders inside it. Uses colorspace
>> priv->movie_src_fmt */
>> + IDirect3DTexture9 *d3d_texture_osd; /**< Direct3D Texture. Uses RGBA */
>> + IDirect3DTexture9 *d3d_texture_system; /**< Direct3D Texture. System memory
>> + cant lock a normal texture. Uses RGBA */
>
> Do not add tabs to a file without tabs
Done
>
>> @@ -95,6 +101,27 @@
>> #define DISPLAY_FORMAT_TABLE_ENTRIES \
>> (sizeof(fmt_table) / sizeof(fmt_table[0]))
>>
>> +#define D3DFVF_MY_VERTEX ( D3DFVF_XYZ | D3DFVF_TEX1 )
>> +
>> +#define OSD_TEXTURE_SIZE 1024 // as this is a texture, it can be a different size to the movie
>> +
>> +typedef struct vertex_s
>> +{
>> + float x, y, z; // Position of vertex in 3D space
>> + float tu, tv; // Texture coordinates
>> +} vertex_t;
>> +
>> +vertex_t osd_quad_vb[] =
>
> trailing whitespace
Done
>
>> +extern void vo_draw_text(int dxs, int dys, void (*draw_alpha)(int x0,int y0, int w,int h, unsigned char* src, unsigned char *srca, int stride));
>> +extern int vo_osd_changed(int new_value);
>
> You need to #include the appropriate header, not add extern declarations
> all over the file.
>
>> @@ -180,6 +207,25 @@
>> + /* kill the VB and the texture */
>> + if (priv->d3d_texture_osd != NULL)
>> + {
>
> Respect the coding style of the file, keep braces on the same line as
> the if.
Done
>
>> @@ -666,3 +756,140 @@
>> +
>> +
>> +void vo_draw_alpha_l8a8(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride)
>
> Please break long lines.
Done
>
>> +{
>> + int y;
>> + for(y=0;y<h;y++){
>
> Again, respect the surrounding coding style.
Done
>
> Diego
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkktotEACgkQhrNWoHjgI1AkFwCdHeD3lx24kT+MMy1QC4gwfFip
rzIAoLSCbxRsdpNoETqEaxDW8bu/E8D5
=N+Xe
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff9.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081126/0eae90f8/attachment.asc>
More information about the MPlayer-dev-eng
mailing list