Logo feature

Feature requests for VLC.
Hawaii Guy
Blank Cone
Blank Cone
Posts: 19
Joined: 20 Mar 2009 00:39

Logo feature

Postby Hawaii Guy » 23 Mar 2009 04:22

Is there any way to have VLC continuously read the logo image files? I need to change the image while the video is playing.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Logo feature

Postby VLC_help » 23 Mar 2009 14:44


Hawaii Guy
Blank Cone
Blank Cone
Posts: 19
Joined: 20 Mar 2009 00:39

Re: Logo feature

Postby Hawaii Guy » 24 Mar 2009 10:57

Thanks...I got this far and was able to get video going in full screen with a seperate DOS-looking command-line box. The intial entry I made was:

vlc -I rc c:\users\bryan\documents\test.xspf -L --no-video-title-show --mouse-hide-timeout=0 -A -f --sub-filter logo --logo-file c:\video\test2.png --logo-position=8

I tried this as well:
vlc -I rc c:\users\bryan\documents\test.xspf -L --no-video-title-show --mouse-hide-timeout=0 -A -f --logo-file c:\video\test2.png --logo-position=8 vcodec=mp4v

In the command box, I tried (based on your link to the example):
@logo logo-file c:\video\test1.png
Variable doesn't exist or isn't a command.
@logo logo-file dummy.png
Variable doesn't exist or isn't a command.
@logo logo-file
Not enough parameters.

How can I change VLC to grab the new .png file?

I tried longhelp in the commandline window and that gave me an example of @name logo-file file.name but that gave me different error codes. Can someone tell me what I'm doing wrong please?

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Logo feature

Postby VLC_help » 24 Mar 2009 16:43

Which VLC version you use?

Hawaii Guy
Blank Cone
Blank Cone
Posts: 19
Joined: 20 Mar 2009 00:39

Re: Logo feature

Postby Hawaii Guy » 25 Mar 2009 00:11

Which VLC version you use?
0.9.8a

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Logo feature

Postby VLC_help » 25 Mar 2009 17:05

There must be some bug in this.
If you start

Code: Select all

vlc -I rc --sub-filter "marq@test{marquee=Hello}"
then type

Code: Select all

add something.avi
you can change the text by typing

Code: Select all

@test marq-marquee Goodbye
But if you do same for logo

Code: Select all

vlc -I rc --sub-filter "logo@test{file=a.png}"
then type

Code: Select all

add something.avi
and try

Code: Select all

@test logo-file something.png
I also get Variable doesn't exist or isn't a command. But for example

Code: Select all

@test logo-x 100
works OK.

Hawaii Guy
Blank Cone
Blank Cone
Posts: 19
Joined: 20 Mar 2009 00:39

Re: Logo feature

Postby Hawaii Guy » 26 Mar 2009 09:06

There must be some bug in this.
If you start

Code: Select all

vlc -I rc --sub-filter "marq@test{marquee=Hello}"
then type

Code: Select all

add something.avi
you can change the text by typing

Code: Select all

@test marq-marquee Goodbye
But if you do same for logo

Code: Select all

vlc -I rc --sub-filter "logo@test{file=a.png}"
then type

Code: Select all

add something.avi
and try

Code: Select all

@test logo-file something.png
I also get Variable doesn't exist or isn't a command. But for example

Code: Select all

@test logo-x 100
works OK.
So you agree that this is a bug - are you going to report this bug?
Also, why are your entries not even close to the examples I have been told to follow, e.g. "logo@tgest{file=a.png}"

Thx.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Logo feature

Postby VLC_help » 26 Mar 2009 17:06

I just wanted to verify, that this isn't related to default name. That is why used test as name.
trac opened
http://trac.videolan.org/vlc/ticket/2606

jeanfirst
New Cone
New Cone
Posts: 2
Joined: 25 Aug 2009 17:59

Re: Logo feature

Postby jeanfirst » 25 Aug 2009 18:07

Short: As long as trac is down, here's a solution setting the logo-file in rc.

Long: logo.c sets up a new variable as VLC_VAR_STRING (i_type: 0x0040), __var_Create inserts the variable and finds out that it's the wrong type, should be VLC_VAR_FILE (i_type: 0x0042).

Maybe the wrong way to solve it, but it works.

Cheers
Jean

diff --git a/include/vlc_variables.h b/include/vlc_variables.h
index 0c3767c..5c5ac85 100644
--- a/include/vlc_variables.h
+++ b/include/vlc_variables.h
@@ -282,6 +282,13 @@ static inline int __var_SetString( vlc_object_t *p_obj, const char *psz_name, co
return var_SetChecked( p_obj, psz_name, VLC_VAR_STRING, val );
}

+static inline int __var_SetFile( vlc_object_t *p_obj, const char *psz_name, const char *psz_string )
+{
+ vlc_value_t val;
+ val.psz_string = (char *)psz_string;
+ return var_SetChecked( p_obj, psz_name, VLC_VAR_FILE, val );
+}
+
/**
* Set the value of a pointer variable
*
@@ -317,6 +324,7 @@ int __var_SetAddress( vlc_object_t *p_obj, const char *psz_name, void *ptr )
* __var_SetString() with automatic casting
*/
#define var_SetString(a,b,c) __var_SetString( VLC_OBJECT(a),b,c)
+#define var_SetFile(a,b,c) __var_SetFile( VLC_OBJECT(a),b,c)
/**
* __var_SetAddress() with automatic casting
*/
@@ -416,6 +424,15 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
return NULL;
}

+LIBVLC_USED
+static inline char *__var_GetFile( vlc_object_t *p_obj, const char *psz_name )
+{
+ vlc_value_t val; val.psz_string = NULL;
+ if( var_GetChecked( p_obj, psz_name, VLC_VAR_FILE, &val ) )
+ return NULL;
+ else
+ return val.psz_string;
+}

/**
* __var_GetInteger() with automatic casting
@@ -438,7 +455,7 @@ static inline char *__var_GetNonEmptyString( vlc_object_t *p_obj, const char *ps
*/
#define var_GetString(a,b) __var_GetString( VLC_OBJECT(a),b)
#define var_GetNonEmptyString(a,b) __var_GetNonEmptyString( VLC_OBJECT(a),b)
-
+#define var_GetFile(a,b) __var_GetString( VLC_OBJECT(a),b)


/**
@@ -541,6 +558,14 @@ static inline char *__var_CreateGetNonEmptyString( vlc_object_t *p_obj,
return __var_GetNonEmptyString( p_obj, psz_name );
}

+LIBVLC_USED
+static inline char *__var_CreateGetFile( vlc_object_t *p_obj,
+ const char *psz_name )
+{
+ __var_Create( p_obj, psz_name, VLC_VAR_FILE | VLC_VAR_DOINHERIT );
+ return __var_GetString( p_obj, psz_name );
+}
+
/**
* __var_CreateGetInteger() with automatic casting
*/
@@ -562,6 +587,7 @@ static inline char *__var_CreateGetNonEmptyString( vlc_object_t *p_obj,
*/
#define var_CreateGetString(a,b) __var_CreateGetString( VLC_OBJECT(a),b)
#define var_CreateGetNonEmptyString(a,b) __var_CreateGetNonEmptyString( VLC_OBJECT(a),b)
+#define var_CreateGetFile(a,b) __var_CreateGetFile( VLC_OBJECT(a),b)

/**
* Create a integer command variable with inherit and get its value.
@@ -643,6 +669,14 @@ static inline char *__var_CreateGetNonEmptyStringCommand( vlc_object_t *p_obj,
return __var_GetNonEmptyString( p_obj, psz_name );
}

+LIBVLC_USED
+static inline char *__var_CreateGetFileCommand( vlc_object_t *p_obj,
+ const char *psz_name )
+{
+ __var_Create( p_obj, psz_name, VLC_VAR_FILE | VLC_VAR_DOINHERIT
+ | VLC_VAR_ISCOMMAND );
+ return __var_GetString( p_obj, psz_name );
+}
/**
* __var_CreateGetInteger() with automatic casting
*/
@@ -664,6 +698,7 @@ static inline char *__var_CreateGetNonEmptyStringCommand( vlc_object_t *p_obj,
*/
#define var_CreateGetStringCommand(a,b) __var_CreateGetStringCommand( VLC_OBJECT(a),b)
#define var_CreateGetNonEmptyStringCommand(a,b) __var_CreateGetNonEmptyStringCommand( VLC_OBJECT(a),b)
+#define var_CreateGetFileCommand(a,b) __var_CreateGetFileCommand( VLC_OBJECT(a),b)

static inline int __var_CountChoices( vlc_object_t *p_obj, const char *psz_name )
{
diff --git a/modules/video_filter/logo.c b/modules/video_filter/logo.c
index 5c34d53..f44af56 100644
--- a/modules/video_filter/logo.c
+++ b/modules/video_filter/logo.c
@@ -259,7 +259,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_sub )
logo_list_t *p_list = &p_sys->list;

p_list->psz_filename =
- var_CreateGetStringCommand( p_filter, "logo-file" );
+ var_CreateGetFileCommand( p_filter, "logo-file" );
if( !p_list->psz_filename )
{

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: Logo feature

Postby VLC_help » 25 Aug 2009 22:17

jeanfirst: could you post your patch to mailing list?


Return to “VLC media player Feature Requests”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests