Vlc.DotNet NextFrame

时间:2015-05-04 14:44:09

标签: c# .net vlc libvlc

我正在使用VlcControl库中的Vlc.DotNet,但我无法弄清楚如何在上一版本中使用NextFrame函数。

这个命令在VlcControl课程中不可用,仅在Core.Interops.VlcManager课程中,但我不知道如何从我的VlcControl调用它。

1 个答案:

答案 0 :(得分:1)

您可以通过像这样增加时间来移动到下一帧

# -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand, CommandError
from slackclient import SlackClient
from human_resource.models.recruitment import OpenPosition, TimeMarkForSlackReport
import datetime
import os

slack_token = 'my_slack_token'
sc = SlackClient(slack_token)
contents = []
attachments = []
class Command(BaseCommand):
    def handle(self, *args, **options):
        today = datetime.date.today()
        today_open_position_queryset = OpenPosition.objects.filter(created_at__date=today)
        count = 0

        if(len(today_open_position_queryset) != 0):
            for open_position in today_open_position_queryset:
                count += 1
                open_position_details = [
                    {
                        "title": open_position.name,
                        "value": "Position: " + open_position.position.position_name
                        + " | Team: " + open_position.team.team_name
                        + " | Created at: " + open_position.created_at.time().strftime('%H:%M')
                        + " | Created by: " + str(open_position.created_by) +
                        " | <" +
                        "my_link" + str(open_position.pk) + "|Click here> for the open position link!",
                    },
                ]
                contents.extend(open_position_details)
            attachments = [
                        {
                            "color": "000000",
                            "fields": contents
                        }
                    ]
            sc.api_call(
                "chat.postMessage",
                link_names=1,
                channel='#my_channel',  # replace with channel or person
                username="Daily Report",
                text="Today Open Positions",
                attachments = attachments
            )

上一帧:

 vlcControl1.Time += 1000/FPS;

vlcControl1.Time -= 1000/FPS; 可以来自

FBS

请注意:

  1. ShellObject obj = ShellObject.FromParsingName(fileSource.getCurrentFile().FullName); FPS = obj.Properties.System.Video.FrameRate.Value != null ? (int)(obj.Properties.System.Video.FrameRate.Value / 1000) : 22;来自ShellObject&#34; WindowsAPICodePack-Shell&#34;

  2. 我已经分配了22,因为NuGet

  3. 中有一些文件返回null
  4. obj.Properties.System.Video.FrameRate.Value这是一个包含视频文件的fileSource.getCurrentFile()对象。

  5. 太晚了,但也许有人觉得它很有用:)