Logo appears for only a second and then disappears - c

I am trying to display a logo on top of a video played with libvlc (2.0.2). I tried to find some documentation, but I had no luck. Here is the best attempt I could come up with:
libvlc_video_set_logo_string(m_player->core(), 1, "logo_1365886316.png"); //logo file path (I've also tried logo_1365886316.png,0,5000)
libvlc_video_set_logo_int(m_player->core(), libvlc_logo_x, 500); //x-coordinate
libvlc_video_set_logo_int(m_player->core(), libvlc_logo_y, 100); //y-coordinate
libvlc_video_set_logo_int(m_player->core(), libvlc_logo_opacity, 255);
// I've tried with the following, but I had no luck.
//libvlc_video_set_logo_int(m_player->core(), libvlc_logo_repeat, -1);
//libvlc_video_set_logo_int(m_player->core(), libvlc_logo_delay, 6000);
libvlc_video_set_logo_int(m_player->core(), libvlc_logo_enable, 1);
What is happening is that my logo is visible for few milliseconds or so, and then it disappears. If I try to initialize logo again, nothing is showing up. Also, if this is important, I am initializing logo after video has been started.
I don't know why this is happening. As per various forum posts, I am doing everything ok, and I am not initializing anything on the stack so it can be freed after I exit init function.

It's not broken! It's working for me. You have to add the option --sub-filter=logo to your options array that you pass to libvlc_new().

The official VideoLAN forum seems to provide the answer you needed: the logo feature is probably broken in VLC 2.0.X (source).
Also, another thread on the same forum seems to confirm that you are doing the right thing when you wait for the video to be playing to display the logo (at least, you know it does not come from you).
I think you simply should consider the feature broken for now and hope someone will provide a patch someday. Unless you feel like writing this patch by yourself.
EDIT: And by the way, I checked the vlc-devel mailing list from the date of the forum message (october 2012) to today, and did not find anything about a possible patch. The only thing that I found about the logo functions was a message stating that some other logo-related feature appears not to work since 2.0.3 (which was also the version cited in the forum post I shared in this message).

Related

CodeceptJS/Puppeteer only sees elements during paused sessions

I'm having a very frustrating problem with testing a React app using CodeceptJS and puppeteer - it only finds elements with a custom locator only when in paused mode.
My custom locator is data-test-id. I'm targeting elements using I.seeElement("$id-of-element-here") and I.seeNumberOfElements("$test-id", X).
This works perfectly when my tests are paused and I'm manually moving onto each step of the test, but does not work when the tests are executing from start to finish - targeted elements are simply not found.
Sometimes I can counter this with I.wait(X) or I.refreshPage() but I'm now running into a case where none of this helps.
I do see the data-test-id attributes in the HTML using both Chrome's and Chromium's dev tools. There are no typos either.
There's not much point in showing examples of targeted elements, as the problem seems to happen at random, I haven't been able to see any pattern of where/when this happens.
These are the settings of the custom locator plugin, in codecept.conf.js:
plugins{
...
customLocator: {
enabled: true,
attribute: 'data-test-id',
},
...
}
Any help will be appreciated! :)
May waitForNavigation is a way to go?
https://codecept.io/helpers/Puppeteer/#configuration
https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagewaitfornavigationoptions
Solution:
I was running the assertions in question in a rather big within block (link), so I was ending up looking for something within an element that was no longer on the page.
It appears that during a pause(), you can find and operate on elements that are visible at the moment and the within blocks don't matter.
That's the only way I can explain why, in this situation, an element can be detected during a pause but not during the actual execution of the test from start to finish.
As soon as I moved the assertions out of the within block, everything was normal and behaved as expected.
Apologies for the confusion - learning every day... :)

CheckBox.setToggleButton doesn't exist

i have been trying a code found here to add rating bar but i got an error on
cb.setToggleButton(
where the "setToggleButton" method didn't or doesn't exist anymore
any idea if it has been update cause the post i tagged was back from 2014
That method doesn't exist, it should be setToggle(true). Notice in the linked post it just said setToggleButton( without even a closing bracket. Since this was written a while back I'm guessing I just switched a desktop to check the method name and got distracted then forgot to fix that. Hazards of blind coding without the comfort of an IDE.
#devcrp actually wrote the correct answer before but unfortunately he deleted it. If he undeletes it his answer should be accepted.

Nothing happening when I click Post Comment button (ThinksterIO:Real Time Webapps tutorial)

I ran into another snag while going through the ThinksterIO Learn to Build Real Time Webapps tutorial around the 90% mark where one is shown how to add and delete comments:
https://thinkster.io/angulartutorial/learn-to-build-realtime-webapps/#adding-comments-functionality-to-the-post-service-9
Every time I click the Post Comment button absolutely nothing happen and I simply can't figure it out. I am expecting some kind of error to show up but nil. It's as if the button is not hooked up to the function. I was so frustrated that I eventually just copy and pasted the code from the tutorial to make sure I had it down right. Even after doing that it still didn't work.
I've created a Plunker with this app running over here http://embed.plnkr.co/OhzDTU/preview
You can sign in with the email user#user.com and 1234 password. You will then be able to try to comment on posts. Any ideas on what is going wrong here?
UPDATE
I took away the user user#user.com and 1234 password since problem is now fixed.
Your add comment button is in showpost.html, which is rendered by PostViewCtrl. However, your addComment method is attached to the scope of PostsCtrl (it doesn't exist when you try to click it). The simplest answer here is just to move addComment() over to the other controller.
Regarding the lack of error messages, I don't think that you can get an error for this. I had a look at the docs for $log and tried to decide if you could add some debugging output, but it looks like it's already on (i.e. the lack of a method seems to fail silently).
About your only option here is to try something like {{addComment|json}} in the view to see if it exists, but you'd first have to suspect that it didn't.

Cycle2 - SwipeUp

I really need some help with this if anyone out there cares to be my life saver! I am using Cycle2 to do a feature and I am trying to apply swipe for iPad and iPhone. I have tried TouchSwipe, Wipetouch and the debugged version of CycleSwipe.
Here is the problem, my slider is Vertical and I want a SwipeUp and SwipeDown commend. I have spent a whole working day trying to get this and I just cannot get it working! Can anyone tell me how I can get a SwipeUp and Swipe down command for Cycle2? Also is it possible for the movement to be a little smoother?
My feature is using full bleed images.
I'm not too sure about, but I think it works: http://jquery.malsup.com/cycle2/demo/swipe.php
By the way, you can use Hammer.js to capture swipe gestures: http://eightmedia.github.io/hammer.js/
old question, but still.
I've made a patch a year ago to malsup's swipe plugin, that you can find here: https://github.com/walidvb/cycle2/commit/0c53a8972642ae90b865aae45d61f19aba807366#diff-0
That never made it to malsup's plugin unfortunately, but there you have it :)

CEF disable address bar

I am using CEF3 and want to hardcode and disable the address bar of the browser. I am not finding the right place in the code base to do the same. Any pointers would be of great help.
Either through the C++ or Javascript methods would help.
Thanks,
Ashwin
Are you using cefclient? I don't think there's a clean way to turn it off in the standard version of cefclient.
However, in the brackets-shell fork of cefclient there's a #define you can use to toggle it on/off cleanly. Just search for references to SHOW_TOOLBAR_UI (it's only used in four files). I'm guessing it wouldn't be too hard to manually apply those diffs back onto a clean copy of cefclient (you probably don't want to take the brackets-shell fork as-is – it's not very generic).
You can build a CEF application using the binary, just like the WIKI does. Please see the github project for a reference https://github.com/acristoffers/CEF3SimpleSample
I realize this question is old but I had the same question and found the solution.
In the cefclient example, the address bar is drawn within the RootWindowGtk::CreateRootWindow function.
Delete the gtk_container_add function call that adds the GtkToolItem* corresponding to the address bar and the address bar will be gone.

Resources