You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against d60c450c7be196c2072f74e34f7760d39e3bad32.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From 95db72178f4906d02785c707a46c8298f4c008d0 Mon Sep 17 00:00:00 2001
|
||||
From 83a951e062135cb433d23b7af56c2541b504c1a5 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Wed, 10 Mar 2021 13:09:51 -0500
|
||||
Subject: [PATCH 03/39] winegstreamer: Introduce H.264 decoder transform.
|
||||
Subject: [PATCH] winegstreamer: Introduce H.264 decoder transform.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
@@ -345,7 +345,7 @@ index 55a62361966..cdf90d52025 100644
|
||||
+
|
||||
#endif /* __GST_PRIVATE_INCLUDED__ */
|
||||
diff --git a/dlls/winegstreamer/mfplat.c b/dlls/winegstreamer/mfplat.c
|
||||
index dfa448afcfe..de679a62023 100644
|
||||
index dcbd03137ba..4bff7ee9241 100644
|
||||
--- a/dlls/winegstreamer/mfplat.c
|
||||
+++ b/dlls/winegstreamer/mfplat.c
|
||||
@@ -412,6 +412,7 @@ class_objects[] =
|
||||
@@ -371,11 +371,11 @@ index 072ec90eea4..064a6872c79 100644
|
||||
+]
|
||||
+coclass CMSH264DecoderMFT { }
|
||||
diff --git a/include/mfidl.idl b/include/mfidl.idl
|
||||
index 76e0d0dfeb4..616271861aa 100644
|
||||
index 5b16c08bb90..f28a0669804 100644
|
||||
--- a/include/mfidl.idl
|
||||
+++ b/include/mfidl.idl
|
||||
@@ -1574,3 +1574,4 @@ cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE, 0xba491365,
|
||||
cpp_quote("EXTERN_GUID(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS, 0xba491366, 0xbe50, 0x451e, 0x95, 0xab, 0x6d, 0x4a, 0xcc, 0xc7, 0xda, 0xd8);")
|
||||
@@ -1579,3 +1579,4 @@ cpp_quote("EXTERN_GUID(MF_XVP_CALLER_ALLOCATES_OUTPUT, 0x4a2cabc, 0x0cab, 0x40b1
|
||||
cpp_quote("EXTERN_GUID(MF_XVP_SAMPLE_LOCK_TIMEOUT, 0xaa4ddb29, 0x5134, 0x4363, 0xac, 0x72, 0x83, 0xec, 0x4b, 0xc1, 0x04, 0x26);")
|
||||
|
||||
cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")
|
||||
+cpp_quote("EXTERN_GUID(CLSID_CMSH264DecoderMFT, 0x62ce7e72, 0x4c71, 0x4d20, 0xb1, 0x5d, 0x45, 0x28, 0x31, 0xa8, 0x7d, 0x9d);")
|
||||
|
@@ -249,7 +249,7 @@ index c83afe4e195..e9689c01085 100644
|
||||
+ case /* eAVEncH264VProfile_High */ 100: profile = "high"; break;
|
||||
+ case /* eAVEncH264VProfile_444 */ 244: profile = "high-4:4:4"; break;
|
||||
+ default:
|
||||
+ ERR("Unrecognized H.264 profile attribute %u\n", format->u.video.compressed.h264.profile);
|
||||
+ GST_ERROR("Unrecognized H.264 profile attribute %u\n", format->u.video.compressed.h264.profile);
|
||||
+ /* fallthrough */
|
||||
+ case 0: profile = NULL;
|
||||
+ }
|
||||
@@ -273,7 +273,7 @@ index c83afe4e195..e9689c01085 100644
|
||||
+ case /* eAVEncH264VLevel5_1 */ 51: level = "5.1"; break;
|
||||
+ case /* eAVEncH264VLevel5_2 */ 52: level = "5.2"; break;
|
||||
+ default:
|
||||
+ ERR("Unrecognized H.264 level attribute %u\n", format->u.video.compressed.h264.level);
|
||||
+ GST_ERROR("Unrecognized H.264 level attribute %u\n", format->u.video.compressed.h264.level);
|
||||
+ /* fallthrough */
|
||||
+ case 0: level = NULL;
|
||||
+ }
|
||||
|
@@ -1,7 +1,7 @@
|
||||
From 431374b54bf2c58515c9bd56acf45d15f2fdf42d Mon Sep 17 00:00:00 2001
|
||||
From 04332336184dfd88cde06e790c35e5fcff71e583 Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Fri, 19 Mar 2021 16:40:46 -0400
|
||||
Subject: [PATCH 09/39] winegstreamer: Add push-mode path for wg_parser.
|
||||
Subject: [PATCH] winegstreamer: Add push-mode path for wg_parser.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
@@ -86,7 +86,7 @@ index 215cf4577d4..25694aae84d 100644
|
||||
|
||||
extern const struct unix_funcs *unix_funcs;
|
||||
diff --git a/dlls/winegstreamer/media_source.c b/dlls/winegstreamer/media_source.c
|
||||
index 9c554c7c415..f658cc0a5fc 100644
|
||||
index 05544ef7abe..054e87edb7b 100644
|
||||
--- a/dlls/winegstreamer/media_source.c
|
||||
+++ b/dlls/winegstreamer/media_source.c
|
||||
@@ -305,7 +305,7 @@ static void start_pipeline(struct media_source *source, struct source_async_comm
|
||||
@@ -108,7 +108,7 @@ index 9c554c7c415..f658cc0a5fc 100644
|
||||
|
||||
TRACE("Media source is shutting down; exiting.\n");
|
||||
diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c
|
||||
index 4eceeae0757..1c68eba1872 100644
|
||||
index fc1b72cd958..4b0f2c215d1 100644
|
||||
--- a/dlls/winegstreamer/quartz_parser.c
|
||||
+++ b/dlls/winegstreamer/quartz_parser.c
|
||||
@@ -799,7 +799,7 @@ static DWORD CALLBACK read_thread(void *arg)
|
||||
@@ -130,10 +130,10 @@ index 4eceeae0757..1c68eba1872 100644
|
||||
/* We do need to drop any buffers that might have been sent with the old
|
||||
* caps, but this will be handled in parser_init_stream(). */
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index e9689c01085..9ca5abebfaf 100644
|
||||
index 8f472e6650d..d01da49dbef 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -44,7 +44,7 @@ struct wg_parser
|
||||
@@ -47,7 +47,7 @@ struct wg_parser
|
||||
BOOL (*init_gst)(struct wg_parser *parser);
|
||||
|
||||
struct wg_parser_stream **streams;
|
||||
@@ -142,7 +142,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
GstElement *container, *decodebin;
|
||||
GstBus *bus;
|
||||
@@ -58,7 +58,7 @@ struct wg_parser
|
||||
@@ -61,7 +61,7 @@ struct wg_parser
|
||||
pthread_mutex_t mutex;
|
||||
|
||||
pthread_cond_t init_cond;
|
||||
@@ -151,7 +151,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
pthread_cond_t read_cond, read_done_cond;
|
||||
struct
|
||||
@@ -67,10 +67,12 @@ struct wg_parser
|
||||
@@ -70,10 +70,12 @@ struct wg_parser
|
||||
uint64_t offset;
|
||||
uint32_t size;
|
||||
bool done;
|
||||
@@ -166,7 +166,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
};
|
||||
|
||||
struct wg_parser_stream
|
||||
@@ -78,9 +80,10 @@ struct wg_parser_stream
|
||||
@@ -81,9 +83,10 @@ struct wg_parser_stream
|
||||
struct wg_parser *parser;
|
||||
|
||||
GstPad *their_src, *post_sink, *post_src, *my_sink;
|
||||
@@ -178,7 +178,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
pthread_cond_t event_cond, event_empty_cond;
|
||||
struct wg_parser_event event;
|
||||
@@ -571,6 +574,9 @@ static void CDECL wg_parser_begin_flush(struct wg_parser *parser)
|
||||
@@ -574,6 +577,9 @@ static void CDECL wg_parser_begin_flush(struct wg_parser *parser)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@@ -188,7 +188,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
pthread_mutex_lock(&parser->mutex);
|
||||
parser->flushing = true;
|
||||
pthread_mutex_unlock(&parser->mutex);
|
||||
@@ -584,6 +590,9 @@ static void CDECL wg_parser_begin_flush(struct wg_parser *parser)
|
||||
@@ -587,6 +593,9 @@ static void CDECL wg_parser_begin_flush(struct wg_parser *parser)
|
||||
|
||||
static void CDECL wg_parser_end_flush(struct wg_parser *parser)
|
||||
{
|
||||
@@ -198,7 +198,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
pthread_mutex_lock(&parser->mutex);
|
||||
parser->flushing = false;
|
||||
pthread_mutex_unlock(&parser->mutex);
|
||||
@@ -594,7 +603,7 @@ static bool CDECL wg_parser_get_read_request(struct wg_parser *parser,
|
||||
@@ -597,7 +606,7 @@ static bool CDECL wg_parser_get_read_request(struct wg_parser *parser,
|
||||
{
|
||||
pthread_mutex_lock(&parser->mutex);
|
||||
|
||||
@@ -207,7 +207,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
pthread_cond_wait(&parser->read_cond, &parser->mutex);
|
||||
|
||||
if (!parser->sink_connected)
|
||||
@@ -611,14 +620,25 @@ static bool CDECL wg_parser_get_read_request(struct wg_parser *parser,
|
||||
@@ -614,14 +623,25 @@ static bool CDECL wg_parser_get_read_request(struct wg_parser *parser,
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -237,7 +237,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
}
|
||||
|
||||
static void CDECL wg_parser_set_unlimited_buffering(struct wg_parser *parser)
|
||||
@@ -630,11 +650,15 @@ static void CDECL wg_parser_set_unlimited_buffering(struct wg_parser *parser)
|
||||
@@ -633,11 +653,15 @@ static void CDECL wg_parser_set_unlimited_buffering(struct wg_parser *parser)
|
||||
|
||||
static void CDECL wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, struct wg_format *format)
|
||||
{
|
||||
@@ -255,7 +255,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
stream->current_format = *format;
|
||||
stream->enabled = true;
|
||||
|
||||
@@ -663,6 +687,18 @@ static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const
|
||||
@@ -666,6 +690,18 @@ static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const
|
||||
gst_util_set_object_arg(G_OBJECT(stream->flip), "method", "none");
|
||||
break;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
}
|
||||
|
||||
gst_pad_push_event(stream->my_sink, gst_event_new_reconfigure());
|
||||
@@ -691,6 +727,11 @@ static bool CDECL wg_parser_stream_get_event(struct wg_parser_stream *stream, st
|
||||
@@ -694,6 +730,11 @@ static bool CDECL wg_parser_stream_get_event(struct wg_parser_stream *stream, st
|
||||
|
||||
*event = stream->event;
|
||||
|
||||
@@ -286,7 +286,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
if (stream->event.type != WG_PARSER_EVENT_BUFFER)
|
||||
{
|
||||
stream->event.type = WG_PARSER_EVENT_NONE;
|
||||
@@ -751,6 +792,9 @@ static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double
|
||||
@@ -754,6 +795,9 @@ static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double
|
||||
GstSeekType start_type = GST_SEEK_TYPE_SET, stop_type = GST_SEEK_TYPE_SET;
|
||||
GstSeekFlags flags = 0;
|
||||
|
||||
@@ -296,7 +296,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
if (start_flags & AM_SEEKING_SeekToKeyFrame)
|
||||
flags |= GST_SEEK_FLAG_KEY_UNIT;
|
||||
if (start_flags & AM_SEEKING_Segment)
|
||||
@@ -767,6 +811,43 @@ static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double
|
||||
@@ -770,6 +814,43 @@ static bool CDECL wg_parser_stream_seek(struct wg_parser_stream *stream, double
|
||||
GST_FORMAT_TIME, flags, start_type, start_pos * 100, stop_type, stop_pos * 100));
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
static void CDECL wg_parser_stream_notify_qos(struct wg_parser_stream *stream,
|
||||
bool underflow, double proportion, int64_t diff, uint64_t timestamp)
|
||||
{
|
||||
@@ -1071,14 +1152,27 @@ static gboolean sink_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
@@ -1084,14 +1165,27 @@ static GstElement *create_element(const char *name, const char *plugin_set)
|
||||
static struct wg_parser_stream *create_stream(struct wg_parser *parser)
|
||||
{
|
||||
struct wg_parser_stream *stream, **new_array;
|
||||
@@ -373,7 +373,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
gst_segment_init(&stream->segment, GST_FORMAT_UNDEFINED);
|
||||
|
||||
@@ -1118,7 +1212,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1131,7 +1225,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
|
||||
if (!strcmp(name, "video/x-raw"))
|
||||
{
|
||||
@@ -382,9 +382,9 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
/* DirectShow can express interlaced video, but downstream filters can't
|
||||
* necessarily consume it. In particular, the video renderer can't. */
|
||||
@@ -1147,6 +1241,13 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1148,11 +1242,30 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
if (!(flip = create_element("videoflip", "good")))
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ if (!(videobox = gst_element_factory_make("videobox", NULL)))
|
||||
+ {
|
||||
@@ -395,10 +395,8 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
+
|
||||
/* videoflip does not support 15 and 16-bit RGB so add a second videoconvert
|
||||
* to do the final conversion. */
|
||||
if (!(vconv2 = gst_element_factory_make("videoconvert", NULL)))
|
||||
@@ -1156,6 +1257,18 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
if (!(vconv2 = create_element("videoconvert", "base")))
|
||||
goto out;
|
||||
}
|
||||
|
||||
+ if (!parser->seekable)
|
||||
+ {
|
||||
@@ -415,7 +413,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
/* The bin takes ownership of these elements. */
|
||||
gst_bin_add(GST_BIN(parser->container), deinterlace);
|
||||
gst_element_sync_state_with_parent(deinterlace);
|
||||
@@ -1163,16 +1276,20 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1160,16 +1273,20 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
gst_element_sync_state_with_parent(vconv);
|
||||
gst_bin_add(GST_BIN(parser->container), flip);
|
||||
gst_element_sync_state_with_parent(flip);
|
||||
@@ -437,7 +435,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
}
|
||||
else if (!strcmp(name, "audio/x-raw"))
|
||||
{
|
||||
@@ -1260,23 +1377,25 @@ static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1253,23 +1370,25 @@ static void pad_removed_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
@@ -472,7 +470,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
if (!*buffer)
|
||||
*buffer = new_buffer = gst_buffer_new_and_alloc(size);
|
||||
@@ -1285,6 +1404,14 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
@@ -1278,6 +1397,14 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
|
||||
pthread_mutex_lock(&parser->mutex);
|
||||
|
||||
@@ -487,7 +485,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
assert(!parser->read_request.data);
|
||||
parser->read_request.data = map_info.data;
|
||||
parser->read_request.offset = offset;
|
||||
@@ -1296,8 +1423,36 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
@@ -1289,8 +1416,36 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
* the upstream pin to flush if necessary. We should never be blocked on
|
||||
* read_thread() not running. */
|
||||
|
||||
@@ -525,7 +523,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
ret = parser->read_request.ret;
|
||||
|
||||
@@ -1305,12 +1460,29 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
@@ -1298,12 +1453,29 @@ static GstFlowReturn src_getrange_cb(GstPad *pad, GstObject *parent,
|
||||
|
||||
gst_buffer_unmap(*buffer, &map_info);
|
||||
|
||||
@@ -557,7 +555,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
}
|
||||
|
||||
static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
@@ -1329,7 +1501,7 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
@@ -1322,7 +1494,7 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
gst_query_set_duration(query, GST_FORMAT_PERCENT, GST_FORMAT_PERCENT_MAX);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -566,7 +564,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
{
|
||||
gst_query_set_duration(query, GST_FORMAT_BYTES, parser->file_size);
|
||||
return TRUE;
|
||||
@@ -1343,15 +1515,42 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
@@ -1336,15 +1508,42 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
GST_WARNING("Cannot seek using format \"%s\".", gst_format_get_name(format));
|
||||
return FALSE;
|
||||
}
|
||||
@@ -610,7 +608,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
default:
|
||||
GST_WARNING("Unhandled query type %s.", GST_QUERY_TYPE_NAME(query));
|
||||
return FALSE;
|
||||
@@ -1361,42 +1560,115 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
@@ -1354,42 +1553,115 @@ static gboolean src_query_cb(GstPad *pad, GstObject *parent, GstQuery *query)
|
||||
static void *push_data(void *arg)
|
||||
{
|
||||
struct wg_parser *parser = arg;
|
||||
@@ -736,7 +734,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
|
||||
buffer->duration = buffer->pts = -1;
|
||||
if ((ret = gst_pad_push(parser->my_src, buffer)) < 0)
|
||||
@@ -1406,8 +1678,6 @@ static void *push_data(void *arg)
|
||||
@@ -1399,8 +1671,6 @@ static void *push_data(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -745,7 +743,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
gst_pad_push_event(parser->my_src, gst_event_new_eos());
|
||||
|
||||
GST_DEBUG("Stopping push thread.");
|
||||
@@ -1423,6 +1693,12 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
|
||||
@@ -1416,6 +1686,12 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
|
||||
{
|
||||
if (parser->push_thread)
|
||||
{
|
||||
@@ -758,7 +756,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
pthread_join(parser->push_thread, NULL);
|
||||
parser->push_thread = 0;
|
||||
}
|
||||
@@ -1608,13 +1884,11 @@ static LONGLONG query_duration(GstPad *pad)
|
||||
@@ -1601,13 +1877,11 @@ static LONGLONG query_duration(GstPad *pad)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -773,7 +771,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
parser->sink_connected = true;
|
||||
|
||||
if (!parser->bus)
|
||||
@@ -1636,6 +1910,20 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
|
||||
@@ -1629,6 +1903,20 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
|
||||
parser->start_offset = parser->next_offset = parser->stop_offset = 0;
|
||||
parser->next_pull_offset = 0;
|
||||
|
||||
@@ -794,7 +792,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
if (!parser->init_gst(parser))
|
||||
return E_FAIL;
|
||||
|
||||
@@ -1666,6 +1954,43 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
|
||||
@@ -1659,6 +1947,43 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@@ -838,9 +836,9 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
static void free_stream(struct wg_parser_stream *stream)
|
||||
{
|
||||
if (stream->their_src)
|
||||
@@ -1740,6 +2065,9 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
|
||||
@@ -1729,6 +2054,9 @@ static BOOL decodebin_parser_init_gst(struct wg_parser *parser)
|
||||
if (!(element = create_element("decodebin", "base")))
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ if (parser->input_format.major_type)
|
||||
+ g_object_set(G_OBJECT(element), "sink-caps", wg_format_to_caps(&parser->input_format), NULL);
|
||||
@@ -848,7 +846,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
gst_bin_add(GST_BIN(parser->container), element);
|
||||
parser->decodebin = element;
|
||||
|
||||
@@ -2016,6 +2344,7 @@ static const struct unix_funcs funcs =
|
||||
@@ -1993,6 +2321,7 @@ static const struct unix_funcs funcs =
|
||||
wg_parser_destroy,
|
||||
|
||||
wg_parser_connect,
|
||||
@@ -856,7 +854,7 @@ index e9689c01085..9ca5abebfaf 100644
|
||||
wg_parser_disconnect,
|
||||
|
||||
wg_parser_begin_flush,
|
||||
@@ -2040,6 +2369,7 @@ static const struct unix_funcs funcs =
|
||||
@@ -2017,6 +2346,7 @@ static const struct unix_funcs funcs =
|
||||
|
||||
wg_parser_stream_get_duration,
|
||||
wg_parser_stream_seek,
|
||||
|
@@ -253,7 +253,7 @@ index 6c8cf1f85b1..7f06fd886d6 100644
|
||||
+ case 0x2A: profile = "lc"; level = "4"; break;
|
||||
+ case 0x2B: profile = "lc"; level = "5"; break;
|
||||
+ default:
|
||||
+ FIXME("Unrecognized profile-level-indication %u\n", format->u.audio.compressed.aac.indication);
|
||||
+ GST_DEBUG("Unrecognized profile-level-indication %u\n", format->u.audio.compressed.aac.indication);
|
||||
+ /* fallthrough */
|
||||
+ case 0x00: case 0xFE: profile = level = NULL; break; /* unspecified */
|
||||
+ }
|
||||
|
@@ -431,7 +431,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+ {
|
||||
+ if (!(convert = gst_element_factory_make("videoconvert", NULL)))
|
||||
+ {
|
||||
+ ERR("Failed to create videoconvert; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ GST_ERROR("Failed to create videoconvert; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ 8 * (int)sizeof(void*));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
@@ -445,7 +445,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+ {
|
||||
+ if (!(convert = gst_element_factory_make("audioconvert", NULL)))
|
||||
+ {
|
||||
+ ERR("Failed to create audioconvert; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ GST_ERROR("Failed to create audioconvert; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ 8 * (int)sizeof(void*));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
@@ -454,7 +454,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+
|
||||
+ if (!(resampler = gst_element_factory_make("audioresample", NULL)))
|
||||
+ {
|
||||
+ ERR("Failed to create audioresample; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ GST_ERROR("Failed to create audioresample; are %u-bit GStreamer \"base\" plugins installed?\n",
|
||||
+ 8 * (int)sizeof(void*));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
@@ -468,7 +468,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+
|
||||
+ if ((ret = gst_pad_link(parser->my_src, parser->their_sink)) < 0)
|
||||
+ {
|
||||
+ ERR("Failed to link sink pads, error %d.\n", ret);
|
||||
+ GST_ERROR("Failed to link sink pads, error %d.\n", ret);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
@@ -479,7 +479,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+ gst_object_ref(stream->their_src);
|
||||
+ if ((ret = gst_pad_link(stream->their_src, stream->my_sink)) < 0)
|
||||
+ {
|
||||
+ ERR("Failed to link source pads, error %d.\n", ret);
|
||||
+ GST_ERROR("Failed to link source pads, error %d.\n", ret);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
@@ -489,7 +489,7 @@ index 44d0c9b71f3..6f4dd28082b 100644
|
||||
+ ret = gst_element_get_state(parser->container, NULL, NULL, -1);
|
||||
+ if (ret == GST_STATE_CHANGE_FAILURE)
|
||||
+ {
|
||||
+ ERR("Failed to play stream.\n");
|
||||
+ GST_ERROR("Failed to play stream.\n");
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
|
@@ -1,8 +1,8 @@
|
||||
From 97f4a9b38ee49706edb3c52b93dd86509665361c Mon Sep 17 00:00:00 2001
|
||||
From 7be3ecb31b7beb25a0a66d11d9f36a5192a9653c Mon Sep 17 00:00:00 2001
|
||||
From: Derek Lesho <dlesho@codeweavers.com>
|
||||
Date: Thu, 18 Mar 2021 16:20:50 -0400
|
||||
Subject: [PATCH 34/39] winegstreamer: Only require videobox element for parser
|
||||
when needed.
|
||||
Subject: [PATCH] winegstreamer: Only require videobox element for parser when
|
||||
needed.
|
||||
|
||||
Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
---
|
||||
@@ -10,10 +10,10 @@ Signed-off-by: Derek Lesho <dlesho@codeweavers.com>
|
||||
1 file changed, 32 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/dlls/winegstreamer/wg_parser.c b/dlls/winegstreamer/wg_parser.c
|
||||
index 534db931d8b..afd69ea6891 100644
|
||||
index 863870f966d..1d659fcc8d0 100644
|
||||
--- a/dlls/winegstreamer/wg_parser.c
|
||||
+++ b/dlls/winegstreamer/wg_parser.c
|
||||
@@ -753,6 +753,15 @@ static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const
|
||||
@@ -756,6 +756,15 @@ static void CDECL wg_parser_stream_enable(struct wg_parser_stream *stream, const
|
||||
|
||||
if (aperture)
|
||||
{
|
||||
@@ -29,9 +29,9 @@ index 534db931d8b..afd69ea6891 100644
|
||||
if (aperture->left)
|
||||
g_object_set(G_OBJECT(stream->box), "left", -aperture->left, NULL);
|
||||
if (aperture->top)
|
||||
@@ -1309,12 +1318,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1310,12 +1319,7 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
if (!(flip = create_element("videoflip", "good")))
|
||||
goto out;
|
||||
}
|
||||
|
||||
- if (!(videobox = gst_element_factory_make("videobox", NULL)))
|
||||
- {
|
||||
@@ -43,7 +43,7 @@ index 534db931d8b..afd69ea6891 100644
|
||||
|
||||
/* videoflip does not support 15 and 16-bit RGB so add a second videoconvert
|
||||
* to do the final conversion. */
|
||||
@@ -1327,6 +1331,14 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1324,6 +1328,14 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
|
||||
if (!parser->seekable)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ index 534db931d8b..afd69ea6891 100644
|
||||
if (stream->aperture.left)
|
||||
g_object_set(G_OBJECT(videobox), "left", -stream->aperture.left, NULL);
|
||||
if (stream->aperture.bottom)
|
||||
@@ -1344,15 +1356,25 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
@@ -1341,15 +1353,25 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
|
||||
gst_element_sync_state_with_parent(vconv);
|
||||
gst_bin_add(GST_BIN(parser->container), flip);
|
||||
gst_element_sync_state_with_parent(flip);
|
||||
|
Reference in New Issue
Block a user