winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
866 discussions
Start a n
N
ew thread
Eric Pouech : kernel32: Use fd availability for testing whether a console handle refers to a bare console .
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: f67b0377abd491bfe4cc2713ee644119a3e00218 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f67b0377abd491bfe4cc2713e…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Sun Nov 7 19:14:46 2010 +0100 kernel32: Use fd availability for testing whether a console handle refers to a bare console. --- dlls/kernel32/console.c | 43 ++++++++++++++++++++----------------------- 1 files changed, 20 insertions(+), 23 deletions(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index 129c4a8..2ea1cd8 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -171,11 +171,9 @@ static BOOL S_termios_raw /* = FALSE */; /* returns the fd for a bare console (-1 otherwise) */ static int get_console_bare_fd(HANDLE hin) { - BOOL is_bare; int fd; - if (get_console_mode(hin, NULL, &is_bare) && is_bare && - wine_server_handle_to_fd(hin, 0, &fd, NULL) == STATUS_SUCCESS) + if (wine_server_handle_to_fd(hin, 0, &fd, NULL) == STATUS_SUCCESS) return fd; return -1; } @@ -191,12 +189,8 @@ static BOOL save_console_mode(HANDLE hin) return ret; } -static BOOL put_console_into_raw_mode(HANDLE hin) +static BOOL put_console_into_raw_mode(int fd) { - int fd; - - if ((fd = get_console_bare_fd(hin)) == -1) return FALSE; - RtlEnterCriticalSection(&CONSOLE_CritSect); if (!S_termios_raw) { @@ -217,7 +211,6 @@ static BOOL put_console_into_raw_mode(HANDLE hin) } RtlLeaveCriticalSection(&CONSOLE_CritSect); - close(fd); return S_termios_raw; } @@ -1166,14 +1159,13 @@ static enum read_console_input_return bare_console_fetch_input(HANDLE handle, DW static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_RECORD ir, DWORD timeout) { - BOOL bare; + int fd; enum read_console_input_return ret; - if (!get_console_mode(handle, NULL, &bare)) return rci_error; - - if (bare) + if ((fd = get_console_bare_fd(handle)) != -1) { - put_console_into_raw_mode(handle); + put_console_into_raw_mode(fd); + close(fd); if (WaitForSingleObject(GetConsoleInputWaitHandle(), 0) != WAIT_OBJECT_0) { ret = bare_console_fetch_input(handle, timeout); @@ -1182,6 +1174,8 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R } else { + if (!get_console_mode(handle, NULL, NULL)) return rci_error; + if (WaitForSingleObject(GetConsoleInputWaitHandle(), timeout) != WAIT_OBJECT_0) return rci_timeout; } @@ -1602,14 +1596,19 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer, DWORD charsread; LPWSTR xbuf = lpBuffer; DWORD mode; - BOOL is_bare; + BOOL is_bare = FALSE; + int fd; TRACE("(%p,%p,%d,%p,%p)\n", hConsoleInput, lpBuffer, nNumberOfCharsToRead, lpNumberOfCharsRead, lpReserved); - if (!get_console_mode(hConsoleInput, &mode, &is_bare)) + if (!GetConsoleMode(hConsoleInput, &mode)) return FALSE; - + if ((fd == get_console_bare_fd(hConsoleInput)) == -1) + { + close(fd); + is_bare = TRUE; + } if (mode & ENABLE_LINE_INPUT) { if (!S_EditString || S_EditString[S_EditStrPos] == 0) @@ -2300,8 +2299,7 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber DWORD nw = 0; const WCHAR* psz = lpBuffer; CONSOLE_SCREEN_BUFFER_INFO csbi; - int k, first = 0; - BOOL bare; + int k, first = 0, fd; TRACE("%p %s %d %p %p\n", hConsoleOutput, debugstr_wn(lpBuffer, nNumberOfCharsToWrite), @@ -2309,14 +2307,13 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber if (lpNumberOfCharsWritten) *lpNumberOfCharsWritten = 0; - if (!get_console_mode(hConsoleOutput, &mode, &bare)) return FALSE; - - if (bare) + if ((fd = get_console_bare_fd(hConsoleOutput)) != -1) { char* ptr; unsigned len; BOOL ret; + close(fd); /* FIXME: mode ENABLED_OUTPUT is not processed (or actually we rely on underlying Unix/TTY fd * to do the job */ @@ -2338,7 +2335,7 @@ BOOL WINAPI WriteConsoleW(HANDLE hConsoleOutput, LPCVOID lpBuffer, DWORD nNumber return ret; } - if (!GetConsoleScreenBufferInfo(hConsoleOutput, &csbi)) + if (!GetConsoleMode(hConsoleOutput, &mode) || !GetConsoleScreenBufferInfo(hConsoleOutput, &csbi)) return FALSE; if (!nNumberOfCharsToWrite) return TRUE;
1
0
0
0
Maarten Lankhorst : quartz: Use media time instead of stream time in null renderer.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 2830ccacb0e47c2abde470f4acb49b1e92f43e39 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2830ccacb0e47c2abde470f4a…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:53 2010 +0100 quartz: Use media time instead of stream time in null renderer. --- dlls/quartz/nullrenderer.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/nullrenderer.c b/dlls/quartz/nullrenderer.c index 0d35d97..7656927 100644 --- a/dlls/quartz/nullrenderer.c +++ b/dlls/quartz/nullrenderer.c @@ -71,7 +71,7 @@ static HRESULT WINAPI NullRenderer_Receive(BaseInputPin *pin, IMediaSample * pSa TRACE("%p %p\n", pin, pSample); - if (SUCCEEDED(IMediaSample_GetTime(pSample, &start, &stop))) + if (SUCCEEDED(IMediaSample_GetMediaTime(pSample, &start, &stop))) MediaSeekingPassThru_RegisterMediaTime(This->seekthru_unk, start); EnterCriticalSection(&This->filter.csFilter); if (This->pInputPin->flushing || This->pInputPin->end_of_stream)
1
0
0
0
Maarten Lankhorst : quartz: Use media time instead of stream time in directsound renderer.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 875faa3101ac15a5e27a77783af54b8cc3fef59a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=875faa3101ac15a5e27a77783…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:52 2010 +0100 quartz: Use media time instead of stream time in directsound renderer. --- dlls/quartz/dsoundrender.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/quartz/dsoundrender.c b/dlls/quartz/dsoundrender.c index 7526e81..1001cf5 100644 --- a/dlls/quartz/dsoundrender.c +++ b/dlls/quartz/dsoundrender.c @@ -279,11 +279,11 @@ static HRESULT WINAPI DSoundRender_Receive(BaseInputPin *pin, IMediaSample * pSa return hr; } + if (IMediaSample_GetMediaTime(pSample, &tStart, &tStop) == S_OK) + MediaSeekingPassThru_RegisterMediaTime(This->seekthru_unk, tStart); hr = IMediaSample_GetTime(pSample, &tStart, &tStop); if (FAILED(hr)) ERR("Cannot get sample time (%x)\n", hr); - else - MediaSeekingPassThru_RegisterMediaTime(This->seekthru_unk, tStart); if (This->rtLastStop != tStart && (IMediaSample_IsDiscontinuity(pSample) == S_FALSE)) WARN("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n",
1
0
0
0
Maarten Lankhorst : winegstreamer: Fix concept of time in demuxer.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 5d457e0c48b7f3f29c321bfabc91afbfd0083a47 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d457e0c48b7f3f29c321bfab…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:51 2010 +0100 winegstreamer: Fix concept of time in demuxer. --- dlls/winegstreamer/gstdemux.c | 36 ++++++++++++++++++++++++++++-------- 1 files changed, 28 insertions(+), 8 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 84d9dad..d94c69a 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -80,6 +80,7 @@ struct GSTOutPin { int isaud, isvid; AM_MEDIA_TYPE * pmt; HANDLE caps_event; + GstSegment *segment; }; static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; @@ -376,6 +377,7 @@ static gboolean event_sink(GstPad *pad, GstEvent *event) { FIXME("Ignoring new segment because of format %i\n", format); return 1; } + gst_segment_set_newsegment_full(pin->segment, update, rate, applied_rate, format, start, stop, pos); pos /= 100; if (stop > 0) stop /= 100; @@ -394,6 +396,7 @@ static gboolean event_sink(GstPad *pad, GstEvent *event) { case GST_EVENT_FLUSH_STOP: if (pin->pin.pin.pConnectedTo) IPin_EndFlush(pin->pin.pin.pConnectedTo); + gst_segment_init(pin->segment, GST_FORMAT_TIME); return 1; default: FIXME("%p stub %s\n", event, gst_event_type_get_name(event->type)); @@ -487,7 +490,6 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstBuffer *buf) { GSTOutPin *pin = gst_pad_get_element_private(pad); GSTImpl *This = (GSTImpl *)pin->pin.pin.pinInfo.pFilter; IMediaSample *sample; - REFERENCE_TIME tStart, tStop; HRESULT hr; BOOL freeSamp = FALSE; @@ -520,14 +522,28 @@ static GstFlowReturn got_data_sink(GstPad *pad, GstBuffer *buf) { memcpy(ptr, GST_BUFFER_DATA(buf), GST_BUFFER_SIZE(buf)); } - if (GST_BUFFER_TIMESTAMP_IS_VALID(buf) && - GST_BUFFER_DURATION_IS_VALID(buf)) { - tStart = buf->timestamp / 100; - tStop = tStart + buf->duration / 100; - IMediaSample_SetTime(sample, &tStart, &tStop); - } - else + if (GST_BUFFER_TIMESTAMP_IS_VALID(buf)) { + REFERENCE_TIME rtStart = gst_segment_to_running_time(pin->segment, GST_FORMAT_TIME, buf->timestamp); + if (rtStart >= 0) + rtStart /= 100; + + if (GST_BUFFER_DURATION_IS_VALID(buf)) { + REFERENCE_TIME tStart = buf->timestamp / 100; + REFERENCE_TIME tStop = (buf->timestamp + buf->duration) / 100; + REFERENCE_TIME rtStop; + rtStop = gst_segment_to_running_time(pin->segment, GST_FORMAT_TIME, buf->timestamp + buf->duration); + if (rtStop >= 0) + rtStop /= 100; + IMediaSample_SetTime(sample, &rtStart, rtStop >= 0 ? &rtStop : NULL); + IMediaSample_SetMediaTime(sample, &tStart, &tStop); + } else { + IMediaSample_SetTime(sample, rtStart >= 0 ? &rtStart : NULL, NULL); + IMediaSample_SetMediaTime(sample, NULL, NULL); + } + } else { IMediaSample_SetTime(sample, NULL, NULL); + IMediaSample_SetMediaTime(sample, NULL, NULL); + } IMediaSample_SetDiscontinuity(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT)); IMediaSample_SetPreroll(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_PREROLL)); @@ -721,6 +737,7 @@ static void init_new_decoded_pad(GstElement *bin, GstPad *pad, gboolean last, GS FIXME("Linking: %i\n", ret); if (ret >= 0) { pin->their_src = pad; + gst_segment_init(pin->segment, GST_FORMAT_TIME); gst_object_ref(pin->their_src); } } @@ -752,6 +769,7 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gboolean last, GSTImp ownname = gst_structure_get_name(arg); if (!strcmp(typename, ownname) && gst_pad_link(pad, pin->my_sink) >= 0) { pin->their_src = pad; + gst_segment_init(pin->segment, GST_FORMAT_TIME); gst_object_ref(pin->their_src); TRACE("Relinked\n"); LeaveCriticalSection(&This->filter.csFilter); @@ -1311,6 +1329,7 @@ static ULONG WINAPI GSTOutPin_Release(IPin *iface) { CloseHandle(This->caps_event); DeleteMediaType(This->pmt); FreeMediaType(&This->pin.pin.mtCurrent); + gst_segment_free(This->segment); CoTaskMemFree(This); return 0; } @@ -1414,6 +1433,7 @@ static HRESULT GST_AddPin(GSTImpl *This, const PIN_INFO *piOutput, const AM_MEDI CopyMediaType(pin->pmt, amt); pin->pin.pin.pinInfo.pFilter = (LPVOID)This; pin->caps_event = CreateEventW(NULL, 0, 0, NULL); + pin->segment = gst_segment_new(); This->cStreams++; BaseFilterImpl_IncrementPinVersion((BaseFilter*)This); } else
1
0
0
0
Maarten Lankhorst : winegstreamer: Forward media time on transform filter.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 1577c5a8c38f5c94c8ca8bd7f1befbafaf3464bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1577c5a8c38f5c94c8ca8bd7f…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:50 2010 +0100 winegstreamer: Forward media time on transform filter. --- dlls/winegstreamer/gsttffilter.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/dlls/winegstreamer/gsttffilter.c b/dlls/winegstreamer/gsttffilter.c index 9339299..f825a51 100644 --- a/dlls/winegstreamer/gsttffilter.c +++ b/dlls/winegstreamer/gsttffilter.c @@ -166,6 +166,14 @@ static GstFlowReturn got_data(GstPad *pad, GstBuffer *buf) { } else IMediaSample_SetTime(sample, NULL, NULL); + if (GST_BUFFER_OFFSET_IS_VALID(buf) && + GST_BUFFER_OFFSET_END_IS_VALID(buf)) { + tStart = buf->offset / 100; + tStop = buf->offset_end / 100; + IMediaSample_SetMediaTime(sample, &tStart, &tStop); + } + else + IMediaSample_SetMediaTime(sample, NULL, NULL); IMediaSample_SetDiscontinuity(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_DISCONT)); IMediaSample_SetPreroll(sample, GST_BUFFER_FLAG_IS_SET(buf, GST_BUFFER_FLAG_PREROLL)); @@ -232,6 +240,10 @@ static HRESULT WINAPI Gstreamer_transform_ProcessData(TransformFilter *iface, IM if (hr == S_OK) buf->duration = (tStop - tStart)*100; } + if (IMediaSample_GetMediaTime(sample, &tStart, &tStop) == S_OK) { + buf->offset = tStart * 100; + buf->offset_end = tStop * 100; + } if (IMediaSample_IsDiscontinuity(sample) == S_OK) GST_BUFFER_FLAG_SET(buf, GST_BUFFER_FLAG_DISCONT); if (IMediaSample_IsPreroll(sample) == S_OK)
1
0
0
0
Maarten Lankhorst : quartz: Fix time on MPEG splitter.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 8c42595c34cbefef84f95a6671349410f3929d22 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c42595c34cbefef84f95a667…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:49 2010 +0100 quartz: Fix time on MPEG splitter. --- dlls/quartz/mpegsplit.c | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/mpegsplit.c b/dlls/quartz/mpegsplit.c index 8321131..c556b78 100644 --- a/dlls/quartz/mpegsplit.c +++ b/dlls/quartz/mpegsplit.c @@ -171,7 +171,7 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample) Parser_OutputPin * pOutputPin = (Parser_OutputPin*)This->Parser.ppPins[1]; LONGLONG length = 0; LONGLONG pos = BYTES_FROM_MEDIATIME(This->Parser.pInputPin->rtNext); - LONGLONG time = This->position; + LONGLONG time = This->position, rtstop, rtstart; HRESULT hr; BYTE *fbuf = NULL; DWORD len = IMediaSample_GetActualDataLength(pCurrentSample); @@ -229,7 +229,28 @@ static HRESULT FillBuffer(MPEGSplitterImpl *This, IMediaSample *pCurrentSample) TRACE("Media time : %u.%03u\n", (DWORD)(This->position/10000000), (DWORD)((This->position/10000)%1000)); - IMediaSample_SetTime(pCurrentSample, &time, &This->position); + if (IMediaSample_IsDiscontinuity(pCurrentSample) == S_OK) { + IPin *victim; + EnterCriticalSection(&This->Parser.filter.csFilter); + pOutputPin->pin.pin.tStart = time; + pOutputPin->pin.pin.dRate = This->Parser.sourceSeeking.dRate; + hr = IPin_ConnectedTo((IPin *)pOutputPin, &victim); + if (hr == S_OK) + { + hr = IPin_NewSegment(victim, time, This->Parser.sourceSeeking.llStop, + This->Parser.sourceSeeking.dRate); + if (hr != S_OK) + FIXME("NewSegment returns %08x\n", hr); + IPin_Release(victim); + } + LeaveCriticalSection(&This->Parser.filter.csFilter); + if (hr != S_OK) + return hr; + } + rtstart = (double)(time - pOutputPin->pin.pin.tStart) / pOutputPin->pin.pin.dRate; + rtstop = (double)(This->position - pOutputPin->pin.pin.tStart) / pOutputPin->pin.pin.dRate; + IMediaSample_SetTime(pCurrentSample, &rtstart, &rtstop); + IMediaSample_SetMediaTime(pCurrentSample, &time, &This->position); hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)&pOutputPin->pin, pCurrentSample); @@ -672,7 +693,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface) if (SUCCEEDED(hr)) { PullPin *pin = This->Parser.pInputPin; - IPin *victim = NULL; TRACE("Moving sound to %08u bytes!\n", (DWORD)bytepos); @@ -682,12 +702,6 @@ static HRESULT WINAPI MPEGSplitter_seek(IMediaSeeking *iface) /* Make sure this is done while stopped, BeginFlush takes care of this */ EnterCriticalSection(&This->Parser.filter.csFilter); memcpy(This->header, header, 4); - IPin_ConnectedTo(This->Parser.ppPins[1], &victim); - if (victim) - { - IPin_NewSegment(victim, newpos, This->duration, pin->dRate); - IPin_Release(victim); - } pin->rtStart = pin->rtCurrent = MEDIATIME_FROM_BYTES(bytepos); pin->rtStop = MEDIATIME_FROM_BYTES((REFERENCE_TIME)This->EndOfFile); @@ -744,7 +758,7 @@ static HRESULT MPEGSplitter_first_request(LPVOID iface) pin->rtNext = rtSampleStop; IMediaSample_SetPreroll(sample, FALSE); - IMediaSample_SetDiscontinuity(sample, This->seek); + IMediaSample_SetDiscontinuity(sample, TRUE); IMediaSample_SetSyncPoint(sample, 1); This->seek = 0;
1
0
0
0
Maarten Lankhorst : quartz: Fix time on avi parser.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: dba95c2288ed813b4984c20ee269f8a5e94f1f7e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dba95c2288ed813b4984c20ee…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:48 2010 +0100 quartz: Fix time on avi parser. --- dlls/quartz/avisplit.c | 37 +++++++++++++++++++++++++++---------- 1 files changed, 27 insertions(+), 10 deletions(-) diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c index fadca7d..e539d64 100644 --- a/dlls/quartz/avisplit.c +++ b/dlls/quartz/avisplit.c @@ -291,7 +291,7 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample, { Parser_OutputPin *pin = (Parser_OutputPin *)This->Parser.ppPins[1+streamnumber]; HRESULT hr; - LONGLONG start, stop; + LONGLONG start, stop, rtstart, rtstop; StreamData *stream = &This->streams[streamnumber]; start = pin->dwSamplesProcessed; @@ -314,7 +314,29 @@ static HRESULT AVISplitter_Receive(AVISplitterImpl *This, IMediaSample *sample, stop *= 10000000; stop /= stream->streamheader.dwRate; - IMediaSample_SetTime(sample, &start, &stop); + if (IMediaSample_IsDiscontinuity(sample) == S_OK) { + IPin *victim; + EnterCriticalSection(&This->Parser.filter.csFilter); + pin->pin.pin.tStart = start; + pin->pin.pin.dRate = This->Parser.sourceSeeking.dRate; + hr = IPin_ConnectedTo((IPin *)pin, &victim); + if (hr == S_OK) + { + hr = IPin_NewSegment(victim, start, This->Parser.sourceSeeking.llStop, + This->Parser.sourceSeeking.dRate); + if (hr != S_OK) + FIXME("NewSegment returns %08x\n", hr); + IPin_Release(victim); + } + LeaveCriticalSection(&This->Parser.filter.csFilter); + if (hr != S_OK) + return hr; + } + rtstart = (double)(start - pin->pin.pin.tStart) / pin->pin.pin.dRate; + rtstop = (double)(stop - pin->pin.pin.tStart) / pin->pin.pin.dRate; + hr = IMediaSample_SetMediaTime(sample, &start, &stop); + IMediaSample_SetTime(sample, &rtstart, &rtstop); + IMediaSample_SetMediaTime(sample, &start, &stop); hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)&pin->pin, sample); @@ -426,6 +448,9 @@ static HRESULT AVISplitter_first_request(LPVOID iface) stream->pos_next = stream->pos; stream->index_next = stream->index; + /* This was sent after stopped->paused or stopped->playing, so set seek */ + stream->seek = 1; + /* There should be a packet queued from AVISplitter_next_request last time * It needs to be done now because this is the only way to ensure that every * stream will have at least 1 packet processed @@ -1285,7 +1310,6 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface) { Parser_OutputPin *pin = (Parser_OutputPin *)This->Parser.ppPins[1+x]; StreamData *stream = This->streams + x; - IPin *victim = NULL; LONGLONG wanted_frames; DWORD last_keyframe = 0, last_keyframeidx = 0, preroll = 0; @@ -1294,13 +1318,6 @@ static HRESULT WINAPI AVISplitter_seek(IMediaSeeking *iface) wanted_frames /= 10000000; wanted_frames /= stream->streamheader.dwScale; - IPin_ConnectedTo((IPin *)pin, &victim); - if (victim) - { - IPin_NewSegment(victim, newpos, endpos, pPin->dRate); - IPin_Release(victim); - } - pin->dwSamplesProcessed = 0; stream->index = 0; stream->pos = 0;
1
0
0
0
Maarten Lankhorst : quartz: Forward media time in ACM Wrapper.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: af33888b39d2b4ad830ed9e42c04bce5d6cb2d3c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=af33888b39d2b4ad830ed9e42…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:47 2010 +0100 quartz: Forward media time in ACM Wrapper. --- dlls/quartz/acmwrapper.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 66ae6c6..dfd0529 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -67,6 +67,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam MMRESULT res; HRESULT hr; LONGLONG tStart = -1, tStop = -1, tMed; + LONGLONG mtStart = -1, mtStop = -1, mtMed; EnterCriticalSection(&This->tf.filter.csFilter); hr = IMediaSample_GetPointer(pSample, &pbSrcStream); @@ -80,6 +81,8 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam preroll = (IMediaSample_IsPreroll(pSample) == S_OK); IMediaSample_GetTime(pSample, &tStart, &tStop); + if (IMediaSample_GetMediaTime(pSample, &mtStart, &mtStop) != S_OK) + mtStart = mtStop = -1; cbSrcStream = IMediaSample_GetActualDataLength(pSample); /* Prevent discontinuities when codecs 'absorb' data but not give anything back in return */ @@ -94,6 +97,7 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam WARN("Discontinuity\n"); tMed = tStart; + mtMed = mtStart; TRACE("Sample data ptr = %p, size = %d\n", pbSrcStream, cbSrcStream); @@ -192,6 +196,21 @@ static HRESULT WINAPI ACMWrapper_Receive(TransformFilter *tf, IMediaSample *pSam ERR("No valid timestamp found\n"); IMediaSample_SetTime(pOutSample, NULL, NULL); } + + if (mtStart < 0) { + IMediaSample_SetMediaTime(pOutSample, NULL, NULL); + } else if (ash.cbSrcLengthUsed == cbSrcStream) { + IMediaSample_SetMediaTime(pOutSample, &mtStart, &mtStop); + mtStart = mtMed = mtStop; + } else if (mtStop >= mtStart) { + mtMed = mtStop - mtStart; + mtMed = mtStart + mtMed * ash.cbSrcLengthUsed / cbSrcStream; + IMediaSample_SetMediaTime(pOutSample, &mtStart, &mtMed); + mtStart = mtMed; + } else { + IMediaSample_SetMediaTime(pOutSample, NULL, NULL); + } + TRACE("Sample stop time: %u.%03u\n", (DWORD)(tStart/10000000), (DWORD)((tStart/10000)%1000)); LeaveCriticalSection(&This->tf.filter.csFilter);
1
0
0
0
Maarten Lankhorst : quartz: Forward media time in AVI Decoder.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 2906a6f8abb6894366a552b60ade2c341b3d5cd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2906a6f8abb6894366a552b60…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:46 2010 +0100 quartz: Forward media time in AVI Decoder. --- dlls/quartz/avidec.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index b2419ea..39fa861 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -138,6 +138,11 @@ static HRESULT WINAPI AVIDec_Receive(TransformFilter *tf, IMediaSample *pSample) else IMediaSample_SetTime(pOutSample, NULL, NULL); + if (IMediaSample_GetMediaTime(pSample, &tStart, &tStop) == S_OK) + IMediaSample_SetMediaTime(pOutSample, &tStart, &tStop); + else + IMediaSample_SetMediaTime(pOutSample, NULL, NULL); + LeaveCriticalSection(&This->tf.filter.csFilter); hr = BaseOutputPinImpl_Deliver((BaseOutputPin*)This->tf.ppPins[1], pOutSample); if (hr != S_OK && hr != VFW_E_NOT_CONNECTED)
1
0
0
0
Maarten Lankhorst : quartz: Fix return value of GetMediaTime.
by Alexandre Julliard
08 Nov '10
08 Nov '10
Module: wine Branch: master Commit: 8af5c1b729ea56bf1053ce35c9b792a62fea95cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8af5c1b729ea56bf1053ce35c…
Author: Maarten Lankhorst <m.b.lankhorst(a)gmail.com> Date: Sun Nov 7 15:02:45 2010 +0100 quartz: Fix return value of GetMediaTime. --- dlls/quartz/memallocator.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/quartz/memallocator.c b/dlls/quartz/memallocator.c index c0be482..3e79a12 100644 --- a/dlls/quartz/memallocator.c +++ b/dlls/quartz/memallocator.c @@ -703,7 +703,7 @@ static HRESULT WINAPI StdMediaSample2_GetMediaTime(IMediaSample2 * iface, LONGLO *pStart = This->tMediaStart; *pEnd = This->tMediaEnd; - return E_NOTIMPL; + return S_OK; } static HRESULT WINAPI StdMediaSample2_SetMediaTime(IMediaSample2 * iface, LONGLONG * pStart, LONGLONG * pEnd)
1
0
0
0
← Newer
1
...
57
58
59
60
61
62
63
...
87
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
Results per page:
10
25
50
100
200