queue

Gstreamer rtsp playing (with sound)

穿精又带淫゛_ 提交于 2019-12-06 10:42:43
im newbie in gstreamer and simple try to wath rtsp video flow from Dlink 2103 camera. When i trying it (just video): gst-launch rtspsrc location=rtsp://192.168.0.20/live1.sdp ! \ rtph264depay ! \ h264parse ! capsfilter caps="video/x-h264,width=1280,height=800,framerate=(fraction)25/1" ! ffdec_h264 ! ffmpegcolorspace ! autovideosink Its ok. When i trying it (just audio): gst-launch rtspsrc location=rtsp://192.168.0.20/live1.sdp ! \ rtpg726depay ! ffdec_g726 ! audioconvert ! audioresample ! autoaudiosink Its also ok. Next i try play both audio and video. gst-launch man page was used for generate

How to implement a FIFO queue that supports namespaces

折月煮酒 提交于 2019-12-06 09:47:36
问题 I'm using the following approach to handle a FIFO queue based on Google App Engine db.Model (see this question). from google.appengine.ext import db from google.appengine.ext import webapp from google.appengine.ext.webapp import run_wsgi_app class QueueItem(db.Model): created = db.DateTimeProperty(required=True, auto_now_add=True) data = db.BlobProperty(required=True) @staticmethod def push(data): """Add a new queue item.""" return QueueItem(data=data).put() @staticmethod def pop(): """Pop

Enqueue a function (like wordpress add_action)

≡放荡痞女 提交于 2019-12-06 09:41:45
问题 How do I queue functions in PHP? I need something that works just like Wordpress's add_action system. I want enqueue function which then runs when the time is right. Edit This seems to work perfectly. Anyone got any tips to improve my code? $enqueued_actions = array(); /** * Enqueue an action to run at a later time. * @param string $hook The hook name. * @param obj $func The function object. * @param integer $imp The level of importance from 0-9 */ function add_action($hook, $func, $imp = 0)

python multi-processing queue: is putting independent from getting?

一个人想着一个人 提交于 2019-12-06 09:13:42
Is putting an object in a multi-processing queue independent from getting an object from it? In other words, will putting an object block the process P1 if another process P2 is getting from it? Update: I am assuming an infinite queue. My reading of the source code is that get obtains a read lock, which is independent of of the lock (called _notempty ) acquired by put . If I understand correctly, concurrent get s can block each other, and concurrent put s can block each other (modulo your use of the block parameter), but that gets and puts do not mutually block. 来源: https://stackoverflow.com

How should I handle Multi-threading in Java?

随声附和 提交于 2019-12-06 08:36:17
I am working on a practical scenario related with Java;a socket program. The existing system and the expected system are as follows. Existing System - The system checks that a certain condition is satisfied. If so It will create some message to be sent and put it into a queue. The queue processor is a separate thread. It periodically check the queue for existence of items in it. If found any items (messages) it just sends the message to a remote host (hardcoded) and remove the item from queue. Expected System - This is something like that. The message is created when a certain condition is

Sync device data with web-server

我是研究僧i 提交于 2019-12-06 07:55:07
I have data in my application which must be updated on the server on the basis of network availability. I store this data on a local database on android using sqlite. Currently the idea is: Data should be inserted on the local sqlite database A service should be waiting as soon as the data is inserted it checks the network availability and send it to the server and wait for success response. If the response true is received from the server it should update the sync status of that sqlite row and move to the next row to send the data. I wanted to find out the best way to queue this data to send

Is laravel queue system suitable for big projects? [closed]

可紊 提交于 2019-12-06 07:52:14
Closed . This question is opinion-based . It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post . Closed 3 years ago . I needed to know if laravel 5 queue management system is suitable for big projects (having about 100.000 users). I want to do something like messaging (not spam :) ) users at once each day. Is redis good enough for this job (queuing)? Or it is better to use a lib that is specially for queuing (like beanstalkd)? To be fair and to try and post a reasonable answer to this

Symfony2 Job Queue or Parallel Processing?

冷暖自知 提交于 2019-12-06 07:43:42
问题 Does anyone know how to run a number of processes in the background either through a job queue or parallel processing. I have a number of maintenance updates that take time to run and want to do this in the background. 回答1: I would recomment Gearman server, it prooved quite stable, it's totally outside of Symfony2, and you have to have server up and running (don't know what your hosting options are), but it distribues jobs perfectly. In skiniest version, it just keeps all jobs in-memory, but

“EOF error” at program exit using multiprocessing Queue and Thread

北慕城南 提交于 2019-12-06 07:24:22
I have trouble understanding why this simple program raises an EOFError at the end. I am using a Queue() to communicate with a Thread() that I want to automatically and cleanly terminate atexit of my program. import threading import multiprocessing import atexit class MyClass: def __init__(self): self.queue = None self.thread = None def start(self): self.queue = multiprocessing.Queue() self.thread = threading.Thread(target=self.queued_writer, daemon=True) self.thread.start() # Remove this: no error self.queue.put("message") def queued_writer(self): while 1: msg = self.queue.get() print(

Python Queues memory leaks when called inside thread

℡╲_俬逩灬. 提交于 2019-12-06 07:23:09
问题 I have python TCP client and need to send media(.mpg) file in a loop to a 'C' TCP server. I have following code, where in separate thread I am reading the 10K blocks of file and sending it and doing it all over again in loop, I think it is because of my implementation of thread module, or tcp send. I am using Queues to print the logs on my GUI ( Tkinter ) but after some times it goes out of memory. . UPDATE 1 - Added more code as requested Thread class "Sendmpgthread" used to create thread to