Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gstreamer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luzpaz
gstreamer
Commits
5dd9ab1c
Commit
5dd9ab1c
authored
Feb 22, 2011
by
Wim Taymans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanups
Fix padding, remove deprecated symbols.
parent
0894ed20
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
54 additions
and
76 deletions
+54
-76
gst/gstbin.h
gst/gstbin.h
+2
-2
gst/gstbuffer.h
gst/gstbuffer.h
+1
-1
gst/gstclock.c
gst/gstclock.c
+4
-20
gst/gstclock.h
gst/gstclock.h
+5
-8
gst/gstevent.c
gst/gstevent.c
+0
-2
gst/gstevent.h
gst/gstevent.h
+11
-5
gst/gstindex.h
gst/gstindex.h
+2
-4
gst/gstmessage.c
gst/gstmessage.c
+0
-2
gst/gstmessage.h
gst/gstmessage.h
+11
-7
gst/gstplugin.h
gst/gstplugin.h
+2
-2
gst/gstregistry.h
gst/gstregistry.h
+1
-1
gst/gstsegment.h
gst/gstsegment.h
+2
-5
gst/gstsystemclock.c
gst/gstsystemclock.c
+1
-1
gst/gstsystemclock.h
gst/gstsystemclock.h
+1
-1
gst/gsttask.c
gst/gsttask.c
+6
-6
gst/gsttask.h
gst/gsttask.h
+5
-9
No files found.
gst/gstbin.h
View file @
5dd9ab1c
...
...
@@ -117,7 +117,7 @@ struct _GstBin {
/*< private >*/
GstBinPrivate
*
priv
;
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
/**
...
...
@@ -156,7 +156,7 @@ struct _GstBinClass {
gboolean
(
*
do_latency
)
(
GstBin
*
bin
);
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
GType
gst_bin_get_type
(
void
);
...
...
gst/gstbuffer.h
View file @
5dd9ab1c
...
...
@@ -288,7 +288,7 @@ struct _GstBuffer {
GstBuffer
*
parent
;
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
2
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstBufferClass
{
...
...
gst/gstclock.c
View file @
5dd9ab1c
...
...
@@ -489,26 +489,10 @@ gst_clock_id_wait (GstClockID id, GstClockTimeDiff * jitter)
GST_CAT_DEBUG_OBJECT
(
GST_CAT_CLOCK
,
clock
,
"waiting on clock entry %p"
,
id
);
/* if we have a wait_jitter function, use that */
if
(
G_LIKELY
(
cclass
->
wait_jitter
))
{
res
=
cclass
->
wait_jitter
(
clock
,
entry
,
jitter
);
}
else
{
/* check if we have a simple _wait function otherwise. The function without
* the jitter arg is less optimal as we need to do an additional _get_time()
* which is not atomic with the _wait() and a typical _wait() function does
* yet another _get_time() anyway. */
if
(
G_UNLIKELY
(
cclass
->
wait
==
NULL
))
goto
not_supported
;
if
(
jitter
)
{
GstClockTime
now
=
gst_clock_get_time
(
clock
);
/* jitter is the diff against the clock when this entry is scheduled. Negative
* values mean that the entry was in time, a positive value means that the
* entry was too late. */
*
jitter
=
GST_CLOCK_DIFF
(
requested
,
now
);
}
res
=
cclass
->
wait
(
clock
,
entry
);
}
if
(
G_UNLIKELY
(
cclass
->
wait
==
NULL
))
goto
not_supported
;
res
=
cclass
->
wait
(
clock
,
entry
,
jitter
);
GST_CAT_DEBUG_OBJECT
(
GST_CAT_CLOCK
,
clock
,
"done waiting entry %p, res: %d"
,
id
,
res
);
...
...
gst/gstclock.h
View file @
5dd9ab1c
...
...
@@ -468,12 +468,11 @@ struct _GstClock {
* be acceptable. The new resolution should be returned.
* @get_resolution: get the resolution of the clock.
* @get_internal_time: get the internal unadjusted time of the clock.
* @wait: perform a blocking wait for the given #GstClockEntry. Deprecated,
* implement @wait_jitter instead.
* @wait: perform a blocking wait on the given #GstClockEntry and return
* the jitter.
* @wait_async: perform an asynchronous wait for the given #GstClockEntry.
* @unschedule: unblock a blocking or async wait operation.
* @wait_jitter: perform a blocking wait on the given #GstClockEntry and return
* the jitter. (Since: 0.10.10)
*
* GStreamer clock class. Override the vmethods to implement the clock
* functionality.
...
...
@@ -491,15 +490,13 @@ struct _GstClockClass {
GstClockTime
(
*
get_internal_time
)
(
GstClock
*
clock
);
/* waiting on an ID */
GstClockReturn
(
*
wait
)
(
GstClock
*
clock
,
GstClockEntry
*
entry
);
GstClockReturn
(
*
wait
)
(
GstClock
*
clock
,
GstClockEntry
*
entry
,
GstClockTimeDiff
*
jitter
);
GstClockReturn
(
*
wait_async
)
(
GstClock
*
clock
,
GstClockEntry
*
entry
);
void
(
*
unschedule
)
(
GstClock
*
clock
,
GstClockEntry
*
entry
);
/* ABI added to replace the deprecated wait */
GstClockReturn
(
*
wait_jitter
)
(
GstClock
*
clock
,
GstClockEntry
*
entry
,
GstClockTimeDiff
*
jitter
);
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
GType
gst_clock_get_type
(
void
);
...
...
gst/gstevent.c
View file @
5dd9ab1c
...
...
@@ -85,8 +85,6 @@
#include "gstutils.h"
#include "gstquark.h"
#define GST_EVENT_SEQNUM(e) ((GstEvent*)e)->abidata.seqnum
static
void
gst_event_finalize
(
GstEvent
*
event
);
static
GstEvent
*
_gst_event_copy
(
GstEvent
*
event
);
...
...
gst/gstevent.h
View file @
5dd9ab1c
...
...
@@ -200,6 +200,14 @@ typedef struct _GstEventClass GstEventClass;
*/
#define GST_EVENT_SRC(event) (GST_EVENT_CAST(event)->src)
/**
* GST_EVENT_SEQNUM:
* @event: the event to query
*
* The sequence number of @event.
*/
#define GST_EVENT_SEQNUM(event) (GST_EVENT_CAST(event)->seqnum)
/**
* GST_EVENT_IS_UPSTREAM:
* @ev: the event to query
...
...
@@ -347,15 +355,13 @@ struct _GstEvent {
/*< public >*/
/* with COW */
GstEventType
type
;
guint64
timestamp
;
GstObject
*
src
;
GstObject
*
src
;
guint32
seqnum
;
GstStructure
*
structure
;
/*< private >*/
union
{
guint32
seqnum
;
gpointer
_gst_reserved
;
}
abidata
;
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstEventClass
{
...
...
gst/gstindex.h
View file @
5dd9ab1c
...
...
@@ -332,6 +332,7 @@ struct _GstIndex {
GstIndexResolverMethod
method
;
GstIndexResolver
resolver
;
gpointer
resolver_user_data
;
GDestroyNotify
resolver_user_data_destroy
;
GstIndexFilter
filter
;
gpointer
filter_user_data
;
...
...
@@ -340,11 +341,8 @@ struct _GstIndex {
GHashTable
*
writers
;
gint
last_id
;
/* ABI added since 0.10.18 */
GDestroyNotify
resolver_user_data_destroy
;
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstIndexClass
{
...
...
gst/gstmessage.c
View file @
5dd9ab1c
...
...
@@ -60,8 +60,6 @@
#include "gstquark.h"
#define GST_MESSAGE_SEQNUM(e) ((GstMessage*)e)->abidata.ABI.seqnum
static
void
gst_message_finalize
(
GstMessage
*
message
);
static
GstMessage
*
_gst_message_copy
(
GstMessage
*
message
);
...
...
gst/gstmessage.h
View file @
5dd9ab1c
...
...
@@ -190,6 +190,15 @@ typedef enum
* Get the object that posted @message.
*/
#define GST_MESSAGE_SRC(message) (GST_MESSAGE_CAST(message)->src)
/**
* GST_MESSAGE_SEQNUM:
* @message: a #GstMessage
*
* Get the sequence number of @message.
*/
#define GST_MESSAGE_SEQNUM(message) (GST_MESSAGE_CAST(message)->seqnum)
/**
* GST_MESSAGE_SRC_NAME:
* @message: a #GstMessage
...
...
@@ -286,17 +295,12 @@ struct _GstMessage
GstMessageType
type
;
guint64
timestamp
;
GstObject
*
src
;
guint32
seqnum
;
GstStructure
*
structure
;
/*< private >*/
union
{
struct
{
guint32
seqnum
;
}
ABI
;
/* + 0 to mark ABI change for future greppage */
gpointer
_gst_reserved
[
GST_PADDING
+
0
];
}
abidata
;
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstMessageClass
{
...
...
gst/gstplugin.h
View file @
5dd9ab1c
...
...
@@ -175,7 +175,7 @@ struct _GstPluginDesc {
const
gchar
*
origin
;
const
gchar
*
release_datetime
;
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
...
...
@@ -213,7 +213,7 @@ struct _GstPlugin {
* that matches the plugin's basename */
GstPluginPrivate
*
priv
;
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstPluginClass
{
...
...
gst/gstregistry.h
View file @
5dd9ab1c
...
...
@@ -66,7 +66,7 @@ struct _GstRegistry {
GstRegistryPrivate
*
priv
;
/*< private >*/
gpointer
_gst_reserved
[
GST_PADDING
-
3
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstRegistryClass
{
...
...
gst/gstsegment.h
View file @
5dd9ab1c
...
...
@@ -53,6 +53,7 @@ struct _GstSegment {
/*< public >*/
gdouble
rate
;
gdouble
abs_rate
;
gdouble
applied_rate
;
GstFormat
format
;
GstSeekFlags
flags
;
gint64
start
;
...
...
@@ -63,12 +64,8 @@ struct _GstSegment {
gint64
last_stop
;
gint64
duration
;
/* API added 0.10.6 */
gdouble
applied_rate
;
/*< private >*/
/*gpointer _gst_reserved[GST_PADDING-2];*/
guint8
_gst_reserved
[(
sizeof
(
gpointer
)
*
GST_PADDING
)
-
sizeof
(
gdouble
)];
gpointer
_gst_reserved
[
GST_PADDING
];
};
GType
gst_segment_get_type
(
void
);
...
...
gst/gstsystemclock.c
View file @
5dd9ab1c
...
...
@@ -152,7 +152,7 @@ gst_system_clock_class_init (GstSystemClockClass * klass)
gstclock_class
->
get_internal_time
=
gst_system_clock_get_internal_time
;
gstclock_class
->
get_resolution
=
gst_system_clock_get_resolution
;
gstclock_class
->
wait
_jitter
=
gst_system_clock_id_wait_jitter
;
gstclock_class
->
wait
=
gst_system_clock_id_wait_jitter
;
gstclock_class
->
wait_async
=
gst_system_clock_id_wait_async
;
gstclock_class
->
unschedule
=
gst_system_clock_id_unschedule
;
}
...
...
gst/gstsystemclock.h
View file @
5dd9ab1c
...
...
@@ -71,7 +71,7 @@ struct _GstSystemClock {
/* ABI added */
GstSystemClockPrivate
*
priv
;
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstSystemClockClass
{
...
...
gst/gsttask.c
View file @
5dd9ab1c
...
...
@@ -185,7 +185,7 @@ gst_task_init (GstTask * task)
task
->
priv
=
GST_TASK_GET_PRIVATE
(
task
);
task
->
running
=
FALSE
;
task
->
abidata
.
ABI
.
thread
=
NULL
;
task
->
thread
=
NULL
;
task
->
lock
=
NULL
;
task
->
cond
=
g_cond_new
();
SET_TASK_STATE
(
task
,
GST_TASK_STOPPED
);
...
...
@@ -274,7 +274,7 @@ gst_task_func (GstTask * task)
lock
=
GST_TASK_GET_LOCK
(
task
);
if
(
G_UNLIKELY
(
lock
==
NULL
))
goto
no_lock
;
task
->
abidata
.
ABI
.
thread
=
tself
;
task
->
thread
=
tself
;
/* only update the priority when it was changed */
if
(
priv
->
prio_set
)
g_thread_set_priority
(
tself
,
priv
->
priority
);
...
...
@@ -321,7 +321,7 @@ done:
g_static_rec_mutex_unlock
(
lock
);
GST_OBJECT_LOCK
(
task
);
task
->
abidata
.
ABI
.
thread
=
NULL
;
task
->
thread
=
NULL
;
exit:
if
(
priv
->
thr_callbacks
.
leave_thread
)
{
...
...
@@ -471,7 +471,7 @@ gst_task_set_priority (GstTask * task, GThreadPriority priority)
GST_OBJECT_LOCK
(
task
);
priv
->
prio_set
=
TRUE
;
priv
->
priority
=
priority
;
thread
=
task
->
abidata
.
ABI
.
thread
;
thread
=
task
->
thread
;
if
(
thread
!=
NULL
)
{
/* if this task already has a thread, we can configure the priority right
* away, else we do that when we assign a thread to the task. */
...
...
@@ -812,7 +812,7 @@ gst_task_join (GstTask * task)
/* we don't use a real thread join here because we are using
* thread pools */
GST_OBJECT_LOCK
(
task
);
if
(
G_UNLIKELY
(
tself
==
task
->
abidata
.
ABI
.
thread
))
if
(
G_UNLIKELY
(
tself
==
task
->
thread
))
goto
joining_self
;
SET_TASK_STATE
(
task
,
GST_TASK_STOPPED
);
/* signal the state change for when it was blocked in PAUSED. */
...
...
@@ -823,7 +823,7 @@ gst_task_join (GstTask * task)
while
(
G_LIKELY
(
task
->
running
))
GST_TASK_WAIT
(
task
);
/* clean the thread */
task
->
abidata
.
ABI
.
thread
=
NULL
;
task
->
thread
=
NULL
;
/* get the id and pool to join */
pool
=
priv
->
pool_id
;
id
=
priv
->
id
;
...
...
gst/gsttask.h
View file @
5dd9ab1c
...
...
@@ -154,15 +154,11 @@ struct _GstTask {
gboolean
running
;
/*< private >*/
union
{
struct
{
/* thread this task is currently running in */
GThread
*
thread
;
}
ABI
;
gpointer
_gst_reserved
[
GST_PADDING
-
1
];
}
abidata
;
GstTaskPrivate
*
priv
;
GThread
*
thread
;
GstTaskPrivate
*
priv
;
gpointer
_gst_reserved
[
GST_PADDING
];
};
struct
_GstTaskClass
{
...
...
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