Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
videolan
vlc-2-2
Commits
80ddb522
Commit
80ddb522
authored
May 10, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move some internal message stuff to src/
parent
5cf8c891
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
26 deletions
+23
-26
include/vlc_messages.h
include/vlc_messages.h
+0
-18
src/libvlc.h
src/libvlc.h
+16
-1
src/misc/messages.c
src/misc/messages.c
+7
-7
No files found.
include/vlc_messages.h
View file @
80ddb522
...
...
@@ -41,17 +41,6 @@
* @{
*/
/** Internal message stack context */
typedef
struct
{
int
i_code
;
char
*
psz_message
;
}
msg_context_t
;
void
msg_StackSet
(
int
,
const
char
*
,
...
);
void
msg_StackAdd
(
const
char
*
,
...
);
const
char
*
msg_StackMsg
(
void
);
/**
* Store a single message sent to user.
*/
...
...
@@ -116,13 +105,6 @@ VLC_EXPORT( void, __msg_Dbg, ( vlc_object_t *, const char *, ... ) ATTRIBUTE_
__msg_Generic( VLC_OBJECT(p_this), MSG_QUEUE_NORMAL, VLC_MSG_DBG, \
MODULE_STRING, __VA_ARGS__ )
#define msg_Create(a) __msg_Create(VLC_OBJECT(a))
#define msg_Flush(a) __msg_Flush(VLC_OBJECT(a))
#define msg_Destroy(a) __msg_Destroy(VLC_OBJECT(a))
void
__msg_Create
(
vlc_object_t
*
);
void
__msg_Flush
(
vlc_object_t
*
);
void
__msg_Destroy
(
vlc_object_t
*
);
#define msg_Subscribe(a,b) __msg_Subscribe(VLC_OBJECT(a),b)
#define msg_Unsubscribe(a,b) __msg_Unsubscribe(VLC_OBJECT(a),b)
VLC_EXPORT
(
msg_subscription_t
*
,
__msg_Subscribe
,
(
vlc_object_t
*
,
int
)
);
...
...
src/libvlc.h
View file @
80ddb522
...
...
@@ -89,7 +89,7 @@ typedef struct msg_queue_t
}
msg_queue_t
;
/**
* Store all data requi
e
red by messages interfaces.
* Store all data required by messages interfaces.
*/
typedef
struct
msg_bank_t
{
...
...
@@ -97,6 +97,21 @@ typedef struct msg_bank_t
msg_queue_t
queues
[
NB_QUEUES
];
}
msg_bank_t
;
void
msg_Create
(
libvlc_int_t
*
);
void
msg_Flush
(
libvlc_int_t
*
);
void
msg_Destroy
(
libvlc_int_t
*
);
/** Internal message stack context */
typedef
struct
{
int
i_code
;
char
*
psz_message
;
}
msg_context_t
;
void
msg_StackSet
(
int
,
const
char
*
,
...
);
void
msg_StackAdd
(
const
char
*
,
...
);
const
char
*
msg_StackMsg
(
void
);
/*
* Unicode stuff
*/
...
...
src/misc/messages.c
View file @
80ddb522
...
...
@@ -82,9 +82,9 @@ static void PrintMsg ( vlc_object_t *, msg_item_t * );
* Initialize messages queues
* This function initializes all message queues
*/
void
__msg_Create
(
vlc_object_t
*
p_this
)
void
msg_Create
(
libvlc_int_t
*
p_libvlc
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_
this
->
p_
libvlc
);
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
vlc_mutex_init
(
&
priv
->
msg_bank
.
lock
);
for
(
int
i
=
0
;
i
<
2
;
i
++
)
...
...
@@ -110,9 +110,9 @@ void __msg_Create( vlc_object_t *p_this )
/**
* Flush all message queues
*/
void
__msg_Flush
(
vlc_object_t
*
p_this
)
void
msg_Flush
(
libvlc_int_t
*
p_libvlc
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_
this
->
p_
libvlc
);
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
for
(
int
i
=
0
;
i
<
NB_QUEUES
;
i
++
)
{
...
...
@@ -129,14 +129,14 @@ void __msg_Flush( vlc_object_t *p_this )
* then frees all the allocated ressources
* No other messages interface functions should be called after this one.
*/
void
__msg_Destroy
(
vlc_object_t
*
p_this
)
void
msg_Destroy
(
libvlc_int_t
*
p_libvlc
)
{
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_
this
->
p_
libvlc
);
libvlc_priv_t
*
priv
=
libvlc_priv
(
p_libvlc
);
for
(
int
i
=
NB_QUEUES
-
1
;
i
>=
0
;
i
--
)
{
if
(
QUEUE
(
i
).
i_sub
)
msg_Err
(
p_
this
,
"stale interface subscribers"
);
msg_Err
(
p_
libvlc
,
"stale interface subscribers"
);
FlushMsg
(
&
QUEUE
(
i
)
);
...
...
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