[MPlayer-dev-eng] [PATCH] Direct3D libvo driver

Georgi Petrov gogothebee at gmail.com
Mon Nov 17 20:49:04 CET 2008


I made another set of improvements. YUY2 for example works again.
Let's see Diego's requirements:

>> +void CalculateFullscreenRect (void)
>
> A void function returning a value?
>

Fixed.


>> +void D3DDestroyContext (void)
>
> ditto

Fixed.

>
>> +/** @brief (Re)Initialize Direct3D. Kill and recreate context.
>> + *  @return TRUE on success, FALSE on failure
>> + *  The first function called to init D3D context.
>> + */
>
> This TRUE/FALSE thing feels very strange and not C-like.

Fixed. TRUE/FALSE replaced with 1/0 everywhere.

>
>> +/** @brief Uninitialize Direct3D and close the window.
>> + *  @return N/A
>> + */
>> +void D3DUninit(void)
>
> I don't think you need to fill out @return for void functions, same
> below.

Fixed everywhere.

>
>> +/** @brief Render a frame on the screen.
>> + *  @param mpi  Mpi structure with the decoded frame inside
>
> lowercase mpi

Fixed.

>
>> +/** @brief Query if movie's colorspace is supported by the HW.
>
> the movie colorspace

Fixed.

>
>> +/** @brief libvo Callback: Handle control requests.
>> + *  @return VO_TRUE on success, VO_NOTIMPL when not
>> + *  implemented
>
> nit: Join these two lines.

Fixed.

>
>> + *  @param title    Windows title
>
> "window title"?  I don't think you are talking about multiple windows..
>

Fixed.

>> + *  @param format   Movie colorspace format (using Mplayer's
>> + *                  defines, e.g. IMGFMT_YUY2)
>
> You are still not allowed to misspell MPlayer.
>

Fixed ;)

>> +static void uninit(void)
>> +{
>> +    /* Release everything related to D3D, */
>> +    D3DUninit();
>> +
>> +    /* w32_common framework call. Uninitialize all window-handling specific
>> +     * stuff.
>> +     */
>> +    vo_w32_uninit();
>
> Those two comments look pretty redundant.
>

Fixed.

>> +static void check_events(void)
>> +{
>> +    int Flags;
>
> I think capitalized variable names are ugly, same in many other places.
>

Fixed. Sort of... Can't I keep at least my variable name convention?

>> --- libvo/w32_common.c        (revision 27943)
>> +++ libvo/w32_common.c        (working copy)
>> @@ -149,6 +149,24 @@
>>
>> +/** @brief Dispatch incoming window events and handle them.
>> + *
>> + * This function should be placed inside libvo's function "check_events".
>> + *
>> + *  Global libvo variables changed:
>> + *  vo_dwidth:  New window client area width
>> + *  vo_dheight: New window client area height
>
> Lowercase after the period.
>

Fixed.

>> + *  VO_EVENT_RESIZE = The window was resized. Please reinit yout driver's
>
> your

Fixed.


>> + *  This function should be called in libvo's "config" callback.
>> + *  It configures a window and shows in on the screen.
>
> it on
>

Fixed. Capitalized Brief -> brief fixed as well.

>> @@ -347,6 +388,22 @@
>>
>> +/** @brief Initialize w32_common framework.
>> + *
>> + * The first function that should be called from the w32_common framework.
>> + * It handles window creation on the screen with proper title and attributes.
>> + * It also initializes framework's internal variables. The function should be
>
> the framework's
>

Fixed.

>> @@ -422,7 +511,15 @@
>>
>> + * Should be called last in video driver's uninit function. First release
>> + * anything build ontop of the created window e.g. rendering context inside
>
> built on top

Fixed.

Tomorrow I'll implement panscan according to Reimar's sample code.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: direct3d.txt
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20081117/9e004b42/attachment.txt>


More information about the MPlayer-dev-eng mailing list