Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 0ce92a4..42c455b 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -69,7 +69,7 @@ typedef struct GSTImpl { GstBus *bus; guint64 start, nextofs, nextpullofs, stop; ALLOCATOR_PROPERTIES props; - HANDLE event, changed_ofs; + HANDLE no_more_pads_event, push_event;
HANDLE push_thread; } GSTImpl; @@ -519,7 +519,7 @@ static DWORD CALLBACK push_data(LPVOID iface)
TRACE("Waiting..\n");
- WaitForSingleObject(This->event, INFINITE); + WaitForSingleObject(This->push_event, INFINITE);
TRACE("Starting..\n"); for (;;) { @@ -1050,7 +1050,7 @@ static void no_more_pads(GstElement *decodebin, gpointer user) { GSTImpl *This = (GSTImpl*)user; TRACE("%p %p\n", This, decodebin); - SetEvent(This->event); + SetEvent(This->no_more_pads_event); }
static GstAutoplugSelectResult autoplug_blacklist(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) @@ -1156,7 +1156,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
/* Add initial pins */ This->initial = This->discont = TRUE; - ResetEvent(This->event); + ResetEvent(This->no_more_pads_event); gst_element_set_state(This->container, GST_STATE_PLAYING); ret = gst_element_get_state(This->container, NULL, NULL, -1);
@@ -1166,7 +1166,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI return E_FAIL; }
- WaitForSingleObject(This->event, INFINITE); + WaitForSingleObject(This->no_more_pads_event, INFINITE);
gst_pad_query_duration(This->ppPins[0]->their_src, GST_FORMAT_TIME, &duration); for (i = 0; i < This->cStreams; ++i) @@ -1259,7 +1259,8 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr) This->cStreams = 0; This->ppPins = NULL; This->push_thread = NULL; - This->event = CreateEventW(NULL, 0, 0, NULL); + This->no_more_pads_event = CreateEventW(NULL, 0, 0, NULL); + This->push_event = CreateEventW(NULL, 0, 0, NULL); This->bus = NULL;
piInput = &This->pInputPin.pin.pinInfo; @@ -1286,7 +1287,8 @@ static void GST_Destroy(GSTImpl *This)
TRACE("Destroying %p\n", This);
- CloseHandle(This->event); + CloseHandle(This->no_more_pads_event); + CloseHandle(This->push_event);
/* Don't need to clean up output pins, disconnecting input pin will do that */ IPin_ConnectedTo((IPin *)&This->pInputPin, &connected); @@ -1994,6 +1996,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
This->pReader = NULL; This->pAlloc = NULL; + ResetEvent(((GSTImpl *)This->pin.pinInfo.pFilter)->push_event); if (SUCCEEDED(hr)) hr = IPin_QueryInterface(pReceivePin, &IID_IAsyncReader, (LPVOID *)&This->pReader); if (SUCCEEDED(hr)) @@ -2016,7 +2019,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, This->pin.pConnectedTo = pReceivePin; IPin_AddRef(pReceivePin); hr = IMemAllocator_Commit(This->pAlloc); - SetEvent(((GSTImpl*)This->pin.pinInfo.pFilter)->event); + SetEvent(((GSTImpl*)This->pin.pinInfo.pFilter)->push_event); } else { GST_RemoveOutputPins((GSTImpl *)This->pin.pinInfo.pFilter); if (This->pReader)
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 42c455b..b6b02a1 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1252,6 +1252,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr) *phr = E_OUTOFMEMORY; return NULL; } + memset(This, 0, sizeof(*This));
obj = (IUnknown*)&This->filter.IBaseFilter_iface; BaseFilter_Init(&This->filter, &GST_Vtbl, &CLSID_Gstreamer_Splitter, (DWORD_PTR)(__FILE__ ": GSTImpl.csFilter"), &BaseFuncTable);
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 22, 2018 at 03:31:18PM -0600, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/winegstreamer/gstdemux.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 42c455b..b6b02a1 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1252,6 +1252,7 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr) *phr = E_OUTOFMEMORY; return NULL; }
memset(This, 0, sizeof(*This));
obj = (IUnknown*)&This->filter.IBaseFilter_iface; BaseFilter_Init(&This->filter, &GST_Vtbl, &CLSID_Gstreamer_Splitter, (DWORD_PTR)(__FILE__ ": GSTImpl.csFilter"), &BaseFuncTable);
-- 2.7.4
Some decoders and files fail to find any valid frames during test-play, so don't wait for data we might never receive.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gstdemux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b6b02a1..9e35e3d 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -321,6 +321,7 @@ static gboolean setcaps_sink(GstPad *pad, GstCaps *caps) return FALSE; FreeMediaType(pin->pmt); *pin->pmt = amt; + SetEvent(pin->caps_event); return TRUE; }
@@ -617,8 +618,6 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *bu
if (This->initial) { gst_buffer_unref(buf); - TRACE("Triggering %p %p\n", pad, pin->caps_event); - SetEvent(pin->caps_event); return GST_FLOW_OK; }
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 22, 2018 at 03:31:19PM -0600, Zebediah Figura wrote:
Some decoders and files fail to find any valid frames during test-play, so don't wait for data we might never receive.
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/winegstreamer/gstdemux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index b6b02a1..9e35e3d 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -321,6 +321,7 @@ static gboolean setcaps_sink(GstPad *pad, GstCaps *caps) return FALSE; FreeMediaType(pin->pmt); *pin->pmt = amt;
- SetEvent(pin->caps_event); return TRUE;
}
@@ -617,8 +618,6 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstObject *parent, GstBuffer *bu
if (This->initial) { gst_buffer_unref(buf);
TRACE("Triggering %p %p\n", pad, pin->caps_event);
}SetEvent(pin->caps_event); return GST_FLOW_OK;
-- 2.7.4
These were left behind in the transition to 1.0.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/winegstreamer/gst_cbs.c | 24 ------------------------ dlls/winegstreamer/gst_cbs.h | 14 -------------- dlls/winegstreamer/gstdemux.c | 12 ------------ 3 files changed, 50 deletions(-)
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c index 96325d0..c8ba812 100644 --- a/dlls/winegstreamer/gst_cbs.c +++ b/dlls/winegstreamer/gst_cbs.c @@ -175,30 +175,6 @@ gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) return cbdata.u.event_sink_data.ret; }
-gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) -{ - struct cb_data cbdata = { ACCEPT_CAPS_SINK }; - - cbdata.u.accept_caps_sink_data.pad = pad; - cbdata.u.accept_caps_sink_data.caps = caps; - - call_cb(&cbdata); - - return cbdata.u.accept_caps_sink_data.ret; -} - -gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) -{ - struct cb_data cbdata = { SETCAPS_SINK }; - - cbdata.u.setcaps_sink_data.pad = pad; - cbdata.u.setcaps_sink_data.caps = caps; - - call_cb(&cbdata); - - return cbdata.u.setcaps_sink_data.ret; -} - GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) { struct cb_data cbdata = { GOT_DATA_SINK }; diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h index e52d1ba..100a8de 100644 --- a/dlls/winegstreamer/gst_cbs.h +++ b/dlls/winegstreamer/gst_cbs.h @@ -38,8 +38,6 @@ enum CB_TYPE { REQUEST_BUFFER_SRC, EVENT_SRC, EVENT_SINK, - ACCEPT_CAPS_SINK, - SETCAPS_SINK, GOT_DATA_SINK, GOT_DATA, REMOVED_DECODED_PAD, @@ -101,16 +99,6 @@ struct cb_data { GstEvent *event; gboolean ret; } event_sink_data; - struct accept_caps_sink_data { - GstPad *pad; - GstCaps *caps; - gboolean ret; - } accept_caps_sink_data; - struct setcaps_sink_data { - GstPad *pad; - GstCaps *caps; - gboolean ret; - } setcaps_sink_data; struct got_data_sink_data { GstPad *pad; GstObject *parent; @@ -179,8 +167,6 @@ void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN; GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN; gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; -gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; -gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 9e35e3d..3ce7873 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2233,18 +2233,6 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event); break; } - case ACCEPT_CAPS_SINK: - { - struct accept_caps_sink_data *data = &cbdata->u.accept_caps_sink_data; - cbdata->u.accept_caps_sink_data.ret = accept_caps_sink(data->pad, data->caps); - break; - } - case SETCAPS_SINK: - { - struct setcaps_sink_data *data = &cbdata->u.setcaps_sink_data; - cbdata->u.setcaps_sink_data.ret = setcaps_sink(data->pad, data->caps); - break; - } case GOT_DATA_SINK: { struct got_data_sink_data *data = &cbdata->u.got_data_sink_data;
On Thu, Feb 22, 2018 at 03:31:20PM -0600, Zebediah Figura wrote:
These were left behind in the transition to 1.0.
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/winegstreamer/gst_cbs.c | 24 ------------------------ dlls/winegstreamer/gst_cbs.h | 14 -------------- dlls/winegstreamer/gstdemux.c | 12 ------------ 3 files changed, 50 deletions(-)
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c index 96325d0..c8ba812 100644 --- a/dlls/winegstreamer/gst_cbs.c +++ b/dlls/winegstreamer/gst_cbs.c @@ -175,30 +175,6 @@ gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) return cbdata.u.event_sink_data.ret; }
-gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) -{
- struct cb_data cbdata = { ACCEPT_CAPS_SINK };
- cbdata.u.accept_caps_sink_data.pad = pad;
- cbdata.u.accept_caps_sink_data.caps = caps;
- call_cb(&cbdata);
- return cbdata.u.accept_caps_sink_data.ret;
-}
-gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) -{
- struct cb_data cbdata = { SETCAPS_SINK };
- cbdata.u.setcaps_sink_data.pad = pad;
- cbdata.u.setcaps_sink_data.caps = caps;
- call_cb(&cbdata);
- return cbdata.u.setcaps_sink_data.ret;
-}
GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) { struct cb_data cbdata = { GOT_DATA_SINK }; diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h index e52d1ba..100a8de 100644 --- a/dlls/winegstreamer/gst_cbs.h +++ b/dlls/winegstreamer/gst_cbs.h @@ -38,8 +38,6 @@ enum CB_TYPE { REQUEST_BUFFER_SRC, EVENT_SRC, EVENT_SINK,
- ACCEPT_CAPS_SINK,
- SETCAPS_SINK, GOT_DATA_SINK, GOT_DATA, REMOVED_DECODED_PAD,
@@ -101,16 +99,6 @@ struct cb_data { GstEvent *event; gboolean ret; } event_sink_data;
struct accept_caps_sink_data {
GstPad *pad;
GstCaps *caps;
gboolean ret;
} accept_caps_sink_data;
struct setcaps_sink_data {
GstPad *pad;
GstCaps *caps;
gboolean ret;
} setcaps_sink_data; struct got_data_sink_data { GstPad *pad; GstObject *parent;
@@ -179,8 +167,6 @@ void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN; GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN; gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; -gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; -gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 9e35e3d..3ce7873 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2233,18 +2233,6 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event); break; }
- case ACCEPT_CAPS_SINK:
{
struct accept_caps_sink_data *data = &cbdata->u.accept_caps_sink_data;
cbdata->u.accept_caps_sink_data.ret = accept_caps_sink(data->pad, data->caps);
break;
}
- case SETCAPS_SINK:
{
struct setcaps_sink_data *data = &cbdata->u.setcaps_sink_data;
cbdata->u.setcaps_sink_data.ret = setcaps_sink(data->pad, data->caps);
break;
case GOT_DATA_SINK: { struct got_data_sink_data *data = &cbdata->u.got_data_sink_data;}
-- 2.7.4
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 22, 2018 at 03:31:20PM -0600, Zebediah Figura wrote:
These were left behind in the transition to 1.0.
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/winegstreamer/gst_cbs.c | 24 ------------------------ dlls/winegstreamer/gst_cbs.h | 14 -------------- dlls/winegstreamer/gstdemux.c | 12 ------------ 3 files changed, 50 deletions(-)
diff --git a/dlls/winegstreamer/gst_cbs.c b/dlls/winegstreamer/gst_cbs.c index 96325d0..c8ba812 100644 --- a/dlls/winegstreamer/gst_cbs.c +++ b/dlls/winegstreamer/gst_cbs.c @@ -175,30 +175,6 @@ gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) return cbdata.u.event_sink_data.ret; }
-gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) -{
- struct cb_data cbdata = { ACCEPT_CAPS_SINK };
- cbdata.u.accept_caps_sink_data.pad = pad;
- cbdata.u.accept_caps_sink_data.caps = caps;
- call_cb(&cbdata);
- return cbdata.u.accept_caps_sink_data.ret;
-}
-gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) -{
- struct cb_data cbdata = { SETCAPS_SINK };
- cbdata.u.setcaps_sink_data.pad = pad;
- cbdata.u.setcaps_sink_data.caps = caps;
- call_cb(&cbdata);
- return cbdata.u.setcaps_sink_data.ret;
-}
GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) { struct cb_data cbdata = { GOT_DATA_SINK }; diff --git a/dlls/winegstreamer/gst_cbs.h b/dlls/winegstreamer/gst_cbs.h index e52d1ba..100a8de 100644 --- a/dlls/winegstreamer/gst_cbs.h +++ b/dlls/winegstreamer/gst_cbs.h @@ -38,8 +38,6 @@ enum CB_TYPE { REQUEST_BUFFER_SRC, EVENT_SRC, EVENT_SINK,
- ACCEPT_CAPS_SINK,
- SETCAPS_SINK, GOT_DATA_SINK, GOT_DATA, REMOVED_DECODED_PAD,
@@ -101,16 +99,6 @@ struct cb_data { GstEvent *event; gboolean ret; } event_sink_data;
struct accept_caps_sink_data {
GstPad *pad;
GstCaps *caps;
gboolean ret;
} accept_caps_sink_data;
struct setcaps_sink_data {
GstPad *pad;
GstCaps *caps;
gboolean ret;
} setcaps_sink_data; struct got_data_sink_data { GstPad *pad; GstObject *parent;
@@ -179,8 +167,6 @@ void no_more_pads_wrapper(GstElement *decodebin, gpointer user) DECLSPEC_HIDDEN; GstFlowReturn request_buffer_src_wrapper(GstPad *pad, GstObject *parent, guint64 ofs, guint len, GstBuffer **buf) DECLSPEC_HIDDEN; gboolean event_src_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; gboolean event_sink_wrapper(GstPad *pad, GstObject *parent, GstEvent *event) DECLSPEC_HIDDEN; -gboolean accept_caps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; -gboolean setcaps_sink_wrapper(GstPad *pad, GstCaps *caps) DECLSPEC_HIDDEN; GstFlowReturn got_data_sink_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; GstFlowReturn got_data_wrapper(GstPad *pad, GstObject *parent, GstBuffer *buf) DECLSPEC_HIDDEN; void removed_decoded_pad_wrapper(GstElement *bin, GstPad *pad, gpointer user) DECLSPEC_HIDDEN; diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 9e35e3d..3ce7873 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -2233,18 +2233,6 @@ void CALLBACK perform_cb(TP_CALLBACK_INSTANCE *instance, void *user) cbdata->u.event_sink_data.ret = event_sink(data->pad, data->parent, data->event); break; }
- case ACCEPT_CAPS_SINK:
{
struct accept_caps_sink_data *data = &cbdata->u.accept_caps_sink_data;
cbdata->u.accept_caps_sink_data.ret = accept_caps_sink(data->pad, data->caps);
break;
}
- case SETCAPS_SINK:
{
struct setcaps_sink_data *data = &cbdata->u.setcaps_sink_data;
cbdata->u.setcaps_sink_data.ret = setcaps_sink(data->pad, data->caps);
break;
case GOT_DATA_SINK: { struct got_data_sink_data *data = &cbdata->u.got_data_sink_data;}
-- 2.7.4
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Thu, Feb 22, 2018 at 03:31:17PM -0600, Zebediah Figura wrote:
Signed-off-by: Zebediah Figura z.figura12@gmail.com
dlls/winegstreamer/gstdemux.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 0ce92a4..42c455b 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -69,7 +69,7 @@ typedef struct GSTImpl { GstBus *bus; guint64 start, nextofs, nextpullofs, stop; ALLOCATOR_PROPERTIES props;
- HANDLE event, changed_ofs;
HANDLE no_more_pads_event, push_event;
HANDLE push_thread;
} GSTImpl; @@ -519,7 +519,7 @@ static DWORD CALLBACK push_data(LPVOID iface)
TRACE("Waiting..\n");
- WaitForSingleObject(This->event, INFINITE);
WaitForSingleObject(This->push_event, INFINITE);
TRACE("Starting..\n"); for (;;) {
@@ -1050,7 +1050,7 @@ static void no_more_pads(GstElement *decodebin, gpointer user) { GSTImpl *This = (GSTImpl*)user; TRACE("%p %p\n", This, decodebin);
- SetEvent(This->event);
- SetEvent(This->no_more_pads_event);
}
static GstAutoplugSelectResult autoplug_blacklist(GstElement *bin, GstPad *pad, GstCaps *caps, GstElementFactory *fact, gpointer user) @@ -1156,7 +1156,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI
/* Add initial pins */ This->initial = This->discont = TRUE;
- ResetEvent(This->event);
- ResetEvent(This->no_more_pads_event); gst_element_set_state(This->container, GST_STATE_PLAYING); ret = gst_element_get_state(This->container, NULL, NULL, -1);
@@ -1166,7 +1166,7 @@ static HRESULT GST_Connect(GSTInPin *pPin, IPin *pConnectPin, ALLOCATOR_PROPERTI return E_FAIL; }
- WaitForSingleObject(This->event, INFINITE);
WaitForSingleObject(This->no_more_pads_event, INFINITE);
gst_pad_query_duration(This->ppPins[0]->their_src, GST_FORMAT_TIME, &duration); for (i = 0; i < This->cStreams; ++i)
@@ -1259,7 +1259,8 @@ IUnknown * CALLBACK Gstreamer_Splitter_create(IUnknown *pUnkOuter, HRESULT *phr) This->cStreams = 0; This->ppPins = NULL; This->push_thread = NULL;
- This->event = CreateEventW(NULL, 0, 0, NULL);
This->no_more_pads_event = CreateEventW(NULL, 0, 0, NULL);
This->push_event = CreateEventW(NULL, 0, 0, NULL); This->bus = NULL;
piInput = &This->pInputPin.pin.pinInfo;
@@ -1286,7 +1287,8 @@ static void GST_Destroy(GSTImpl *This)
TRACE("Destroying %p\n", This);
- CloseHandle(This->event);
CloseHandle(This->no_more_pads_event);
CloseHandle(This->push_event);
/* Don't need to clean up output pins, disconnecting input pin will do that */ IPin_ConnectedTo((IPin *)&This->pInputPin, &connected);
@@ -1994,6 +1996,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin,
This->pReader = NULL; This->pAlloc = NULL;
ResetEvent(((GSTImpl *)This->pin.pinInfo.pFilter)->push_event); if (SUCCEEDED(hr)) hr = IPin_QueryInterface(pReceivePin, &IID_IAsyncReader, (LPVOID *)&This->pReader); if (SUCCEEDED(hr))
@@ -2016,7 +2019,7 @@ static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, This->pin.pConnectedTo = pReceivePin; IPin_AddRef(pReceivePin); hr = IMemAllocator_Commit(This->pAlloc);
SetEvent(((GSTImpl*)This->pin.pinInfo.pFilter)->event);
SetEvent(((GSTImpl*)This->pin.pinInfo.pFilter)->push_event); } else { GST_RemoveOutputPins((GSTImpl *)This->pin.pinInfo.pFilter); if (This->pReader)
-- 2.7.4