LibVLC: marquee and full screen issues - libvlc

I am currently trying to use LibVLC to play videos and have some questions:
On a computer with multiple screens, how do I tell LibVLC to show full screen on a specific screen?
I try to use libvlc_video_set_marquee_int. After some trail and error I found out, that it works when I pause the main thread after starting the video for about 70ms before setting a marquee text. Why? How can I do this better?
I want to show a marquee text, but no video title (LibVLC displays the video title or file name in the beginning). I read that you could disable the video title by passing the --no-video-title-show option to libvlc_new(). However this has two problems: First the documentation says one should not pass options. Well, ok... But secondly using this option has a strange effect on marquee texts: You can set a text, but it just blinks once and disappears immediately, no matter what libvlc_marquee_Timeout is set to.

Just this morning I think I got to the bottom of it with the help of the folks over at videolan forums. I should mention that I am working on linux system, I don't know what OS you are using, but I know there are some differences. Here's what I did:
First, I found it useful to get the marquee working on the command line first. Here is a link to the discussion on this topic:
http://forum.videolan.org/viewtopic.php?f=13&t=110743
The command line options that worked for me:
cvlc --extraintf=http:logger --verbose=2 --file-logging --logfile=vlc-log.txt --sub-source="marq{marquee=marquee text here}" test.mpg
I had an issue along the way where even with the above command I could not get the marquee to show. On my gentoo system I needed to rebuild vlc with fontconfig and truetype enabled.
Now with cvlc displaying a marquee on a video, I moved back to libvlc. I was missing something, so I started another discussion here:
http://forum.videolan.org/viewtopic.php?f=32&t=110783
The snippets of C / libvlc code that ultimately allowed me to show a marquee on demand without the filename marquee are provided below.
In main:
const char * const vlc_args[] = {
"--extraintf=http:logger",
"--verbose=1",
"--file-logging",
"--logfile=/home/user/data/logs/vlc",
"--no-video-title-show", // <- this option disables the filename marquee
"--sub-filter=marq"}; // <- this option allows the on demand marquee to display properly
vlc_inst = libvlc_new (sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);
In keypress callback:
libvlc_video_set_marquee_int(media_player, 0, 1); /* enable marquee */
libvlc_video_set_marquee_int(media_player, 6, 32); /* set marquee font size */
libvlc_video_set_marquee_int(media_player, 7, 2000); /* set marquee timeout (ms) */
libvlc_video_set_marquee_string(media_player, 1, "on demand marquee string here");
Hopefully some of this will help you get a working solution.

Related

DirectX-based game display always on top. Need solution

You can see the video of the problem below. When I press the Minimize button, the screen disappears, but when you put the other window on top without pressing the Minimize button, the screen will not be covered and it will always float on top. This problem did not occur in Windows 7, but it occurs after upgrading to Windows 10.
Problem video
I would like to know the DirectX initialization code for the function or function argument related to this problem. (As far as I know, this game uses DirectX 9.)
Additional Information
Based on Castorix's advice, I used the Spy ++ program to test it. Below is the result screen.
The problematic program consisted of two windows, a parent window and a child window. The parent window style consists of WS_CAPTION, WS_MINIMIZE, WS_VISIBLE, WS_CPLISIBLINGS, WS_SYSMENU, WS_OVERLAPPED, WS_MINIMIZEBOX, WS_MAXIMIZEBOX, 0x00008000. And the child window style consists of WS_CHILDWINDOW, WS_VISIBLE, WS_BORDER.
Additional Information 2
If you look carefully at the above video, when the game window goes under the notepad window, the game title bar is hidden, but you can see that the game screen is always on top instead of just being covered.

Programmatically make app FULL SCREEN in PySimpleGUI

How to make PySimpleGUI app to be open in full screen, what I mean taking up the entire screen, not even leaving the task bar at the bottom of the screen?
This app will be running on Debian 8.
How to do this?
[EDIT May 2021 - This is an old answer. The method naming is different now. The coding conventions have changed. The documentation and examples on the PySimpleGUI GitHub have all been updated, bu StackOverflow of course has not. The result is that if you're copying code from StackOverflow, you're instantly behind. You're missing out. It'll run because PySimpleGUI is highly backward compatible, but it's not the recommended calls anymore]
Call window.Maximize() to make your window maximized as if you clicked on the titlebar to make it full screen. There are no parameters.
Make sure your window is fully created by adding .Finalize() to the end of your Window creation call like this:
window = sg.Window('Window Title', layout).Finalize()
window.Maximize()
If you want nothing at all showing except your application, then turn off the titlebar, set location = (0,0) and size=(width, height) of your screen. It won't hurt to turn on the keep_on_top parameter, unless you're planning on multiple windows.
Something like this (change the size to match your screen):
window = sg.Window('Window Title', layout, no_titlebar=True, location=(0,0), size=(800,600), keep_on_top=True)
We can also fix this problem by giving parameter 'resizable' to 'True'.
window = sg.Window('Window Title', layout, resizable=True)

full screen video play back on nivo lightbox

I am using the nivo lightbox in my theme I have added a youtube video link , when user clicks on button video starts to play. But it is not playing on full screen. How can I make the video play full screen on nevo lightbox? thanks
I noticed that nobody gives an answer to this question anywhere and I needed it too. Vimeo goes fine but Youtube specically needs the iframe's allowfullscreen="true", so I looked into the code of jquery.nivo.js (and/or jquery.nivo.min.js if you use it). search for "$('<iframe>', and add the option allowfullscreen: true,
Do this search twice and repeat this addition a second time further down. allowfullscreen: 'true', gives the same result, no problem. Whether a boolean (true) or a string ('true') doesn't matter. jquery picks up the additional option flauwlessly and youtube videos will show their fullscreen button nicely. It was probably forgotten by the makers of the nivo lightbox. To add it in the min.js I simply broke the single line in two parts, search for the var and added the option without spaces, after which I concatenated the two parts back again. Works flawlessly. I've used the boolean method but have no special reasons. It may be a fraction faster than the string.

is there a way to flush the page cache? (window.init and audio autoplay won't work)

If I have an interactive widget that has something like
window.init = function() {alert('foo');};
or
<audio src="foo.mp3" autoplay="" loop=""></audio>
then when I close the interactive widget and bring it back up again, the init() doesn't run again and the audio won't automatically play.
In the case of audio, the sounds stops playing when you close the interactive widget. When you reopen the interactive widget, the sound does not start playing automatically.
However, if I page left or right a few pages (until I see the "loading..." indicator), then the interactive widget cache gets flushed. I can then go back to the page with the interactive widget and the init() will run and audio will play again.
(Note that for <audio> to have a sound play automatically and loop, the autoplay and loop properties just have to exist. The value of those properties doesn't matter so I can just have quote quote)
Is this a known problem with ibooks?
Is there any way to force that cache flush?
You could try setting a function on widget.didEnterWidgetMode (more documentation here) that resets the progress when the widget gets opened again.
edit: So if you look at this Apple thread on widget creation for iBooks Author, they mention adding a Javascript snippet for AppleClasses/AppleWidget.js. The code for that file is here (at least, according to someone on the internet :)), and in that file there's the same widget.didEnterWidgetMode function.

Strange LWUIT Dialog behaviour while using Dialog.showPacked() with BorderLayout.CENTRE positioning

I am using LWUIT for series 40 for making my J2ME app and I have noticed a strange behavior of the LWUIT-Dialog while using the showPacked() method, the dialog being positioned with BorderLayout.CENTER.
This happens especially in touch phones.
I have attached an image in order to describe my situation.
Initially the dialog appears as shown in the first part of the image.However,it expands in the next few seconds to become like the one shown in the second part of the image.
Future calls to display the dialog using showPacked appears like the third one.I am clueless as to why this is happening.I want my dialog to appear like the one shown in the first half of the image all the time.Where have I gone wrong?
Note : The content of the Dialog is a an animated label.
I have no idea what the guys did there but I'm guessing they reflow the UI too aggressively. Try setting Dialog.setAutoAdjustDialogSize(false) and see if it solves your problem.
You can remove the title and background et al. with the code below, it makes only your animated GIF show with the dimmed dialog background :
setTitle(" ");
setUIID("Null");
setDialogUIID("Null");
getStyle().setBgTransparency(0);
getSelectedStyle().setBgTransparency(0);
getUnselectedStyle().setBgTransparency(0);
getPressedStyle().setBgTransparency(0);
getDialogStyle().setBgTransparency(0);

Resources