Recherche avancée

Médias (0)

Mot : - Tags -/flash

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (49)

  • List of compatible distributions

    26 avril 2011, par

    The table below is the list of Linux distributions compatible with the automated installation script of MediaSPIP. Distribution nameVersion nameVersion number Debian Squeeze 6.x.x Debian Weezy 7.x.x Debian Jessie 8.x.x Ubuntu The Precise Pangolin 12.04 LTS Ubuntu The Trusty Tahr 14.04
    If you want to help us improve this list, you can provide us access to a machine whose distribution is not mentioned above or send the necessary fixes to add (...)

  • MediaSPIP v0.2

    21 juin 2013, par

    MediaSPIP 0.2 est la première version de MediaSPIP stable.
    Sa date de sortie officielle est le 21 juin 2013 et est annoncée ici.
    Le fichier zip ici présent contient uniquement les sources de MediaSPIP en version standalone.
    Comme pour la version précédente, il est nécessaire d’installer manuellement l’ensemble des dépendances logicielles sur le serveur.
    Si vous souhaitez utiliser cette archive pour une installation en mode ferme, il vous faudra également procéder à d’autres modifications (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (5522)

  • avformat/mov : move edit list heuristics into mov_build_index()

    12 novembre 2014, par Clément Bœsch
    avformat/mov : move edit list heuristics into mov_build_index()
    

    mov_read_elst() is now only responsible from storing the table in a data
    structure ; this is consistent with other table readers functions.

    • [DH] libavformat/isom.h
    • [DH] libavformat/mov.c
  • Revision e707e9580b : libs.mk : don't include x86inc.asm in codec src list this file is an include and

    28 juin 2014, par James Zern

    Changed Paths :
     Modify /libs.mk



    libs.mk : don’t include x86inc.asm in codec src list

    this file is an include and doesn’t need to be built on its own.
    fixes :
    ranlib : file : libvpx_g.a(x86inc.asm.o) has no symbols

    Change-Id : I89504e37ff0a4488489af7b9b7e09fb32acc4853

  • How to build list of tasks for asyncio.gather in Python 3.8

    22 juillet 2020, par mcgregor94086

    Below I have attached a test program to demonstrate a problem I am having with asyncio.gather throwing a TypeError.

    


    My objective : To make multiple concurrent asynchronous calls to capture camera images to files from an array of USB cameras attached to my computer. When all cameras have completed their async captures, I want then resume processing.

    


    The async coroutine take_image() shown here makes a system call to the "ffmpeg" application that captures an image from the specified camera to a specified file.

    


    import asyncio
import os
import subprocess
import time

async def take_image(camera_id, camera_name, image_file_path, image_counter):
    image_capture_tic = time.perf_counter()
    try:
        run_cmd = subprocess.run( ["ffmpeg", '-y', '-hide_banner', '-f', 'avfoundation', '-i', camera_id,
                                   '-frames:v', '1', '-f', 'image2', image_file_path], universal_newlines=True,
                                 stdout=subprocess.PIPE, stderr=subprocess.PIPE)  # Note, ffmpeg writes to stderr, not stdout!
    except Exception as e:
        print("Error: Unable to capture image for", image_file_path)
        return "NO IMAGE!"

    image_capture_toc = time.perf_counter()
    print(f"{image_counter}: Captured {camera_name} image in: {image_capture_toc - image_capture_tic:0.0f} seconds")
    return camera_name


    


    The main() routine shown below takes a list of multiple cameras, and iterating over each camera in the list, main() makes creates an asyncio task for each camera using asyncio.create_task(). Each task is added to a list of tasks.

    


    Once all image capture tasks have been started, I await their completion using await asyncio.gather(tasks).

    


    async def main():
    tic = time.perf_counter()
    camera_list = [('0', 'FHD Camera #1'),  ('1', 'FHD Camera #2'), ('2', 'FHD Camera #3'), ]
    image_counter = 1
    tasks = []
    for camera_pair in camera_list:
        camera_id, camera_name = camera_pair
        image_file_name = 'img' + str(image_counter) + "-cam" + str(camera_id)  + "-" + camera_name + '.jpg'
        image_file_path = os.path.join("/tmp/test1/img", image_file_name)

        # schedule all image captures calls *concurrently*:
        tasks.append(asyncio.create_task(take_image(camera_id, camera_name, image_file_path, image_counter),
                     name=image_file_name))
        image_counter = image_counter + 1

    await asyncio.gather(tasks) # <-- This line throws a TypeError!
    toc = time.perf_counter()
    print(f"Captured list of {image_counter - 1} cameras in: {toc - tic:0.0f} seconds")

asyncio.run(main())


    


    Unfortunately, when I attempt to run this program, I am getting this error :

    


    TypeError : unhashable type : 'list'

    


    and the following Traceback :

    


    Traceback (most recent call last):&#xA;  File "scratch_10.py", line 41, in <module>&#xA;    asyncio.run(main())&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/runners.py", line 43, in run&#xA;    return loop.run_until_complete(main)&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 608, in run_until_complete&#xA;    return future.result()&#xA;  File "scratch_10.py", line 36, in main&#xA;    await asyncio.gather(tasks)&#xA;  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/tasks.py", line 805, in gather&#xA;    if arg not in arg_to_fut:&#xA;TypeError: unhashable type: &#x27;list&#x27;&#xA;</module>

    &#xA;

    I have been trying to puzzle through the 3.8 documentation on asyncio, but I don't understand what is wrong.

    &#xA;

    How can I have each take_image request run asynchronously, and then resume processing in my calling routine once each task is complete ?

    &#xA;