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
ccc6c980
Commit
ccc6c980
authored
Feb 16, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Move seeking to the Unix library.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b90cb3cf
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
25 deletions
+34
-25
gst_private.h
dlls/winegstreamer/gst_private.h
+4
-0
gstdemux.c
dlls/winegstreamer/gstdemux.c
+6
-25
wg_parser.c
dlls/winegstreamer/wg_parser.c
+24
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
ccc6c980
...
...
@@ -228,6 +228,10 @@ struct unix_funcs
bool
(
CDECL
*
wg_parser_stream_get_event
)(
struct
wg_parser_stream
*
stream
,
struct
wg_parser_event
*
event
);
void
(
CDECL
*
wg_parser_stream_notify_qos
)(
struct
wg_parser_stream
*
stream
,
bool
underflow
,
double
proportion
,
int64_t
diff
,
uint64_t
timestamp
);
/* start_pos and stop_pos are in 100-nanosecond units. */
bool
(
CDECL
*
wg_parser_stream_seek
)(
struct
wg_parser_stream
*
stream
,
double
rate
,
uint64_t
start_pos
,
uint64_t
stop_pos
,
DWORD
start_flags
,
DWORD
stop_flags
);
};
extern
const
struct
unix_funcs
*
unix_funcs
;
...
...
dlls/winegstreamer/gstdemux.c
View file @
ccc6c980
...
...
@@ -848,7 +848,7 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface)
{
struct
parser
*
filter
=
impl_from_strmbase_filter
(
iface
);
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
GstSeekType
stop_type
=
GST_SEEK_TYPE_NONE
;
DWORD
stop_flags
=
AM_SEEKING_NoPositioning
;
const
SourceSeeking
*
seeking
;
unsigned
int
i
;
...
...
@@ -861,15 +861,11 @@ static HRESULT parser_init_stream(struct strmbase_filter *iface)
/* DirectShow retains the old seek positions, but resets to them every time
* it transitions from stopped -> paused. */
parser
->
next_offset
=
parser
->
start_offset
;
seeking
=
&
filter
->
sources
[
0
]
->
seek
;
if
(
seeking
->
llStop
&&
seeking
->
llStop
!=
seeking
->
llDuration
)
stop_type
=
GST_SEEK_TYPE_SET
;
gst_pad_push_event
(
filter
->
sources
[
0
]
->
wg_stream
->
my_sink
,
gst_event_new_seek
(
seeking
->
dRate
,
GST_FORMAT_TIME
,
GST_SEEK_FLAG_FLUSH
,
GST_SEEK_TYPE_SET
,
seeking
->
llCurrent
*
100
,
stop_type
,
seeking
->
llStop
*
100
));
stop_flags
=
AM_SEEKING_AbsolutePositioning
;
unix_funcs
->
wg_parser_stream_seek
(
filter
->
sources
[
0
]
->
wg_stream
,
seeking
->
dRate
,
seeking
->
llCurrent
,
seeking
->
llStop
,
AM_SEEKING_AbsolutePositioning
,
stop_flags
);
for
(
i
=
0
;
i
<
filter
->
source_count
;
++
i
)
{
...
...
@@ -1212,11 +1208,8 @@ static ULONG WINAPI GST_Seeking_Release(IMediaSeeking *iface)
static
HRESULT
WINAPI
GST_Seeking_SetPositions
(
IMediaSeeking
*
iface
,
LONGLONG
*
current
,
DWORD
current_flags
,
LONGLONG
*
stop
,
DWORD
stop_flags
)
{
GstSeekType
current_type
=
GST_SEEK_TYPE_SET
,
stop_type
=
GST_SEEK_TYPE_SET
;
struct
parser_source
*
pin
=
impl_from_IMediaSeeking
(
iface
);
struct
wg_parser_stream
*
stream
=
pin
->
wg_stream
;
struct
parser
*
filter
=
impl_from_strmbase_filter
(
pin
->
pin
.
pin
.
filter
);
GstSeekFlags
flags
=
0
;
HRESULT
hr
=
S_OK
;
int
i
;
...
...
@@ -1256,20 +1249,8 @@ static HRESULT WINAPI GST_Seeking_SetPositions(IMediaSeeking *iface,
SourceSeekingImpl_SetPositions
(
iface
,
current
,
current_flags
,
stop
,
stop_flags
);
if
(
current_flags
&
AM_SEEKING_SeekToKeyFrame
)
flags
|=
GST_SEEK_FLAG_KEY_UNIT
;
if
(
current_flags
&
AM_SEEKING_Segment
)
flags
|=
GST_SEEK_FLAG_SEGMENT
;
if
(
!
(
current_flags
&
AM_SEEKING_NoFlush
))
flags
|=
GST_SEEK_FLAG_FLUSH
;
if
((
current_flags
&
AM_SEEKING_PositioningBitsMask
)
==
AM_SEEKING_NoPositioning
)
current_type
=
GST_SEEK_TYPE_NONE
;
if
((
stop_flags
&
AM_SEEKING_PositioningBitsMask
)
==
AM_SEEKING_NoPositioning
)
stop_type
=
GST_SEEK_TYPE_NONE
;
if
(
!
gst_pad_push_event
(
stream
->
my_sink
,
gst_event_new_seek
(
pin
->
seek
.
dRate
,
GST_FORMAT_TIME
,
flags
,
current_type
,
pin
->
seek
.
llCurrent
*
100
,
stop_type
,
pin
->
seek
.
llStop
*
100
)))
if
(
!
unix_funcs
->
wg_parser_stream_seek
(
pin
->
wg_stream
,
pin
->
seek
.
dRate
,
pin
->
seek
.
llCurrent
,
pin
->
seek
.
llStop
,
current_flags
,
stop_flags
))
{
ERR
(
"Failed to seek (current %s, stop %s).
\n
"
,
debugstr_time
(
pin
->
seek
.
llCurrent
),
debugstr_time
(
pin
->
seek
.
llStop
));
...
...
dlls/winegstreamer/wg_parser.c
View file @
ccc6c980
...
...
@@ -391,6 +391,28 @@ static bool CDECL wg_parser_stream_get_event(struct wg_parser_stream *stream, st
return
true
;
}
static
bool
CDECL
wg_parser_stream_seek
(
struct
wg_parser_stream
*
stream
,
double
rate
,
uint64_t
start_pos
,
uint64_t
stop_pos
,
DWORD
start_flags
,
DWORD
stop_flags
)
{
GstSeekType
start_type
=
GST_SEEK_TYPE_SET
,
stop_type
=
GST_SEEK_TYPE_SET
;
GstSeekFlags
flags
=
0
;
if
(
start_flags
&
AM_SEEKING_SeekToKeyFrame
)
flags
|=
GST_SEEK_FLAG_KEY_UNIT
;
if
(
start_flags
&
AM_SEEKING_Segment
)
flags
|=
GST_SEEK_FLAG_SEGMENT
;
if
(
!
(
start_flags
&
AM_SEEKING_NoFlush
))
flags
|=
GST_SEEK_FLAG_FLUSH
;
if
((
start_flags
&
AM_SEEKING_PositioningBitsMask
)
==
AM_SEEKING_NoPositioning
)
start_type
=
GST_SEEK_TYPE_NONE
;
if
((
stop_flags
&
AM_SEEKING_PositioningBitsMask
)
==
AM_SEEKING_NoPositioning
)
stop_type
=
GST_SEEK_TYPE_NONE
;
return
gst_pad_push_event
(
stream
->
my_sink
,
gst_event_new_seek
(
rate
,
GST_FORMAT_TIME
,
flags
,
start_type
,
start_pos
*
100
,
stop_type
,
stop_pos
*
100
));
}
static
void
CDECL
wg_parser_stream_notify_qos
(
struct
wg_parser_stream
*
stream
,
bool
underflow
,
double
proportion
,
int64_t
diff
,
uint64_t
timestamp
)
{
...
...
@@ -1565,6 +1587,8 @@ static const struct unix_funcs funcs =
wg_parser_stream_get_event
,
wg_parser_stream_notify_qos
,
wg_parser_stream_seek
,
};
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