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
442c9d43
Commit
442c9d43
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: Retrieve the preferred format through a Unix library function.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a9c8196e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
14 deletions
+30
-14
gst_private.h
dlls/winegstreamer/gst_private.h
+2
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+21
-14
wg_parser.c
dlls/winegstreamer/wg_parser.c
+7
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
442c9d43
...
...
@@ -217,6 +217,8 @@ struct unix_funcs
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
);
void
(
CDECL
*
wg_parser_stream_get_preferred_format
)(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
);
};
extern
const
struct
unix_funcs
*
unix_funcs
;
...
...
dlls/winegstreamer/gstdemux.c
View file @
442c9d43
...
...
@@ -1064,8 +1064,7 @@ static HRESULT decodebin_parser_source_query_accept(struct parser_source *pin, c
static
HRESULT
decodebin_parser_source_get_media_type
(
struct
parser_source
*
pin
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_format
format
=
stream
->
preferred_format
;
struct
wg_format
format
;
static
const
enum
wg_video_format
video_formats
[]
=
{
...
...
@@ -1086,6 +1085,8 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
WG_VIDEO_FORMAT_RGB15
,
};
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
memset
(
mt
,
0
,
sizeof
(
AM_MEDIA_TYPE
));
if
(
amt_from_wg_format
(
mt
,
&
format
))
...
...
@@ -1673,11 +1674,12 @@ static BOOL wave_parser_filter_init_gst(struct parser *filter)
static
HRESULT
wave_parser_source_query_accept
(
struct
parser_source
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
AM_MEDIA_TYPE
pad_mt
;
HRESULT
hr
;
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1687,11 +1689,12 @@ static HRESULT wave_parser_source_query_accept(struct parser_source *pin, const
static
HRESULT
wave_parser_source_get_media_type
(
struct
parser_source
*
pin
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
if
(
!
amt_from_wg_format
(
mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1761,11 +1764,12 @@ static BOOL avi_splitter_filter_init_gst(struct parser *filter)
static
HRESULT
avi_splitter_source_query_accept
(
struct
parser_source
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
AM_MEDIA_TYPE
pad_mt
;
HRESULT
hr
;
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1775,11 +1779,12 @@ static HRESULT avi_splitter_source_query_accept(struct parser_source *pin, const
static
HRESULT
avi_splitter_source_get_media_type
(
struct
parser_source
*
pin
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
if
(
!
amt_from_wg_format
(
mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
@@ -1847,11 +1852,12 @@ static BOOL mpeg_splitter_filter_init_gst(struct parser *filter)
static
HRESULT
mpeg_splitter_source_query_accept
(
struct
parser_source
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
AM_MEDIA_TYPE
pad_mt
;
HRESULT
hr
;
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
&
pad_mt
,
&
format
))
return
E_OUTOFMEMORY
;
hr
=
compare_media_types
(
mt
,
&
pad_mt
)
?
S_OK
:
S_FALSE
;
FreeMediaType
(
&
pad_mt
);
...
...
@@ -1861,11 +1867,12 @@ static HRESULT mpeg_splitter_source_query_accept(struct parser_source *pin, cons
static
HRESULT
mpeg_splitter_source_get_media_type
(
struct
parser_source
*
pin
,
unsigned
int
index
,
AM_MEDIA_TYPE
*
mt
)
{
struct
wg_
parser_stream
*
stream
=
pin
->
wg_stream
;
struct
wg_
format
format
;
if
(
index
>
0
)
return
VFW_S_NO_MORE_ITEMS
;
if
(
!
amt_from_wg_format
(
mt
,
&
stream
->
preferred_format
))
unix_funcs
->
wg_parser_stream_get_preferred_format
(
pin
->
wg_stream
,
&
format
);
if
(
!
amt_from_wg_format
(
mt
,
&
format
))
return
E_OUTOFMEMORY
;
return
S_OK
;
}
...
...
dlls/winegstreamer/wg_parser.c
View file @
442c9d43
...
...
@@ -327,6 +327,11 @@ static struct wg_parser_stream * CDECL wg_parser_get_stream(struct wg_parser *pa
return
parser
->
streams
[
index
];
}
static
void
CDECL
wg_parser_stream_get_preferred_format
(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
)
{
*
format
=
stream
->
preferred_format
;
}
static
GstAutoplugSelectResult
autoplug_blacklist
(
GstElement
*
bin
,
GstPad
*
pad
,
GstCaps
*
caps
,
GstElementFactory
*
fact
,
gpointer
user
)
{
const
char
*
name
=
gst_element_factory_get_longname
(
fact
);
...
...
@@ -1480,6 +1485,8 @@ static const struct unix_funcs funcs =
wg_parser_get_stream_count
,
wg_parser_get_stream
,
wg_parser_stream_get_preferred_format
,
};
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