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
38330678
Commit
38330678
authored
Feb 18, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Manually track read offsets in the media source.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b8719736
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
media_source.c
dlls/winegstreamer/media_source.c
+16
-5
No files found.
dlls/winegstreamer/media_source.c
View file @
38330678
...
...
@@ -111,6 +111,8 @@ struct media_source
SOURCE_SHUTDOWN
,
}
state
;
HANDLE
no_more_pads_event
;
uint64_t
file_size
,
next_pull_offset
;
};
static
inline
struct
media_stream
*
impl_from_IMFMediaStream
(
IMFMediaStream
*
iface
)
...
...
@@ -449,11 +451,12 @@ GstFlowReturn bytestream_wrapper_pull(GstPad *pad, GstObject *parent, guint64 of
TRACE
(
"requesting %u bytes at %s from source %p into buffer %p
\n
"
,
len
,
wine_dbgstr_longlong
(
ofs
),
source
,
*
buf
);
if
(
ofs
!=
GST_BUFFER_OFFSET_NONE
)
{
if
(
FAILED
(
IMFByteStream_SetCurrentPosition
(
byte_stream
,
ofs
)))
return
GST_FLOW_ERROR
;
}
if
(
ofs
==
GST_BUFFER_OFFSET_NONE
)
ofs
=
source
->
next_pull_offset
;
source
->
next_pull_offset
=
ofs
+
len
;
if
(
FAILED
(
IMFByteStream_SetCurrentPosition
(
byte_stream
,
ofs
)))
return
GST_FLOW_ERROR
;
if
(
FAILED
(
IMFByteStream_IsEndOfStream
(
byte_stream
,
&
is_eof
)))
return
GST_FLOW_ERROR
;
...
...
@@ -1244,6 +1247,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
struct
media_source
*
object
;
gint64
total_pres_time
=
0
;
DWORD
bytestream_caps
;
uint64_t
file_size
;
unsigned
int
i
;
HRESULT
hr
;
int
ret
;
...
...
@@ -1257,6 +1261,12 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
return
MF_E_BYTESTREAM_NOT_SEEKABLE
;
}
if
(
FAILED
(
hr
=
IMFByteStream_GetLength
(
bytestream
,
&
file_size
)))
{
FIXME
(
"Failed to get byte stream length, hr %#x.
\n
"
,
hr
);
return
hr
;
}
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
...
...
@@ -1266,6 +1276,7 @@ static HRESULT media_source_constructor(IMFByteStream *bytestream, struct media_
object
->
byte_stream
=
bytestream
;
IMFByteStream_AddRef
(
bytestream
);
object
->
no_more_pads_event
=
CreateEventA
(
NULL
,
FALSE
,
FALSE
,
NULL
);
object
->
file_size
=
file_size
;
if
(
FAILED
(
hr
=
MFCreateEventQueue
(
&
object
->
event_queue
)))
goto
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