Windows MCI multimedia interface implements wave/mdi/mpeg(mp3) multimedia playback

Operating system interface functions: mciSendString example: Win32Mci mci(“C:\Morning Sword Dance_Haoqing Jiuzhou.mp3”); mci.Play(); head File: #pragma once #include <iostream> #include <string> namespace ppp { namespace win32 { class Win32Mci final { public: enum class PlayState { Closed, Stopped, Paused, Playing, NotReady, Open, Recording, parked, Seeking, }; public: explicit Win32Mci(const std::string & amp; path); ~Win32Mci() noexcept; public: […]

[MIL]MdigProcess C# routine development

1. Development environment VS2019 + C# + Windows10x642. Reference inclusion Matrox.MatroxImagingLibrary.dll3. Code Refer to the MdigProcess C# routine in the official directory key member variable private const int BUFFERING_SIZE_MAX = 20;//The size of the buffer queue public MIL_ID MilDigitizer; public MIL_ID MilImageDisp; public int ProcessedImageCount; public string FilePathName = “D:\1”;//The location of automatic image storage4. […]

Use SharpZipLib to compress the entire directory (i.e. generate a storage directory in the compressed file) [This can be easily achieved using the built-in ZipFile.CreateFromDirectory starting from .Net4.5]

In projects starting from .Net 4.5, we can introduce the System.IO.Compression and System.IO.Compression.FileSystem (required to use the static class ZipFile) assemblies In this case, it is easy to compress the entire directory using the following static method: ZipFile.CreateFromDirectory //Note that the System.IO.Compression.FileSystem assembly needs to be introduced For projects before .Net 4.5, third-party compression libraries […]

C# Winform Programming (4) Multiple Document Window (MDI)

Multiple Document Window (MDI) Create multiple document windows Use form parameter definitions to pass values Avoid opening the same subwindow repeatedly Passing data through class attributes Create multiple document windows Add a menu and set IsMdiContainer to True: From window add menu Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; […]

nginx+rtmp+yamdi image production

Make nginx image based on alpine:3.14 image, support rtmp protocol, save live video, and add metadata to support progress bar. nginx download address: http://nginx.org/en/download.html nginx-http-flv-module download address: https://github.com/winshining/nginx-http-flv-module yamdi download address: https://sourceforge.net/projects/yamdi/files/yamdi/1.9/yamdi-1.9.tar.gz/download Create dev image FROM alpine:3.14 LABEL MAINTAINER huhongbin RUN echo “https://mirrors.aliyun.com/alpine/v3.14/main/” > /etc/apk/repositories & amp; & amp; \ echo “https://mirrors.aliyun.com/alpine/v3.14/community/” >> /etc/apk/repositories RUN […]

Use mkbootfs to create a ramdisk root file system

Environment Qemu:QEMU emulator version 3.1.0 Linux: Linux-4.14.13 Toolchain: arm-none-linux-gnueabi-gcc (gcc version 4.8.3 20140320) Android:7.1.2 busybox: BusyBox v1.24.2 Overview The root file system used by the Android system is made with mkbootfs and minigzip. mkbootfs is used to package the root file system into cpio format. It can also be packaged using the cpio tool. In […]

[Comprehensive explanation of Linux commands] 023.rmdir command: a powerful tool for deleting empty directories

Article directory rmdir Additional information grammar Options parameter Example Learn `python` from scratch rmdir Used to delete empty directories Supplementary instructions The rmdir command is used to delete empty directories. When a directory is no longer used, or the disk space has reached the usage limit, you need to delete the directory that has lost […]