• 那是云首页
  • 快捷导航
  • 更多
    设为首页收藏本站
  • |
花生壳

0

精华

1

回帖

9

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
8
精华
0
今天天气不错 发表于 2020-7-20 19:53 来自 中国浙江台州
试试看行不行,上一篇下载的FFMPEG 不能替换,
回复 支持 反对 印象

使用道具 举报

0

精华

80

回帖

547

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
506
精华
0
whxwlg 发表于 2020-7-23 06:47 来自 中国山东淄博
感谢楼主分享哇!啥也不说了,
回复 支持 反对 印象

使用道具 举报

0

精华

81

回帖

1277

积分

发烧玩家

Rank: 2

云币
0
贡献
64
活跃
915
精华
0
slaiyan 发表于 2020-7-23 15:03 来自 中国湖南衡阳
我来学习学习,谢谢分享
回复 支持 反对 印象

使用道具 举报

0

精华

22

回帖

233

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
222
精华
0
wgb786217286 发表于 2020-7-24 14:24 来自 中国山东日照
6++++++++++++++++++++++++++++++++++++++++++++++++++++++
回复 支持 反对 印象

使用道具 举报

0

精华

18

回帖

146

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
137
精华
0
wskoman 发表于 2020-7-25 10:56 来自 中国浙江台州
#include <libudev.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
#include <unistd.h>

int main (void)
{
struct udev *udev;
struct udev_enumerate *enumerate;
struct udev_list_entry *devices, *dev_list_entry;
struct udev_device *dev;

/* Create the udev object */
udev = udev_new();
if (!udev) {
  printf("Can't create udev\n");
  exit(1);
}

/* Create a list of the devices in the 'hidraw' subsystem. */
enumerate = udev_enumerate_new(udev);
udev_enumerate_add_match_subsystem(enumerate, "block");
udev_enumerate_scan_devices(enumerate);
devices = udev_enumerate_get_list_entry(enumerate);
/* For each item enumerated, print out its information.
    udev_list_entry_foreach is a macro which expands to
    a loop. The loop will be executed for each member in
    devices, setting dev_list_entry to a list entry
    which contains the device's path in /sys. */
udev_list_entry_foreach(dev_list_entry, devices) {
  const char *path;
  
  /* Get the filename of the /sys entry for the device
     and create a udev_device object (dev) representing it */
  path = udev_list_entry_get_name(dev_list_entry);
  dev = udev_device_new_from_syspath(udev, path);

  /* usb_device_get_devnode() returns the path to the device node
     itself in /dev. */
  printf("Device Node Path: %s\n", udev_device_get_devnode(dev));

  /* The device pointed to by dev contains information about
     the hidraw device. In order to get information about the
     USB device, get the parent device with the
     subsystem/devtype pair of "usb"/"usb_device". This will
     be several levels up the tree, but the function will find
     it.*/
  dev = udev_device_get_parent_with_subsystem_devtype(
         dev,
         "usb",
         "usb_device");
  if (!dev) {
   printf("Unable to find parent usb device.");
   exit(1);
  }

  /* From here, we can call get_sysattr_value() for each file
     in the device's /sys entry. The strings passed into these
     functions (idProduct, idVendor, serial, etc.) correspond
     directly to the files in the directory which represents
     the USB device. Note that USB strings are Unicode, UCS2
     encoded, but the strings returned from
     udev_device_get_sysattr_value() are UTF-8 encoded. */
  printf("  VID/PID: %s %s\n",
          udev_device_get_sysattr_value(dev,"idVendor"),
          udev_device_get_sysattr_value(dev, "idProduct"));
  printf("  %s\n  %s\n",
          udev_device_get_sysattr_value(dev,"manufacturer"),
          udev_device_get_sysattr_value(dev,"product"));
  printf("  serial: %s\n",
           udev_device_get_sysattr_value(dev, "serial"));
  udev_device_unref(dev);
}
/* Free the enumerator object */
udev_enumerate_unref(enumerate);

udev_unref(udev);

return 0;      
}
回复 支持 反对 印象

使用道具 举报

0

精华

10

回帖

88

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
83
精华
0
tuzi1024 发表于 2020-7-25 21:08 来自 中国浙江湖州
看一下哈。。。怎么做
回复 支持 反对 印象

使用道具 举报

0

精华

6

回帖

51

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
48
精华
0
codening 发表于 2020-7-25 22:25 来自 中国北京
啥也不说了,感谢楼主分享哇!
回复 支持 反对 印象

使用道具 举报

lts

0

精华

1

回帖

6

积分

入门用户

Rank: 1

云币
0
贡献
0
活跃
5
精华
0
lts 发表于 2020-7-26 00:15 来自 中国上海
啥也不说了,感谢楼主分享哇!
回复 支持 反对 印象

使用道具 举报

0

精华

17

回帖

1万

积分

登峰造极

Rank: 5Rank: 5

云币
0
贡献
2035
活跃
141
精华
0
momomomo 发表于 2020-7-26 14:54 来自 中国北京
#在这里快速回复#感谢楼主分享。。。。。。
回复 支持 反对 印象

使用道具 举报

0

精华

17

回帖

1万

积分

登峰造极

Rank: 5Rank: 5

云币
0
贡献
2035
活跃
141
精华
0
momomomo 发表于 2020-7-26 15:20 来自 中国北京
简单来说就是安装 ffmpeg 之后, ssh 连接到群晖,执行下面两条命令

  1. sudo rm -f /usr/bin/ffmpeg

  2. sudo ln -s /volume1/@appstore/ffmpeg/bin/ffmpeg /usr/bin/ffmpeg
复制代码
回复 支持 反对 印象

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回列表 搜索 官方QQ群
懒人地图| 手机版|小黑屋| 智能生活 , 上那是云 |闽ICP备2020018196号-1 |网站地图