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
e9800b1c
Commit
e9800b1c
authored
Feb 17, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Move GST_BUFFER_OFFSET_NONE handling to the Unix library.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
09d573ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+0
-6
wg_parser.c
dlls/winegstreamer/wg_parser.c
+5
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
e9800b1c
...
...
@@ -145,6 +145,7 @@ struct wg_parser
GstPad
*
my_src
,
*
their_sink
;
guint64
file_size
,
start_offset
,
next_offset
,
stop_offset
;
guint64
next_pull_offset
;
pthread_t
push_thread
;
...
...
dlls/winegstreamer/gstdemux.c
View file @
e9800b1c
...
...
@@ -66,8 +66,6 @@ struct parser
* separate lock. */
bool
streaming
,
sink_connected
;
uint64_t
next_pull_offset
;
HANDLE
read_thread
;
BOOL
(
*
init_gst
)(
struct
parser
*
filter
);
...
...
@@ -796,8 +794,6 @@ static GstFlowReturn read_buffer(struct parser *This, guint64 ofs, guint len, Gs
TRACE
(
"filter %p, offset %s, length %u, buffer %p.
\n
"
,
This
,
wine_dbgstr_longlong
(
ofs
),
len
,
buffer
);
if
(
ofs
==
GST_BUFFER_OFFSET_NONE
)
ofs
=
This
->
next_pull_offset
;
if
(
ofs
>=
This
->
file_size
)
{
WARN
(
"Reading past eof: %s, %u
\n
"
,
wine_dbgstr_longlong
(
ofs
),
len
);
...
...
@@ -805,7 +801,6 @@ static GstFlowReturn read_buffer(struct parser *This, guint64 ofs, guint len, Gs
}
if
(
len
+
ofs
>
This
->
file_size
)
len
=
This
->
file_size
-
ofs
;
This
->
next_pull_offset
=
ofs
+
len
;
gst_buffer_map
(
buffer
,
&
info
,
GST_MAP_WRITE
);
hr
=
IAsyncReader_SyncRead
(
This
->
reader
,
ofs
,
len
,
info
.
data
);
...
...
@@ -998,7 +993,6 @@ 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
);
filter
->
next_pull_offset
=
0
;
if
(
FAILED
(
hr
=
unix_funcs
->
wg_parser_connect
(
filter
->
wg_parser
,
filter
->
file_size
)))
goto
err
;
...
...
dlls/winegstreamer/wg_parser.c
View file @
e9800b1c
...
...
@@ -989,6 +989,10 @@ static GstFlowReturn request_buffer_src(GstPad *pad, GstObject *parent, guint64
GST_LOG
(
"pad %p, offset %"
G_GINT64_MODIFIER
"u, length %u, buffer %p."
,
pad
,
offset
,
size
,
*
buffer
);
if
(
offset
==
GST_BUFFER_OFFSET_NONE
)
offset
=
parser
->
next_pull_offset
;
parser
->
next_pull_offset
=
offset
+
size
;
if
(
!*
buffer
)
*
buffer
=
new_buffer
=
gst_buffer_new_and_alloc
(
size
);
...
...
@@ -1325,6 +1329,7 @@ static HRESULT CDECL wg_parser_connect(struct wg_parser *parser, uint64_t file_s
gst_pad_set_element_private
(
parser
->
my_src
,
parser
);
parser
->
start_offset
=
parser
->
next_offset
=
parser
->
stop_offset
=
0
;
parser
->
next_pull_offset
=
0
;
if
(
!
parser
->
init_gst
(
parser
))
return
E_FAIL
;
...
...
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