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
f98722fe
Commit
f98722fe
authored
Feb 13, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Retrieve wg_parser streams through Unix library functions.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
507ba18d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
gst_private.h
dlls/winegstreamer/gst_private.h
+3
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+10
-8
wg_parser.c
dlls/winegstreamer/wg_parser.c
+13
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
f98722fe
...
...
@@ -214,6 +214,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
);
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
);
};
extern
const
struct
unix_funcs
*
unix_funcs
;
...
...
dlls/winegstreamer/gstdemux.c
View file @
f98722fe
...
...
@@ -1039,13 +1039,14 @@ static BOOL decodebin_parser_filter_init_gst(struct parser *filter)
{
static
const
WCHAR
formatW
[]
=
{
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
' '
,
'%'
,
'0'
,
'2'
,
'u'
,
0
};
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
unsigned
int
i
,
stream_count
;
WCHAR
source_name
[
20
];
unsigned
int
i
;
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
stream_count
=
unix_funcs
->
wg_parser_get_stream_count
(
parser
);
for
(
i
=
0
;
i
<
stream_count
;
++
i
)
{
sprintfW
(
source_name
,
formatW
,
i
);
if
(
!
create_pin
(
filter
,
parser
->
streams
[
i
]
,
source_name
))
if
(
!
create_pin
(
filter
,
unix_funcs
->
wg_parser_get_stream
(
parser
,
i
)
,
source_name
))
return
FALSE
;
}
...
...
@@ -1664,7 +1665,7 @@ static BOOL wave_parser_filter_init_gst(struct parser *filter)
static
const
WCHAR
source_name
[]
=
{
'o'
,
'u'
,
't'
,
'p'
,
'u'
,
't'
,
0
};
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
if
(
!
create_pin
(
filter
,
parser
->
streams
[
0
]
,
source_name
))
if
(
!
create_pin
(
filter
,
unix_funcs
->
wg_parser_get_stream
(
parser
,
0
)
,
source_name
))
return
FALSE
;
return
TRUE
;
...
...
@@ -1744,13 +1745,14 @@ static BOOL avi_splitter_filter_init_gst(struct parser *filter)
{
static
const
WCHAR
formatW
[]
=
{
'S'
,
't'
,
'r'
,
'e'
,
'a'
,
'm'
,
' '
,
'%'
,
'0'
,
'2'
,
'u'
,
0
};
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
uint32_t
i
,
stream_count
;
WCHAR
source_name
[
20
];
unsigned
int
i
;
for
(
i
=
0
;
i
<
parser
->
stream_count
;
++
i
)
stream_count
=
unix_funcs
->
wg_parser_get_stream_count
(
parser
);
for
(
i
=
0
;
i
<
stream_count
;
++
i
)
{
sprintfW
(
source_name
,
formatW
,
i
);
if
(
!
create_pin
(
filter
,
parser
->
streams
[
i
]
,
source_name
))
if
(
!
create_pin
(
filter
,
unix_funcs
->
wg_parser_get_stream
(
parser
,
i
)
,
source_name
))
return
FALSE
;
}
...
...
@@ -1837,7 +1839,7 @@ static BOOL mpeg_splitter_filter_init_gst(struct parser *filter)
static
const
WCHAR
source_name
[]
=
{
'A'
,
'u'
,
'd'
,
'i'
,
'o'
,
0
};
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
if
(
!
create_pin
(
filter
,
parser
->
streams
[
0
]
,
source_name
))
if
(
!
create_pin
(
filter
,
unix_funcs
->
wg_parser_get_stream
(
parser
,
0
)
,
source_name
))
return
FALSE
;
return
TRUE
;
...
...
dlls/winegstreamer/wg_parser.c
View file @
f98722fe
...
...
@@ -317,6 +317,16 @@ static bool wg_format_compare(const struct wg_format *a, const struct wg_format
return
false
;
}
static
uint32_t
CDECL
wg_parser_get_stream_count
(
struct
wg_parser
*
parser
)
{
return
parser
->
stream_count
;
}
static
struct
wg_parser_stream
*
CDECL
wg_parser_get_stream
(
struct
wg_parser
*
parser
,
uint32_t
index
)
{
return
parser
->
streams
[
index
];
}
static
GstAutoplugSelectResult
autoplug_blacklist
(
GstElement
*
bin
,
GstPad
*
pad
,
GstCaps
*
caps
,
GstElementFactory
*
fact
,
gpointer
user
)
{
const
char
*
name
=
gst_element_factory_get_longname
(
fact
);
...
...
@@ -1467,6 +1477,9 @@ static const struct unix_funcs funcs =
wg_parser_connect
,
wg_parser_disconnect
,
wg_parser_get_stream_count
,
wg_parser_get_stream
,
};
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