[vlc-devel] commit: Create OSD menu as a custom object ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Mar 29 12:05:55 CET 2008
vlc | branch: master | Rémi Denis-Courmont <rem at videolan.org> | Sat Mar 29 13:06:01 2008 +0200| [aaf55bf8e4f5066624e63ecb5f9efbef564a3548]
Create OSD menu as a custom object
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aaf55bf8e4f5066624e63ecb5f9efbef564a3548
---
src/misc/objects.c | 5 -----
src/osd/osd.c | 4 +++-
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 7479b55..cc5120b 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -53,7 +53,6 @@
#include "vlc_codec.h"
#include "vlc_filter.h"
-#include "vlc_osd.h"
#include "vlc_meta.h"
#include "variables.h"
@@ -310,10 +309,6 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
i_size = sizeof( announce_handler_t );
psz_type = "announce";
break;
- case VLC_OBJECT_OSDMENU:
- i_size = sizeof( osd_menu_t );
- psz_type = "osd menu";
- break;
case VLC_OBJECT_INTERACTION:
i_size = sizeof( interaction_t );
psz_type = "interaction";
diff --git a/src/osd/osd.c b/src/osd/osd.c
index b890244..1dea9bb 100644
--- a/src/osd/osd.c
+++ b/src/osd/osd.c
@@ -67,8 +67,10 @@ static vlc_bool_t osd_isVisible( osd_menu_t *p_osd )
static osd_menu_t *osd_ParserLoad( vlc_object_t *p_this, const char *psz_file )
{
osd_menu_t *p_menu;
+ static const char osdmenu_name[] = "osd menu";
- p_menu = vlc_object_create( p_this, VLC_OBJECT_OSDMENU );
+ p_menu = vlc_custom_create( p_this, sizeof( *p_menu ), VLC_OBJECT_OSDMENU,
+ osdmenu_name );
if( !p_menu )
{
msg_Err( p_this, "out of memory" );
More information about the vlc-devel
mailing list