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
13188bb1
Commit
13188bb1
authored
Mar 13, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
May 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement wg_parser_stream_get_codec_format.
parent
32cabd1b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
3 deletions
+35
-3
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
main.c
dlls/winegstreamer/main.c
+13
-0
unixlib.h
dlls/winegstreamer/unixlib.h
+7
-0
wg_parser.c
dlls/winegstreamer/wg_parser.c
+14
-3
No files found.
dlls/winegstreamer/gst_private.h
View file @
13188bb1
...
...
@@ -82,6 +82,7 @@ uint32_t wg_parser_get_stream_count(struct wg_parser *parser);
struct
wg_parser_stream
*
wg_parser_get_stream
(
struct
wg_parser
*
parser
,
uint32_t
index
);
void
wg_parser_stream_get_preferred_format
(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
);
void
wg_parser_stream_get_codec_format
(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
);
void
wg_parser_stream_enable
(
struct
wg_parser_stream
*
stream
,
const
struct
wg_format
*
format
);
void
wg_parser_stream_disable
(
struct
wg_parser_stream
*
stream
);
...
...
dlls/winegstreamer/main.c
View file @
13188bb1
...
...
@@ -185,6 +185,19 @@ void wg_parser_stream_get_preferred_format(struct wg_parser_stream *stream, stru
WINE_UNIX_CALL
(
unix_wg_parser_stream_get_preferred_format
,
&
params
);
}
void
wg_parser_stream_get_codec_format
(
struct
wg_parser_stream
*
stream
,
struct
wg_format
*
format
)
{
struct
wg_parser_stream_get_codec_format_params
params
=
{
.
stream
=
stream
,
.
format
=
format
,
};
TRACE
(
"stream %p, format %p.
\n
"
,
stream
,
format
);
WINE_UNIX_CALL
(
unix_wg_parser_stream_get_codec_format
,
&
params
);
}
void
wg_parser_stream_enable
(
struct
wg_parser_stream
*
stream
,
const
struct
wg_format
*
format
)
{
struct
wg_parser_stream_enable_params
params
=
...
...
dlls/winegstreamer/unixlib.h
View file @
13188bb1
...
...
@@ -240,6 +240,12 @@ struct wg_parser_stream_get_preferred_format_params
struct
wg_format
*
format
;
};
struct
wg_parser_stream_get_codec_format_params
{
struct
wg_parser_stream
*
stream
;
struct
wg_format
*
format
;
};
struct
wg_parser_stream_enable_params
{
struct
wg_parser_stream
*
stream
;
...
...
@@ -350,6 +356,7 @@ enum unix_funcs
unix_wg_parser_get_stream
,
unix_wg_parser_stream_get_preferred_format
,
unix_wg_parser_stream_get_codec_format
,
unix_wg_parser_stream_enable
,
unix_wg_parser_stream_disable
,
...
...
dlls/winegstreamer/wg_parser.c
View file @
13188bb1
...
...
@@ -107,7 +107,7 @@ struct wg_parser_stream
GstPad
*
their_src
,
*
my_sink
;
GstElement
*
flip
,
*
decodebin
;
GstSegment
segment
;
struct
wg_format
preferred_format
,
current_format
,
stream
_format
;
struct
wg_format
preferred_format
,
current_format
,
codec
_format
;
pthread_cond_t
event_cond
,
event_empty_cond
;
GstBuffer
*
buffer
;
...
...
@@ -216,6 +216,16 @@ static NTSTATUS wg_parser_stream_get_preferred_format(void *args)
return
S_OK
;
}
static
NTSTATUS
wg_parser_stream_get_codec_format
(
void
*
args
)
{
struct
wg_parser_stream_get_codec_format_params
*
params
=
args
;
*
params
->
format
=
format_is_compressed
(
&
params
->
stream
->
codec_format
)
?
params
->
stream
->
codec_format
:
params
->
stream
->
preferred_format
;
return
S_OK
;
}
static
NTSTATUS
wg_parser_stream_enable
(
void
*
args
)
{
const
struct
wg_parser_stream_enable_params
*
params
=
args
;
...
...
@@ -950,11 +960,11 @@ static void pad_added_cb(GstElement *element, GstPad *pad, gpointer user)
return
;
caps
=
gst_pad_query_caps
(
pad
,
NULL
);
wg_format_from_caps
(
&
stream
->
stream
_format
,
caps
);
wg_format_from_caps
(
&
stream
->
codec
_format
,
caps
);
gst_caps_unref
(
caps
);
/* For compressed stream, create an extra decodebin to decode it. */
if
(
format_is_compressed
(
&
stream
->
stream
_format
))
if
(
format_is_compressed
(
&
stream
->
codec
_format
))
{
if
(
!
stream_decodebin_create
(
stream
))
{
...
...
@@ -1945,6 +1955,7 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
X
(
wg_parser_get_stream
),
X
(
wg_parser_stream_get_preferred_format
),
X
(
wg_parser_stream_get_codec_format
),
X
(
wg_parser_stream_enable
),
X
(
wg_parser_stream_disable
),
...
...
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