MediaStreamTrack - set source --W3C Documentation missed reference - webrtc

While reading trough the documentation i got a hint that it is possible to add source from local media(video/audio) file and stream it using PeerConnection.
But the sentence:
Note that this document describes the use of microphone and camera type sources only, the use of other source types is described in other documents.
So, does does someone has these documents?

Take your pick from https://github.com/w3c/?query=mediacapture
https://w3c.github.io/mediacapture-fromelement/
https://w3c.github.io/mediacapture-depth/
https://w3c.github.io/mediacapture-screen-share/
And of course http://w3c.github.io/webrtc-pc/ can be a source itself.

Related

Sub VI connector for different cluster types

I want to program an API to generate JSON files.
The standard Labview VI "Flatten to Json" has the connector "anything" which I also want to use.
How is that possible?
https://www.ni.com/docs/de-DE/bundle/labview-2020/page/glang/flatten_to_json.html
Use the existing JSONText library found in LV2019 and later. The subVIs therein are malleable VIs that do exactly what you're requesting. If for some reason you don't like how they work, they're open source and editable.

journald *reading* API?

journald writes binary log files; and their format is explicitly subject to change.
The Journald Reference Guide tells us, quote:
While it can be useful to get used to journalctl to read logs, it’s by
no means mandatory.
So, how can we read these files? Is there a journald reading API I missed? I couldn't find any yet.
Systemd (and journald) are written in C. They come with sd-journal.h header file and with C-API https://www.freedesktop.org/software/systemd/man/sd_journal_next.html# - sd_journal_open allows you to open logs and then read from them.
Other languages - https://www.freedesktop.org/software/systemd/python-systemd/journal.html#example-polling-for-journal-events https://github.com/nyantec/rust-journald - most probably build on top of the C api.
Moreover, journald is open source - https://github.com/systemd/systemd/blob/968680b23d1629d33deeea98b4f2b5fd106075b5/src/libsystemd/sd-journal/sd-journal.c#L1916 - and the file format is documented - https://www.freedesktop.org/wiki/Software/systemd/journal-files/ . You can re-implement your own API on top of system-specific I/O operations to read journal files.

Configure .eds file to map channels of a CANopen Client PLC

In Order use a PLC as a Client (formerly “Slave”), one has to configure the PDO channels, since the default values of the manufacturer are often not suitable. In my case, I need the PDOs so send INT valued instead of the default UNSIGNED8 (see. Picture).
Therefore my question: What kind of workflow would you recommend, to map the CANopen Client PDO channels?
I found the following workflow suitable, however I appreciate any improvements and recommendations from your side!
Start by locating the .eds file from the manufacturer. The image show this in the B&R Automation Studio Programming Environment
Open the file in a eds. Editor. I found the free Vector CANEds Editor very useful. Delete all RxPODs and RxPDO mappings that you don’t need.
Assign the needed Data Type (e.g. INTEGER16) and Channel Name (“1 Byte In (1)”).
Add the necessary PDOs and PDO mapping from the database. (This might actually be a bug, but if you just edit the PDOs without deleting and recreating them, I always receive error messages)
Map the Date to the Channels
Don't forget to write the number of channels in the first entry (in this image: 1601sub0)
Check the eds file for Errors (press F5) and copy&paste the eds file to the original location point 1.)
Add the PLC Client device in Automation Studio and you should see the correct mappings.
(PS: I couldn't make the images smaller ... any recommendations about formating this question are welcome!)

Sending Data to OpenSplice (DDS)

I'm new to DDS and opensplice, so this may be simple, but I don't understand it.
I am reading about reader caches and writer caches in the opensplice documentation. I understand that data goes into the datawriter cache and is then sent to datareader caches. But how do you push the information you have to the datawriter cache in the first place?
Is there a seperate command for that or does data automatically get sent to the cache when you publish or subscribe a device or application to a topic?
I guess in all, my question is, how does data get into opensplice/ the datawriter cache?
I appreciate any help. Like I said, I've been reading through tutorials and reference guides. I see plenty about what happens when the info is in opensplice, but I can't figure out how you put it there. If possible, could you link to an example too please?
Thanks
Actually .. its as simple as doing a write() or read() for your topic, so its a straightforward API call to provide 'samples' to DDS (i.e. publishing data) or to extract 'samples' from DDS (i.e. reading subscribed data).
As Reinier suggested too, it typically helps to look at some of the bundled examples (you could start with the famous 'HelloWorld") on how to create the publisher/subscriber and reader/writer 'entities' that allow you to interact with DDS from your application (in its 'language of choice')
Note: the examples are located here (for a 32-bit linux installation):
/HDE/x86.linux/examples/dcps/
The source for the Helloworld example (for Java) would then be here:
/HDE/x86.linux/examples/dcps/HelloWorld/java/src

.scr file and APDU

I am using JCard sim, java card version 2.2.2 and I want to know how the .scr file is associated with the .java file. (the java card simulator on NetBeans IDE. I am not using an actual smartcard).
If someone can provide me with some useful links on how these two files are related, I would greatly appreciate it.
I have looked through the following links, but they were not specifically helpful in illustrating how I can modify the .scr file in association with my .java file
C H A P T E R 5 - Converting Java Class Files
How to write a Java Card applet: A developer's guide - JavaWorld
Basically what I am trying to do is create a test applet (without the need of .scr files to send and receive APDUs by my other files)
- I want to be able to read APDU which contains the the parameters for a function in my process method
- That function will then create another APDU as its output, which another function will read as one of it's parameters
As far as I understand, the .scr file is used to send command APDUs that is read by the applet, but there is no way to write to the .scr file.
How can I create my own .java test file that sends and receives APDUs instead of relying on the .scr?
I can provide more details of what my code looks, if absolutely required.
Thanks
You can communicate with the simulator using the method described in the quick start guide of jCardSim. It is also described how to select an Applet using the correct AID in there. The inherited process(APDU) method will receive any APDU send using the methods described in the quick start guide, starting with the SELECT by NAME APDU (INS = A4). After that it is normal APDU processing.