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
a2ce3939
Commit
a2ce3939
authored
Feb 04, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Store the wg_parser pointer as our source pad's private data.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3746381e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
gstdemux.c
dlls/winegstreamer/gstdemux.c
+15
-20
No files found.
dlls/winegstreamer/gstdemux.c
View file @
a2ce3939
...
@@ -636,9 +636,8 @@ static gboolean query_sink(GstPad *pad, GstObject *parent, GstQuery *query)
...
@@ -636,9 +636,8 @@ static gboolean query_sink(GstPad *pad, GstObject *parent, GstQuery *query)
}
}
}
}
static
gboolean
gst_base_src_perform_seek
(
struct
parser
*
This
,
GstEvent
*
event
)
static
gboolean
gst_base_src_perform_seek
(
struct
wg_parser
*
parser
,
GstEvent
*
event
)
{
{
struct
wg_parser
*
parser
=
This
->
wg_parser
;
gboolean
res
=
TRUE
;
gboolean
res
=
TRUE
;
gdouble
rate
;
gdouble
rate
;
GstFormat
seek_format
;
GstFormat
seek_format
;
...
@@ -687,15 +686,15 @@ static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event)
...
@@ -687,15 +686,15 @@ static gboolean gst_base_src_perform_seek(struct parser *This, GstEvent *event)
static
gboolean
event_src
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
static
gboolean
event_src
(
GstPad
*
pad
,
GstObject
*
parent
,
GstEvent
*
event
)
{
{
struct
parser
*
This
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
gst_pad_get_element_private
(
pad
);
gboolean
ret
=
TRUE
;
gboolean
ret
=
TRUE
;
GST_LOG
(
"
filter %p, type
\"
%s
\"
."
,
This
,
GST_EVENT_TYPE_NAME
(
event
));
GST_LOG
(
"
parser %p, type
\"
%s
\"
."
,
parser
,
GST_EVENT_TYPE_NAME
(
event
));
switch
(
event
->
type
)
switch
(
event
->
type
)
{
{
case
GST_EVENT_SEEK
:
case
GST_EVENT_SEEK
:
ret
=
gst_base_src_perform_seek
(
This
,
event
);
ret
=
gst_base_src_perform_seek
(
parser
,
event
);
break
;
break
;
case
GST_EVENT_FLUSH_START
:
case
GST_EVENT_FLUSH_START
:
...
@@ -848,10 +847,9 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
...
@@ -848,10 +847,9 @@ static gboolean event_sink(GstPad *pad, GstObject *parent, GstEvent *event)
static
GstFlowReturn
request_buffer_src
(
GstPad
*
pad
,
GstObject
*
parent
,
guint64
offset
,
guint
size
,
GstBuffer
**
buffer
);
static
GstFlowReturn
request_buffer_src
(
GstPad
*
pad
,
GstObject
*
parent
,
guint64
offset
,
guint
size
,
GstBuffer
**
buffer
);
static
void
*
push_data
(
void
*
iface
)
static
void
*
push_data
(
void
*
arg
)
{
{
struct
parser
*
This
=
iface
;
struct
wg_parser
*
parser
=
arg
;
struct
wg_parser
*
parser
=
This
->
wg_parser
;
GstBuffer
*
buffer
;
GstBuffer
*
buffer
;
LONGLONG
maxlen
;
LONGLONG
maxlen
;
...
@@ -1125,8 +1123,7 @@ static DWORD CALLBACK stream_thread(void *arg)
...
@@ -1125,8 +1123,7 @@ static DWORD CALLBACK stream_thread(void *arg)
static
GstFlowReturn
request_buffer_src
(
GstPad
*
pad
,
GstObject
*
parent
,
guint64
offset
,
guint
size
,
GstBuffer
**
buffer
)
static
GstFlowReturn
request_buffer_src
(
GstPad
*
pad
,
GstObject
*
parent
,
guint64
offset
,
guint
size
,
GstBuffer
**
buffer
)
{
{
struct
parser
*
filter
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
filter
->
wg_parser
;
GstBuffer
*
new_buffer
=
NULL
;
GstBuffer
*
new_buffer
=
NULL
;
GstFlowReturn
ret
;
GstFlowReturn
ret
;
...
@@ -1414,11 +1411,10 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user)
...
@@ -1414,11 +1411,10 @@ static void existing_new_pad(GstElement *bin, GstPad *pad, gpointer user)
static
gboolean
query_function
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
static
gboolean
query_function
(
GstPad
*
pad
,
GstObject
*
parent
,
GstQuery
*
query
)
{
{
struct
parser
*
This
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
This
->
wg_parser
;
GstFormat
format
;
GstFormat
format
;
GST_LOG
(
"
filter %p, type %s."
,
This
,
GST_QUERY_TYPE_NAME
(
query
));
GST_LOG
(
"
parser %p, type %s."
,
parser
,
GST_QUERY_TYPE_NAME
(
query
));
switch
(
GST_QUERY_TYPE
(
query
))
{
switch
(
GST_QUERY_TYPE
(
query
))
{
case
GST_QUERY_DURATION
:
case
GST_QUERY_DURATION
:
...
@@ -1456,8 +1452,7 @@ static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query)
...
@@ -1456,8 +1452,7 @@ static gboolean query_function(GstPad *pad, GstObject *parent, GstQuery *query)
static
gboolean
activate_push
(
GstPad
*
pad
,
gboolean
activate
)
static
gboolean
activate_push
(
GstPad
*
pad
,
gboolean
activate
)
{
{
struct
parser
*
This
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
parser
=
This
->
wg_parser
;
if
(
!
activate
)
{
if
(
!
activate
)
{
if
(
parser
->
push_thread
)
{
if
(
parser
->
push_thread
)
{
...
@@ -1467,7 +1462,7 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
...
@@ -1467,7 +1462,7 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
}
else
if
(
!
parser
->
push_thread
)
{
}
else
if
(
!
parser
->
push_thread
)
{
int
ret
;
int
ret
;
if
((
ret
=
pthread_create
(
&
parser
->
push_thread
,
NULL
,
push_data
,
This
)))
if
((
ret
=
pthread_create
(
&
parser
->
push_thread
,
NULL
,
push_data
,
parser
)))
{
{
GST_ERROR
(
"Failed to create push thread: %s"
,
strerror
(
errno
));
GST_ERROR
(
"Failed to create push thread: %s"
,
strerror
(
errno
));
parser
->
push_thread
=
0
;
parser
->
push_thread
=
0
;
...
@@ -1479,10 +1474,10 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
...
@@ -1479,10 +1474,10 @@ static gboolean activate_push(GstPad *pad, gboolean activate)
static
gboolean
activate_mode
(
GstPad
*
pad
,
GstObject
*
parent
,
GstPadMode
mode
,
gboolean
activate
)
static
gboolean
activate_mode
(
GstPad
*
pad
,
GstObject
*
parent
,
GstPadMode
mode
,
gboolean
activate
)
{
{
struct
parser
*
filt
er
=
gst_pad_get_element_private
(
pad
);
struct
wg_parser
*
pars
er
=
gst_pad_get_element_private
(
pad
);
GST_DEBUG
(
"%s source pad for
filt
er %p in %s mode."
,
GST_DEBUG
(
"%s source pad for
pars
er %p in %s mode."
,
activate
?
"Activating"
:
"Deactivating"
,
filt
er
,
gst_pad_mode_get_name
(
mode
));
activate
?
"Activating"
:
"Deactivating"
,
pars
er
,
gst_pad_mode_get_name
(
mode
));
switch
(
mode
)
{
switch
(
mode
)
{
case
GST_PAD_MODE_PULL
:
case
GST_PAD_MODE_PULL
:
...
@@ -1625,7 +1620,7 @@ static HRESULT GST_Connect(struct parser *This, IPin *pConnectPin)
...
@@ -1625,7 +1620,7 @@ static HRESULT GST_Connect(struct parser *This, IPin *pConnectPin)
gst_pad_set_query_function
(
parser
->
my_src
,
query_function
);
gst_pad_set_query_function
(
parser
->
my_src
,
query_function
);
gst_pad_set_activatemode_function
(
parser
->
my_src
,
activate_mode
);
gst_pad_set_activatemode_function
(
parser
->
my_src
,
activate_mode
);
gst_pad_set_event_function
(
parser
->
my_src
,
event_src
);
gst_pad_set_event_function
(
parser
->
my_src
,
event_src
);
gst_pad_set_element_private
(
parser
->
my_src
,
This
);
gst_pad_set_element_private
(
parser
->
my_src
,
parser
);
parser
->
start_offset
=
parser
->
next_offset
=
parser
->
stop_offset
=
0
;
parser
->
start_offset
=
parser
->
next_offset
=
parser
->
stop_offset
=
0
;
This
->
next_pull_offset
=
0
;
This
->
next_pull_offset
=
0
;
...
...
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