[PATCH v2 1/4] winegstreamer: Introduce new wg_transform struct.

Zebediah Figura zfigura at codeweavers.com
Tue Feb 15 23:21:21 CST 2022


On 2/14/22 04:19, Rémi Bernon wrote:
> diff --git a/dlls/winegstreamer/gst_private.h b/dlls/winegstreamer/gst_private.h
> index 222bce3b2c7..df82b229143 100644
> --- a/dlls/winegstreamer/gst_private.h
> +++ b/dlls/winegstreamer/gst_private.h
> @@ -96,6 +96,9 @@ uint64_t wg_parser_stream_get_duration(struct wg_parser_stream *stream) DECLSPEC
>   void wg_parser_stream_seek(struct wg_parser_stream *stream, double rate,
>           uint64_t start_pos, uint64_t stop_pos, DWORD start_flags, DWORD stop_flags) DECLSPEC_HIDDEN;
>   
> +struct wg_transform *wg_transform_create(void) DECLSPEC_HIDDEN;
> +void wg_transform_destroy(struct wg_transform *transform) DECLSPEC_HIDDEN;
> +

I believe we can omit DECLSPEC_HIDDEN in PE modules now. It still has an 
effect when compiling without MinGW, but I don't think we care enough 
about that case.

> @@ -1963,6 +1963,16 @@ static void init_gstreamer_once(void)
>               gst_version_string(), GST_VERSION_MAJOR, GST_VERSION_MINOR, GST_VERSION_MICRO);
>   }
>   
> +bool init_gstreamer(void)
> +{
> +    static pthread_once_t init_once = PTHREAD_ONCE_INIT;
> +
> +    if (pthread_once(&init_once, init_gstreamer_once))
> +        return false;
> +
> +    return true;

So "return !pthread_once(...)"? Or even return int from this function.

> +struct wg_transform
> +{
> +};

Unfortunately I don't think this is portable.



More information about the wine-devel mailing list