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
794763bb
Commit
794763bb
authored
Jan 03, 2023
by
Zebediah Figura
Committed by
Alexandre Julliard
Jan 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Factor out a parser_create() helper.
parent
51c73f00
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
43 deletions
+24
-43
quartz_parser.c
dlls/winegstreamer/quartz_parser.c
+24
-43
No files found.
dlls/winegstreamer/quartz_parser.c
View file @
794763bb
...
...
@@ -1343,29 +1343,34 @@ static HRESULT decodebin_parser_source_get_media_type(struct parser_source *pin,
return
VFW_S_NO_MORE_ITEMS
;
}
static
BOOL
parser_init_gstreamer
(
void
)
{
if
(
!
init_gstreamer
())
return
FALSE
;
return
TRUE
;
}
HRESULT
decodebin_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
static
HRESULT
parser_create
(
enum
wg_parser_type
type
,
struct
parser
**
parser
)
{
struct
parser
*
object
;
if
(
!
parser_
init_gstreamer
())
if
(
!
init_gstreamer
())
return
E_FAIL
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
!
(
object
->
wg_parser
=
wg_parser_create
(
WG_PARSER_DECODEBIN
,
false
)))
if
(
!
(
object
->
wg_parser
=
wg_parser_create
(
type
,
false
)))
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
*
parser
=
object
;
return
S_OK
;
}
HRESULT
decodebin_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
parser
*
object
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
parser_create
(
WG_PARSER_DECODEBIN
,
&
object
)))
return
hr
;
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_decodebin_parser
,
&
filter_ops
);
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"input pin"
,
&
sink_ops
,
NULL
);
...
...
@@ -1881,18 +1886,10 @@ static HRESULT wave_parser_source_get_media_type(struct parser_source *pin,
HRESULT
wave_parser_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
parser
*
object
;
HRESULT
hr
;
if
(
!
parser_init_gstreamer
())
return
E_FAIL
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
!
(
object
->
wg_parser
=
wg_parser_create
(
WG_PARSER_WAVPARSE
,
false
)))
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
parser_create
(
WG_PARSER_WAVPARSE
,
&
object
)))
return
hr
;
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_WAVEParser
,
&
filter_ops
);
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"input pin"
,
&
wave_parser_sink_ops
,
NULL
);
...
...
@@ -1967,18 +1964,10 @@ static HRESULT avi_splitter_source_get_media_type(struct parser_source *pin,
HRESULT
avi_splitter_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
parser
*
object
;
HRESULT
hr
;
if
(
!
parser_init_gstreamer
())
return
E_FAIL
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
!
(
object
->
wg_parser
=
wg_parser_create
(
WG_PARSER_AVIDEMUX
,
false
)))
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
parser_create
(
WG_PARSER_AVIDEMUX
,
&
object
)))
return
hr
;
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_AviSplitter
,
&
filter_ops
);
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"input pin"
,
&
avi_splitter_sink_ops
,
NULL
);
...
...
@@ -2074,18 +2063,10 @@ static const struct strmbase_filter_ops mpeg_splitter_ops =
HRESULT
mpeg_splitter_create
(
IUnknown
*
outer
,
IUnknown
**
out
)
{
struct
parser
*
object
;
HRESULT
hr
;
if
(
!
parser_init_gstreamer
())
return
E_FAIL
;
if
(
!
(
object
=
calloc
(
1
,
sizeof
(
*
object
))))
return
E_OUTOFMEMORY
;
if
(
!
(
object
->
wg_parser
=
wg_parser_create
(
WG_PARSER_MPEGAUDIOPARSE
,
false
)))
{
free
(
object
);
return
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
=
parser_create
(
WG_PARSER_MPEGAUDIOPARSE
,
&
object
)))
return
hr
;
strmbase_filter_init
(
&
object
->
filter
,
outer
,
&
CLSID_MPEG1Splitter
,
&
mpeg_splitter_ops
);
strmbase_sink_init
(
&
object
->
sink
,
&
object
->
filter
,
L"Input"
,
&
mpeg_splitter_sink_ops
,
NULL
);
...
...
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