I am having trouble with the NSViewcontroller. Error says is of undeclared type 'NSViewController'. I did import scenekit and avfoundation. Seems as if NSViewController is unsupported.
I only code for Scenekit so don't know the entire apple foundation, but I use UIViewController for all of my scenekit games.
Related
I'm using Android studio 4.0, coding in Kotlin and I'm still really new at Android development.I need to integrate the Xzing barcode libray. I've copied some code from the tutorial at [https://tutorialwing.com/implement-android-qr-code-scanner-using-zxing-library-in-kotlin/][1]. The tutorial uses the following import statement:
import android.app.Fragment
I've modified a fragment that was generated with the Navigation Drawer Activity template. It uses the androidx fragment import statment:
import androidx.fragment.app.Fragment
The errors it occurs on the following line with the "this" reference:
qrScanIntegrator = IntentIntegrator.forFragment(this)
The error is:
Type mismatch: Required Fragment! found HomeFragment
Changing my import to the older version to the older version is not recommended and if I do I get a lot of other errors.
What can I do to get zxing to work with the androidx fragment?
Thanks
The ZXing library is no longer maintained, and that particular class (IntentIntegrator) only supports android.app.Fragment which is the deprecated Android framework version of the AndroidX Fragment class.
You have a few possible options here:
Fork the ZXing library, and change the android.app.Fragment import to use the androidx.fragment.app.Fragment version instead.
Delegate the IntentIntegrator calls to your Activity instead, and have the results forwarded to your Fragment.
Simply duplicate the Intent initialization code from IntentIntegrator to a helper class of your own. The IntentIntegrator methods are just convenience methods to build an Intent and call startActivityForResult(). You'll still be able to use the IntentIntegrator.parseActivityResult method to interpret the result that comes back.
I would recommend going with option #3.
As a longer term alternative, you may also want to consider looking into Firebase ML Kit since ZXing is no longer maintained.
I am trying to build a custom modified version of the
MicroSIP softphone.
Before any modifications, I can't build the version 3.19.18 using VisualStudio 2017.
I am able to compile successfully the previous minor version: 3.18.5
The error is:
1>c:\users\xxxxxxxxx\microsip\maindlg.cpp(1038): error C2065: 'PJRPID_ACTIVITY_ON_THE_PHONE': undeclared identifier
If I look at the code that uses that identifier I come across this, that is new in 3.19:
case PJSUA_BUDDY_STATUS_ONLINE:
if (buddy_info.rpid.activity == PJRPID_ACTIVITY_ON_THE_PHONE) {
image = MSIP_CONTACT_ICON_ON_THE_PHONE;
if (PjToStr(&buddy_info.status_text).Left(4) == _T("Ring")) {
ringing = true;
If I look at the type of "buddy_info.rpid.activity" it's of type "pjrpid_activity" That is defined in "rpid.h" from the SIP library "pjsip" :
typedef enum pjrpid_activity
{
/** Activity is unknown. The activity would then be conceived
* in the "note" field.
*/
PJRPID_ACTIVITY_UNKNOWN,
/** The person is away */
PJRPID_ACTIVITY_AWAY,
/** The person is busy */
PJRPID_ACTIVITY_BUSY
} pjrpid_activity;
No 'PJRPID_ACTIVITY_ON_THE_PHONE' defined here. And that string can't be found anywhere else on that project.
This enum is part of the Open Source project pjsip which is currently on version 2.9.
I tried to look back into earlier versions to find out if that enum evolved and had the correct elements. No luck.
It looks like they are using a modified version of the pjsip library, but I can't find a link, a mention or anything that would help me to find out what is that missing dependency.
More than that, MicroSIP.org will charge you $95 to obtain a customized version including "source code and assistance with compilation if needed".
Of course it is needed if they keep secret the dependencies.
Anyway, MicroSIP is statically linked to the unknown pjsip library variant.
Microsip and PJSIP are both licensed under the GPLv2.
My question is: How to find out my missing dependency?
Are they required to disclose that information?
Does anyone know about a fork of pjsip that would be the one I am looking for?
Better, Has anyone been able to somehow compile MicroSIP, ver >= 3.19.0?
To build any distribution of Microsip, you should build pjsip first. Therefore you should set some source and library paths for the Microsip project. Then you can build cleanly. It may be that some library is missing like opus, etc... and you may need to find the current version of these and build them beforehand as well.
I came to see that you must be having different platform toolset for MicroSIP and PjProject. Try to build it from starting using the same build tool and platform toolset for the both of your project, it will automatically clear several issues.
this is somenthing I was trying to solve for HOURS, but I don't get why this is not working.
First of all, I'm trying to do a release for neko or windows in Flash Develop. My project is a OpenFl one, and the language is Haxe 3.
What I have installed:
actuate: [1.8.6]
flixel-addons: [2.3.0]
flixel: [4.2.1]
hxcpp: [3.4.64]
lime: [2.9.1]
nape: [2.0.20]
openfl: [3.6.1]
And yes; I'm using haxeFlixel.
When I try to do a release in windows or neko, these errors appear:
-E:/HaxeToolkit/haxe/lib/openfl/3,6,1/openfl/_internal/renderer/opengl/utils/SpriteBatch.hx:12: characters 7-28 : Module openfl.display.Shader does not define type Shader
-E:/HaxeToolkit/haxe/lib/openfl/3,6,1/openfl/_internal/renderer/opengl/utils/SpriteBatch.hx:12: characters 7-28 : For function argument 'ax'
-src/skill/SkillLogicProjectil.hx:13: lines 13-54 : Defined in this class
-E:/HaxeToolkit/haxe/lib/openfl/3,6,1/openfl/_internal/renderer/opengl/shaders2/Shader.hx:11: characters 7-28 : Module openfl.display.Shader does not define type Shader
The most funny thing is: I'm not even using Shader in SkillLogicProjectil. That class only creates a sprite that follows a Player and has a var with the sprite that represents the skill.
If I comment this class, the error is in another class, and finally ends in my GameState.
This error doesn't appear when I do a release in html5. In html5 there are no problems with the release, but I canĀ“t make the game load without Flash Develop running the process in http://localhost:2000/. I need to make a release that can be opened with a computer, without using Flash Develop to open it.
What can I do?.
The new version of Flixel supports Haxe 3.4.3 and OpenFL 8, have you given these versions a try?
I'm trying to get the PCL Visualizer demo examples to work (all code here: http://pointclouds.org/documentation/tutorials/pcl_visualizer.php) for Windows, PCL 1.6, 32 bits version.
It works fine except for the Interaction Customization part, which is ironically the one i'm most interested on. An unhandled exception occurs at the spinOnce(100) line on the main method. From the long search I've done, it looks like it is deeply connected to VTK not being thread safe and keyboard/mouse callbacks interfering with the VTK window. However, I don't think I've completely understood this and could be mistaken. I have found a very similar question here in stackoverflow (using "pcl::visualization" in different threads from different instance of a class) and I tried using scoped_locks around the spinonce, as he suggests, but I think I'm not doing it right.
Has anyone managed to fully use this example on win32? For reference, here is my poor attempt at locking the spinonce:
while (!viewer->wasStopped ())
{
boost::mutex vis_mutex; //storage for static lock
boost::mutex::scoped_lock lock(vis_mutex);
viewer->spinOnce ();
boost::this_thread::sleep (boost::posix_time::microseconds (100000));
}
Thanks in advance!
I am afraid that it may be related to the version of PCL.
Tutorials are made to match latest versions of PCL and since 1.6 things might have changed.
I recommend you to update to the latest PCL from github. (actually I use code from this tutorial on win64 right out of the box, no issues)
Very soon we are going to work on a project with open source s/w that does many things and one of the modules concerns with capturing live feed from a usb based camera for upto 48 hours and overwriting it in a nonstop loop. This would be going on in parallel with other operations in the application. We also have to display the captured feed of the least 48 hours to the user as a menu option.
I would like you all to suggest a suitable open source technology stack taking into account the audio/video part of the module, without this feature I can definitely use Qt to do my stuff but with this feature that becomes a difficult proposition. I have developed GUI applications with Qt on Linux platform but haven't been able to come up with something that can record and display video in an application. Qt has phonon but setting it up is a nightmare. Earlier some of you had suggest v4linux. I tried to compile the sample program capture.c on RHEL 4 machine and it gave the following errors.
usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:436: warning: no semicolon at end of struct or union
/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:436: error: syntax error before '*' token
/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:438: error: syntax error before '*' token
/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:438: warning: data definition has no type or storage class
/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:439: error: syntax error before '}' token
/usr/src/kernels/2.6.9-5.EL-i686/include/linux/videodev2.h:810: error: field `win' has incomplete type
So hit a dead end, besides I haven't come up with concrete workable examples for the same. Also the website isn't being updated frequently suggesting a stagnancy in development process.
Since the application will be graphical with menu based user interaction, it would need to use Qt or something similar to it for the graphical part. The headache is I haven't been able to figure out, how I can implement/integrate the video capture/display feature in a dummy application (my try was with Qt may be some of you have done it with some other library or language).
EDIT:
Was able to compile the program by importing a local copy of videodev2.h and adding define statement to include a __user macro. But now it won't run as it cannot find /dev/video device. So again stuck at a dead end in video4linux
You could try the FFmpeg family of libraries. As of fairly recently (I think), it also comes with the libavdevice library that supports V4L and V4L2 for video capture, and it shouldn't be very difficult to build a FFmpeg pipeline to read video from an avdevice source and write it using avcodec and avformat into a file...
gstreamer is a very capable multimedia stack for capturing, and pygst and PyQt4 bindings exist for use in Python.
If it said "can't find /dev/video", that is because Linux numbers the devices.
If you would have looked in the .c file you would have seen there were several arg_opts
as -d ... (where ... would become /dev/video0) or you can go in the .c file and add a 0 to /dev/video, you'll find it somewhere about line 590 in the beginning of int main.