Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7a5224be
Commit
7a5224be
authored
Feb 15, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Move wg_parser flushing to the Unix library.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
aa695e21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
24 deletions
+32
-24
gst_private.h
dlls/winegstreamer/gst_private.h
+3
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+4
-24
wg_parser.c
dlls/winegstreamer/wg_parser.c
+25
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
7a5224be
...
...
@@ -215,6 +215,9 @@ struct unix_funcs
HRESULT
(
CDECL
*
wg_parser_connect
)(
struct
wg_parser
*
parser
,
uint64_t
file_size
);
void
(
CDECL
*
wg_parser_disconnect
)(
struct
wg_parser
*
parser
);
void
(
CDECL
*
wg_parser_begin_flush
)(
struct
wg_parser
*
parser
);
void
(
CDECL
*
wg_parser_end_flush
)(
struct
wg_parser
*
parser
);
uint32_t
(
CDECL
*
wg_parser_get_stream_count
)(
struct
wg_parser
*
parser
);
struct
wg_parser_stream
*
(
CDECL
*
wg_parser_get_stream
)(
struct
wg_parser
*
parser
,
uint32_t
index
);
...
...
dlls/winegstreamer/gstdemux.c
View file @
7a5224be
...
...
@@ -856,9 +856,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface)
return
S_OK
;
filter
->
streaming
=
true
;
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
false
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
unix_funcs
->
wg_parser_end_flush
(
filter
->
wg_parser
);
/* DirectShow retains the old seek positions, but resets to them every time
* it transitions from stopped -> paused. */
...
...
@@ -899,17 +897,7 @@ static HRESULT parser_cleanup_stream(struct strmbase_filter *iface)
return
S_OK
;
filter
->
streaming
=
false
;
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
true
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
{
struct
wg_parser_stream
*
stream
=
parser
->
streams
[
i
];
if
(
stream
->
enabled
)
pthread_cond_signal
(
&
stream
->
event_cond
);
}
unix_funcs
->
wg_parser_begin_flush
(
filter
->
wg_parser
);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
...
...
@@ -1228,7 +1216,6 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
struct
parser_source
*
pin
=
impl_from_IMediaSeeking
(
iface
);
struct
wg_parser_stream
*
stream
=
pin
->
wg_stream
;
struct
parser
*
filter
=
impl_from_strmbase_filter
(
pin
->
pin
.
pin
.
filter
);
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
GstSeekFlags
flags
=
0
;
HRESULT
hr
=
S_OK
;
int
i
;
...
...
@@ -1247,17 +1234,12 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
if
(
!
(
current_flags
&
AM_SEEKING_NoFlush
))
{
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
true
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
unix_funcs
->
wg_parser_begin_flush
(
filter
->
wg_parser
);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
if
(
filter
->
sources
[
i
]
->
pin
.
pin
.
peer
)
{
pthread_cond_signal
(
&
stream
->
event_cond
);
IPin_BeginFlush
(
filter
->
sources
[
i
]
->
pin
.
pin
.
peer
);
}
}
if
(
filter
->
reader
)
...
...
@@ -1296,9 +1278,7 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
if
(
!
(
current_flags
&
AM_SEEKING_NoFlush
))
{
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
false
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
unix_funcs
->
wg_parser_end_flush
(
filter
->
wg_parser
);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
...
...
dlls/winegstreamer/wg_parser.c
View file @
7a5224be
...
...
@@ -327,6 +327,28 @@ static struct wg_parser_stream * CDECL wg_parser_get_stream(struct wg_parser *pa
return
parser
->
streams
[
index
];
}
static
void
CDECL
wg_parser_begin_flush
(
struct
wg_parser
*
parser
)
{
unsigned
int
i
;
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
true
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
{
if
(
parser
->
streams
[
i
]
->
enabled
)
pthread_cond_signal
(
&
parser
->
streams
[
i
]
->
event_cond
);
}
}
static
void
CDECL
wg_parser_end_flush
(
struct
wg_parser
*
parser
)
{
pthread_mutex_lock
(
&
parser
->
mutex
);
parser
->
flushing
=
false
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
}
static
void
CDECL
wg_parser_stream_get_preferred_format
(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
)
{
*
format
=
stream
->
preferred_format
;
...
...
@@ -1520,6 +1542,9 @@ static const struct unix_funcs funcs =
wg_parser_connect
,
wg_parser_disconnect
,
wg_parser_begin_flush
,
wg_parser_end_flush
,
wg_parser_get_stream_count
,
wg_parser_get_stream
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment