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
9e1f5f6d
Commit
9e1f5f6d
authored
Jan 09, 2024
by
Brendan McGrath
Committed by
Alexandre Julliard
Apr 23, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Pass uri to wg_parser when available.
This is a partial cherry-pick of eda34f74c6ad from Proton.
parent
bb779688
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
20 additions
and
6 deletions
+20
-6
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-1
main.c
dlls/winegstreamer/main.c
+2
-1
media_source.c
dlls/winegstreamer/media_source.c
+1
-1
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+1
-1
unixlib.h
dlls/winegstreamer/unixlib.h
+1
-0
wg_parser.c
dlls/winegstreamer/wg_parser.c
+12
-0
wm_reader.c
dlls/winegstreamer/wm_reader.c
+2
-2
No files found.
dlls/winegstreamer/gst_private.h
View file @
9e1f5f6d
...
...
@@ -52,7 +52,7 @@ void wg_sample_queue_flush(struct wg_sample_queue *queue, bool all);
wg_parser_t
wg_parser_create
(
bool
output_compressed
);
void
wg_parser_destroy
(
wg_parser_t
parser
);
HRESULT
wg_parser_connect
(
wg_parser_t
parser
,
uint64_t
file_size
);
HRESULT
wg_parser_connect
(
wg_parser_t
parser
,
uint64_t
file_size
,
const
WCHAR
*
uri
);
void
wg_parser_disconnect
(
wg_parser_t
parser
);
bool
wg_parser_get_next_read_offset
(
wg_parser_t
parser
,
uint64_t
*
offset
,
uint32_t
*
size
);
...
...
dlls/winegstreamer/main.c
View file @
9e1f5f6d
...
...
@@ -94,12 +94,13 @@ void wg_parser_destroy(wg_parser_t parser)
WINE_UNIX_CALL
(
unix_wg_parser_destroy
,
&
parser
);
}
HRESULT
wg_parser_connect
(
wg_parser_t
parser
,
uint64_t
file_size
)
HRESULT
wg_parser_connect
(
wg_parser_t
parser
,
uint64_t
file_size
,
const
WCHAR
*
uri
)
{
struct
wg_parser_connect_params
params
=
{
.
parser
=
parser
,
.
file_size
=
file_size
,
.
uri
=
uri
,
};
TRACE
(
"parser %#I64x, file_size %I64u.
\n
"
,
parser
,
file_size
);
...
...
dlls/winegstreamer/media_source.c
View file @
9e1f5f6d
...
...
@@ -1654,7 +1654,7 @@ static HRESULT media_source_create(struct object_context *context, IMFMediaSourc
object
->
state
=
SOURCE_OPENING
;
if
(
FAILED
(
hr
=
wg_parser_connect
(
parser
,
object
->
file_size
)))
if
(
FAILED
(
hr
=
wg_parser_connect
(
parser
,
object
->
file_size
,
context
->
url
)))
goto
fail
;
stream_count
=
wg_parser_get_stream_count
(
parser
);
...
...
dlls/winegstreamer/quartz_parser.c
View file @
9e1f5f6d
...
...
@@ -1529,7 +1529,7 @@ static HRESULT parser_sink_connect(struct strmbase_sink *iface, IPin *peer, cons
filter
->
sink_connected
=
true
;
filter
->
read_thread
=
CreateThread
(
NULL
,
0
,
read_thread
,
filter
,
0
,
NULL
);
if
(
FAILED
(
hr
=
wg_parser_connect
(
filter
->
wg_parser
,
file_size
)))
if
(
FAILED
(
hr
=
wg_parser_connect
(
filter
->
wg_parser
,
file_size
,
NULL
)))
goto
err
;
if
(
!
filter
->
init_gst
(
filter
))
...
...
dlls/winegstreamer/unixlib.h
View file @
9e1f5f6d
...
...
@@ -194,6 +194,7 @@ struct wg_parser_create_params
struct
wg_parser_connect_params
{
wg_parser_t
parser
;
const
WCHAR
*
uri
;
UINT64
file_size
;
};
...
...
dlls/winegstreamer/wg_parser.c
View file @
9e1f5f6d
...
...
@@ -70,6 +70,7 @@ struct wg_parser
guint64
file_size
,
start_offset
,
next_offset
,
stop_offset
;
guint64
next_pull_offset
;
gchar
*
uri
;
pthread_t
push_thread
;
...
...
@@ -1548,11 +1549,21 @@ static NTSTATUS wg_parser_connect(void *args)
GST_PAD_SRC
,
GST_PAD_ALWAYS
,
GST_STATIC_CAPS_ANY
);
const
struct
wg_parser_connect_params
*
params
=
args
;
struct
wg_parser
*
parser
=
get_parser
(
params
->
parser
);
const
WCHAR
*
uri
=
params
->
uri
;
unsigned
int
i
;
int
ret
;
parser
->
file_size
=
params
->
file_size
;
parser
->
sink_connected
=
true
;
if
(
uri
)
{
parser
->
uri
=
malloc
(
wcslen
(
uri
)
*
3
+
1
);
ntdll_wcstoumbs
(
uri
,
wcslen
(
uri
)
+
1
,
parser
->
uri
,
wcslen
(
uri
)
*
3
+
1
,
FALSE
);
}
else
{
parser
->
uri
=
NULL
;
}
if
(
!
parser
->
bus
)
{
...
...
@@ -1818,6 +1829,7 @@ static NTSTATUS wg_parser_destroy(void *args)
pthread_cond_destroy
(
&
parser
->
read_cond
);
pthread_cond_destroy
(
&
parser
->
read_done_cond
);
free
(
parser
->
uri
);
free
(
parser
);
return
S_OK
;
}
...
...
dlls/winegstreamer/wm_reader.c
View file @
9e1f5f6d
...
...
@@ -1464,7 +1464,7 @@ static HRESULT init_stream(struct wm_reader *reader)
goto
out_destroy_parser
;
}
if
(
FAILED
(
hr
=
wg_parser_connect
(
reader
->
wg_parser
,
reader
->
file_size
)))
if
(
FAILED
(
hr
=
wg_parser_connect
(
reader
->
wg_parser
,
reader
->
file_size
,
NULL
)))
{
ERR
(
"Failed to connect parser, hr %#lx.
\n
"
,
hr
);
goto
out_shutdown_thread
;
...
...
@@ -1569,7 +1569,7 @@ static HRESULT reinit_stream(struct wm_reader *reader, bool read_compressed)
goto
out_destroy_parser
;
}
if
(
FAILED
(
hr
=
wg_parser_connect
(
reader
->
wg_parser
,
reader
->
file_size
)))
if
(
FAILED
(
hr
=
wg_parser_connect
(
reader
->
wg_parser
,
reader
->
file_size
,
NULL
)))
{
ERR
(
"Failed to connect parser, hr %#lx.
\n
"
,
hr
);
goto
out_shutdown_thread
;
...
...
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