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
ca0719f4
Commit
ca0719f4
authored
Jun 13, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Support zero-copy wg_transform_read_data in quartz_transform.c.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
6c110bd3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
28 deletions
+39
-28
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
quartz_transform.c
dlls/winegstreamer/quartz_transform.c
+3
-28
wg_sample.c
dlls/winegstreamer/wg_sample.c
+35
-0
No files found.
dlls/winegstreamer/gst_private.h
View file @
ca0719f4
...
...
@@ -136,6 +136,7 @@ HRESULT wg_transform_push_quartz(struct wg_transform *transform, struct wg_sampl
struct
wg_sample_queue
*
queue
);
HRESULT
wg_transform_read_mf
(
struct
wg_transform
*
transform
,
struct
wg_sample
*
sample
,
struct
wg_format
*
format
);
HRESULT
wg_transform_read_quartz
(
struct
wg_transform
*
transform
,
struct
wg_sample
*
sample
);
HRESULT
winegstreamer_stream_handler_create
(
REFIID
riid
,
void
**
obj
);
...
...
dlls/winegstreamer/quartz_transform.c
View file @
ca0719f4
...
...
@@ -291,8 +291,6 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
{
struct
transform
*
filter
=
impl_from_strmbase_filter
(
pin
->
pin
.
filter
);
struct
wg_sample
*
wg_sample
;
REFERENCE_TIME
start_time
;
REFERENCE_TIME
end_time
;
HRESULT
hr
;
/* We do not expect pin connection state to change while the filter is
...
...
@@ -334,10 +332,11 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
return
hr
;
}
hr
=
wg_transform_read_data
(
filter
->
transform
,
wg_sample
,
NULL
);
hr
=
wg_transform_read_quartz
(
filter
->
transform
,
wg_sample
);
wg_sample_release
(
wg_sample
);
if
(
hr
==
MF_E_TRANSFORM_NEED_MORE_INPUT
)
{
wg_sample_release
(
wg_sample
);
IMediaSample_Release
(
output_sample
);
break
;
}
...
...
@@ -345,36 +344,12 @@ static HRESULT WINAPI transform_sink_receive(struct strmbase_sink *pin, IMediaSa
{
if
(
hr
==
MF_E_TRANSFORM_STREAM_CHANGE
)
FIXME
(
"Unexpected stream format change!
\n
"
);
wg_sample_release
(
wg_sample
);
IMediaSample_Release
(
output_sample
);
return
hr
;
}
wg_sample_queue_flush
(
filter
->
sample_queue
,
false
);
hr
=
IMediaSample_SetActualDataLength
(
output_sample
,
wg_sample
->
size
);
if
(
FAILED
(
hr
))
{
wg_sample_release
(
wg_sample
);
IMediaSample_Release
(
output_sample
);
return
hr
;
}
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_HAS_PTS
)
{
start_time
=
wg_sample
->
pts
;
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_HAS_DURATION
)
{
end_time
=
start_time
+
wg_sample
->
duration
;
IMediaSample_SetTime
(
output_sample
,
&
start_time
,
&
end_time
);
}
else
{
IMediaSample_SetTime
(
output_sample
,
&
start_time
,
NULL
);
}
}
wg_sample_release
(
wg_sample
);
hr
=
IMemInputPin_Receive
(
filter
->
source
.
pMemInputPin
,
output_sample
);
if
(
FAILED
(
hr
))
{
...
...
dlls/winegstreamer/wg_sample.c
View file @
ca0719f4
...
...
@@ -329,3 +329,38 @@ HRESULT wg_transform_push_quartz(struct wg_transform *transform, struct wg_sampl
return
hr
;
}
HRESULT
wg_transform_read_quartz
(
struct
wg_transform
*
transform
,
struct
wg_sample
*
wg_sample
)
{
struct
sample
*
sample
=
unsafe_quartz_from_wg_sample
(
wg_sample
);
REFERENCE_TIME
start_time
,
end_time
;
HRESULT
hr
;
BOOL
value
;
TRACE_
(
mfplat
)(
"transform %p, wg_sample %p.
\n
"
,
transform
,
wg_sample
);
if
(
FAILED
(
hr
=
wg_transform_read_data
(
transform
,
wg_sample
,
NULL
)))
return
hr
;
if
(
FAILED
(
hr
=
IMediaSample_SetActualDataLength
(
sample
->
u
.
quartz
.
sample
,
wg_sample
->
size
)))
return
hr
;
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_HAS_PTS
)
{
start_time
=
wg_sample
->
pts
;
if
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_HAS_DURATION
)
{
end_time
=
start_time
+
wg_sample
->
duration
;
IMediaSample_SetTime
(
sample
->
u
.
quartz
.
sample
,
&
start_time
,
&
end_time
);
}
else
{
IMediaSample_SetTime
(
sample
->
u
.
quartz
.
sample
,
&
start_time
,
NULL
);
}
}
value
=
!!
(
wg_sample
->
flags
&
WG_SAMPLE_FLAG_SYNC_POINT
);
IMediaSample_SetSyncPoint
(
sample
->
u
.
quartz
.
sample
,
value
);
return
S_OK
;
}
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