Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
aa695e21
Commit
aa695e21
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 get_stream_event() to the Unix library.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
563ccc4d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
28 deletions
+30
-28
gst_private.h
dlls/winegstreamer/gst_private.h
+2
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+1
-28
wg_parser.c
dlls/winegstreamer/wg_parser.c
+27
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
aa695e21
...
...
@@ -221,6 +221,8 @@ struct unix_funcs
void
(
CDECL
*
wg_parser_stream_get_preferred_format
)(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
);
void
(
CDECL
*
wg_parser_stream_enable
)(
struct
wg_parser_stream
*
stream
,
const
struct
wg_format
*
format
);
void
(
CDECL
*
wg_parser_stream_disable
)(
struct
wg_parser_stream
*
stream
);
bool
(
CDECL
*
wg_parser_stream_get_event
)(
struct
wg_parser_stream
*
stream
,
struct
wg_parser_event
*
event
);
};
extern
const
struct
unix_funcs
*
unix_funcs
;
...
...
dlls/winegstreamer/gstdemux.c
View file @
aa695e21
...
...
@@ -686,33 +686,6 @@ static void send_buffer(struct parser_source *pin, GstBuffer *buf)
gst_buffer_unref
(
buf
);
}
static
bool
get_stream_event
(
struct
parser_source
*
pin
,
struct
wg_parser_event
*
event
)
{
struct
parser
*
filter
=
impl_from_strmbase_filter
(
pin
->
pin
.
pin
.
filter
);
struct
wg_parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
pthread_mutex_lock
(
&
parser
->
mutex
);
while
(
!
parser
->
flushing
&&
stream
->
event
.
type
==
WG_PARSER_EVENT_NONE
)
pthread_cond_wait
(
&
stream
->
event_cond
,
&
parser
->
mutex
);
if
(
parser
->
flushing
)
{
pthread_mutex_unlock
(
&
parser
->
mutex
);
TRACE
(
"Filter is flushing.
\n
"
);
return
false
;
}
*
event
=
stream
->
event
;
stream
->
event
.
type
=
WG_PARSER_EVENT_NONE
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
pthread_cond_signal
(
&
stream
->
event_empty_cond
);
return
true
;
}
static
DWORD
CALLBACK
stream_thread
(
void
*
arg
)
{
struct
parser_source
*
pin
=
arg
;
...
...
@@ -726,7 +699,7 @@ static DWORD CALLBACK stream_thread(void *arg)
EnterCriticalSection
(
&
pin
->
flushing_cs
);
if
(
!
get_stream_event
(
pin
,
&
event
))
if
(
!
unix_funcs
->
wg_parser_stream_get_event
(
pin
->
wg_stream
,
&
event
))
{
LeaveCriticalSection
(
&
pin
->
flushing_cs
);
continue
;
...
...
dlls/winegstreamer/wg_parser.c
View file @
aa695e21
...
...
@@ -344,6 +344,31 @@ static void CDECL wg_parser_stream_disable(struct wg_parser_stream *stream)
stream
->
enabled
=
false
;
}
static
bool
CDECL
wg_parser_stream_get_event
(
struct
wg_parser_stream
*
stream
,
struct
wg_parser_event
*
event
)
{
struct
wg_parser
*
parser
=
stream
->
parser
;
pthread_mutex_lock
(
&
parser
->
mutex
);
while
(
!
parser
->
flushing
&&
stream
->
event
.
type
==
WG_PARSER_EVENT_NONE
)
pthread_cond_wait
(
&
stream
->
event_cond
,
&
parser
->
mutex
);
if
(
parser
->
flushing
)
{
pthread_mutex_unlock
(
&
parser
->
mutex
);
TRACE
(
"Filter is flushing.
\n
"
);
return
false
;
}
*
event
=
stream
->
event
;
stream
->
event
.
type
=
WG_PARSER_EVENT_NONE
;
pthread_mutex_unlock
(
&
parser
->
mutex
);
pthread_cond_signal
(
&
stream
->
event_empty_cond
);
return
true
;
}
static
GstAutoplugSelectResult
autoplug_blacklist
(
GstElement
*
bin
,
GstPad
*
pad
,
GstCaps
*
caps
,
GstElementFactory
*
fact
,
gpointer
user
)
{
const
char
*
name
=
gst_element_factory_get_longname
(
fact
);
...
...
@@ -1501,6 +1526,8 @@ static const struct unix_funcs funcs =
wg_parser_stream_get_preferred_format
,
wg_parser_stream_enable
,
wg_parser_stream_disable
,
wg_parser_stream_get_event
,
};
NTSTATUS
CDECL
__wine_init_unix_lib
(
HMODULE
module
,
DWORD
reason
,
const
void
*
ptr_in
,
void
*
ptr_out
)
...
...
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