Commit Graph

19 Commits

Author SHA1 Message Date
Tats 7fe2a1f1a7 Bugfix #30 : Reimplemented MediaImpl removing the defective queue system and implementing a thread-safe system. Removed the memory leaks previously shown by valgrind. 2014-10-20 17:00:22 +00:00
Alexandre Quessy cf34d604c4 fix 2014-10-20 12:12:41 -04:00
Alexandre Quessy 4ea8f78c94 Merge branch 'develop' of github.com:mapmapteam/mapmap into develop
Conflicts:
	MediaImpl.h
2014-10-20 12:12:03 -04:00
Alexandre Quessy ca4eef0e71 Add documentation strings in MediaImpl.h 2014-10-20 12:09:18 -04:00
Tats 2022379c81 Unref more leaking samples in MediaImpl.cpp (queues are kept at a limited size). 2014-10-20 11:53:46 +00:00
Alexandre Quessy 436dc9d5a0 Refactor the pipeline + fix merge shmsrc feature 2014-10-18 12:17:38 -04:00
Alexandre Quessy a0cea41fc5 Add --reset-settings option 2014-10-17 13:12:07 -04:00
Tats bafff221bd Merge branch 'feature/shmsrcbin-rebase-oct2014' of https://github.com/vliaskov/libremapping into feature-merge-vliaskov-shmsrcbin
Conflicts:
	MainWindow.cpp
	MainWindow.h
	MediaImpl.cpp
	ProjectReader.cpp
2014-10-16 21:46:33 +00:00
Vasilis Liaskovitis f3e94f743c Support shmsrc (live source)
If the imported file is a socket path, we mark the media as "live". We
continuously poll for the socket path (in case e.g. it disappears / reappears).
As soon as the source socket patch exists, we connect a shmsrc ! gdpdepay
pipeline  (instead of a normal uridecodebin element for file-based media) and we
set the pipeline state to PLAYING (playAction button is not needed at the moment
for live sources, but we can change behaviour to only start the pipeline if
play is selected, like with normal file-based media)

In case of a GST_MESSAGE_ERROR, the polling function keeps looking for the
socket path until it exists again. The existing shmsrc pipeline is re-used
once the live source is transmitting again.

Tested with live source gst-launch-1.0:

gst-launch-1.0 uridecodebin uri=file:////opt/Videos/test.avi !  queue !
videoconvert ! video/x-raw, format="RGBA" ! gdppay ! shmsink
socket-path=/tmp/sock  shm-size=100000000

The live source was interrupted and restarted again, and the shmsrc in mapmap is
able to pick up the reappearing media stream.

Signed-off-by: Vasilis Liaskovitis <vliaskov@gmail.com>
2014-10-13 16:07:50 +02:00
Tats 2e7eb8d5b0 Major cleanup in MediaImpl 2014-10-12 00:12:04 -05:00
Tats 4246c5a3b4 Bugfix: video size was not properly set for many videos. 2014-09-16 20:54:40 -04:00
Tats cb0deae5f1 Base implementation of play/pause/rewind (working, still adjustments to do in the GUI) 2014-06-23 16:54:44 -04:00
Vasilis Liaskovitis 78d8f88e52 MediaImpl: Do buffer pull in "new-sample" gstreamer callback
Doing the buffer pull in the gstreamer "new-buffer" callback decreases the work
needed to be done by the videoPull() thread. This seems to give lower average
timestamps between successive draw/updatecanvas() calls, so perhaps better
framerates can be achieved.

In order to decouple videoPull from pulling the buffer, an async queue is
introduced between the gstreamer "new-sample" callback and the qt videoPull
function. On the release path, gst_sample_unref is decoupled from the qt side by
putting the already used frame in an output async queue. The bffers in the queue
are unreferenced in the gst "new-sample" callback.
2014-05-10 16:26:37 +02:00
Alexandre Quessy 4776dd2717 fix 2014-05-09 20:20:43 -04:00
Vasilis Liaskovitis b818fd3926 "new-sample" callback should return GstFlowReturn 2014-05-09 14:57:00 -04:00
Alexandre Quessy 19b3ca3826 build against GStreamer 1.0 2014-05-08 13:03:02 -04:00
Alexandre Quessy 348ffcb37e Implement OSC callback to set video URI 2014-04-26 19:20:21 +01:00
Tats ca9ba38682 Performance improvement: copy texture bits to video card only if they have changed 2014-04-26 13:32:27 +01:00
Tats 430b0f223a Refactor Video -> Media 2014-04-26 12:22:33 +01:00