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
4f4ee0e1
Commit
4f4ee0e1
authored
May 25, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Implement MFT_MESSAGE_COMMAND_FLUSH for the H264 decoder.
parent
16347299
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
9 deletions
+46
-9
transform.c
dlls/mf/tests/transform.c
+0
-9
gst_private.h
dlls/winegstreamer/gst_private.h
+1
-0
h264_decoder.c
dlls/winegstreamer/h264_decoder.c
+3
-0
main.c
dlls/winegstreamer/main.c
+15
-0
unix_private.h
dlls/winegstreamer/unix_private.h
+1
-0
unixlib.h
dlls/winegstreamer/unixlib.h
+1
-0
wg_parser.c
dlls/winegstreamer/wg_parser.c
+1
-0
wg_transform.c
dlls/winegstreamer/wg_transform.c
+24
-0
No files found.
dlls/mf/tests/transform.c
View file @
4f4ee0e1
...
@@ -4026,7 +4026,6 @@ static void test_h264_decoder_concat_streams(void)
...
@@ -4026,7 +4026,6 @@ static void test_h264_decoder_concat_streams(void)
{
{
{.
length
=
0x3600
},
{.
length
=
0x3600
},
{.
length
=
0x4980
},
{.
length
=
0x4980
},
{.
length
=
0
,
.
todo_length
=
TRUE
},
};
};
const
struct
attribute_desc
output_sample_attributes
[]
=
const
struct
attribute_desc
output_sample_attributes
[]
=
{
{
...
@@ -4057,13 +4056,6 @@ static void test_h264_decoder_concat_streams(void)
...
@@ -4057,13 +4056,6 @@ static void test_h264_decoder_concat_streams(void)
.
buffer_count
=
1
,
.
buffers
=
output_buffer_desc
+
1
,
.
repeat_count
=
6
,
.
buffer_count
=
1
,
.
buffers
=
output_buffer_desc
+
1
,
.
repeat_count
=
6
,
.
todo_time
=
TRUE
,
.
todo_time
=
TRUE
,
},
},
{
/* Wine outputs spurious buffers */
.
attributes
=
output_sample_attributes
+
0
,
.
sample_time
=
0
,
.
sample_duration
=
400000
,
.
buffer_count
=
1
,
.
buffers
=
output_buffer_desc
+
2
,
.
repeat_count
=
22
,
.
todo_time
=
TRUE
,
.
todo_length
=
TRUE
,
},
{
0
},
{
0
},
};
};
const
WCHAR
*
filenames
[]
=
const
WCHAR
*
filenames
[]
=
...
@@ -4212,7 +4204,6 @@ static void test_h264_decoder_concat_streams(void)
...
@@ -4212,7 +4204,6 @@ static void test_h264_decoder_concat_streams(void)
hr
=
IMFCollection_GetElementCount
(
output_samples
,
&
output_count
);
hr
=
IMFCollection_GetElementCount
(
output_samples
,
&
output_count
);
ok
(
hr
==
S_OK
,
"GetElementCount returned %#lx
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"GetElementCount returned %#lx
\n
"
,
hr
);
todo_wine
ok
(
output_count
==
96
,
"GetElementCount returned %#lx
\n
"
,
output_count
);
ok
(
output_count
==
96
,
"GetElementCount returned %#lx
\n
"
,
output_count
);
ret
=
check_mf_sample_collection
(
output_samples
,
output_sample_desc
,
NULL
);
ret
=
check_mf_sample_collection
(
output_samples
,
output_sample_desc
,
NULL
);
...
...
dlls/winegstreamer/gst_private.h
View file @
4f4ee0e1
...
@@ -107,6 +107,7 @@ void wg_transform_destroy(struct wg_transform *transform);
...
@@ -107,6 +107,7 @@ void wg_transform_destroy(struct wg_transform *transform);
bool
wg_transform_set_output_format
(
struct
wg_transform
*
transform
,
struct
wg_format
*
format
);
bool
wg_transform_set_output_format
(
struct
wg_transform
*
transform
,
struct
wg_format
*
format
);
bool
wg_transform_get_status
(
struct
wg_transform
*
transform
,
bool
*
accepts_input
);
bool
wg_transform_get_status
(
struct
wg_transform
*
transform
,
bool
*
accepts_input
);
HRESULT
wg_transform_drain
(
struct
wg_transform
*
transform
);
HRESULT
wg_transform_drain
(
struct
wg_transform
*
transform
);
HRESULT
wg_transform_flush
(
struct
wg_transform
*
transform
);
unsigned
int
wg_format_get_max_size
(
const
struct
wg_format
*
format
);
unsigned
int
wg_format_get_max_size
(
const
struct
wg_format
*
format
);
...
...
dlls/winegstreamer/h264_decoder.c
View file @
4f4ee0e1
...
@@ -630,6 +630,9 @@ static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_
...
@@ -630,6 +630,9 @@ static HRESULT WINAPI transform_ProcessMessage(IMFTransform *iface, MFT_MESSAGE_
case
MFT_MESSAGE_COMMAND_DRAIN
:
case
MFT_MESSAGE_COMMAND_DRAIN
:
return
wg_transform_drain
(
decoder
->
wg_transform
);
return
wg_transform_drain
(
decoder
->
wg_transform
);
case
MFT_MESSAGE_COMMAND_FLUSH
:
return
wg_transform_flush
(
decoder
->
wg_transform
);
default:
default:
FIXME
(
"Ignoring message %#x.
\n
"
,
message
);
FIXME
(
"Ignoring message %#x.
\n
"
,
message
);
return
S_OK
;
return
S_OK
;
...
...
dlls/winegstreamer/main.c
View file @
4f4ee0e1
...
@@ -441,6 +441,21 @@ HRESULT wg_transform_drain(struct wg_transform *transform)
...
@@ -441,6 +441,21 @@ HRESULT wg_transform_drain(struct wg_transform *transform)
return
S_OK
;
return
S_OK
;
}
}
HRESULT
wg_transform_flush
(
struct
wg_transform
*
transform
)
{
NTSTATUS
status
;
TRACE
(
"transform %p.
\n
"
,
transform
);
if
((
status
=
WINE_UNIX_CALL
(
unix_wg_transform_flush
,
transform
)))
{
WARN
(
"wg_transform_flush returned status %#lx
\n
"
,
status
);
return
HRESULT_FROM_NT
(
status
);
}
return
S_OK
;
}
#define ALIGN(n, alignment) (((n) + (alignment) - 1) & ~((alignment) - 1))
#define ALIGN(n, alignment) (((n) + (alignment) - 1) & ~((alignment) - 1))
unsigned
int
wg_format_get_stride
(
const
struct
wg_format
*
format
)
unsigned
int
wg_format_get_stride
(
const
struct
wg_format
*
format
)
...
...
dlls/winegstreamer/unix_private.h
View file @
4f4ee0e1
...
@@ -54,6 +54,7 @@ extern NTSTATUS wg_transform_push_data(void *args) DECLSPEC_HIDDEN;
...
@@ -54,6 +54,7 @@ extern NTSTATUS wg_transform_push_data(void *args) DECLSPEC_HIDDEN;
extern
NTSTATUS
wg_transform_read_data
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_read_data
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_get_status
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_get_status
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_drain
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_drain
(
void
*
args
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
wg_transform_flush
(
void
*
args
)
DECLSPEC_HIDDEN
;
/* wg_allocator.c */
/* wg_allocator.c */
...
...
dlls/winegstreamer/unixlib.h
View file @
4f4ee0e1
...
@@ -377,6 +377,7 @@ enum unix_funcs
...
@@ -377,6 +377,7 @@ enum unix_funcs
unix_wg_transform_read_data
,
unix_wg_transform_read_data
,
unix_wg_transform_get_status
,
unix_wg_transform_get_status
,
unix_wg_transform_drain
,
unix_wg_transform_drain
,
unix_wg_transform_flush
,
};
};
#endif
/* __WINE_WINEGSTREAMER_UNIXLIB_H */
#endif
/* __WINE_WINEGSTREAMER_UNIXLIB_H */
dlls/winegstreamer/wg_parser.c
View file @
4f4ee0e1
...
@@ -1940,4 +1940,5 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
...
@@ -1940,4 +1940,5 @@ const unixlib_entry_t __wine_unix_call_funcs[] =
X
(
wg_transform_read_data
),
X
(
wg_transform_read_data
),
X
(
wg_transform_get_status
),
X
(
wg_transform_get_status
),
X
(
wg_transform_drain
),
X
(
wg_transform_drain
),
X
(
wg_transform_flush
),
};
};
dlls/winegstreamer/wg_transform.c
View file @
4f4ee0e1
...
@@ -904,3 +904,27 @@ error:
...
@@ -904,3 +904,27 @@ error:
GST_ERROR
(
"Failed to drain transform %p."
,
transform
);
GST_ERROR
(
"Failed to drain transform %p."
,
transform
);
return
STATUS_UNSUCCESSFUL
;
return
STATUS_UNSUCCESSFUL
;
}
}
NTSTATUS
wg_transform_flush
(
void
*
args
)
{
struct
wg_transform
*
transform
=
args
;
GstBuffer
*
input_buffer
;
GstSample
*
sample
;
NTSTATUS
status
;
GST_LOG
(
"transform %p"
,
transform
);
while
((
input_buffer
=
gst_atomic_queue_pop
(
transform
->
input_queue
)))
gst_buffer_unref
(
input_buffer
);
if
((
status
=
wg_transform_drain
(
transform
)))
return
status
;
while
((
sample
=
gst_atomic_queue_pop
(
transform
->
output_queue
)))
gst_sample_unref
(
sample
);
if
((
sample
=
transform
->
output_sample
))
gst_sample_unref
(
sample
);
transform
->
output_sample
=
NULL
;
return
STATUS_SUCCESS
;
}
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