From c309219cea304ef18e589848f685d11b1f2be6c1 Mon Sep 17 00:00:00 2001 From: Tats Date: Sat, 18 Oct 2014 14:28:22 +0000 Subject: [PATCH 1/4] Fixed bug #33: The --fullscreen option doesn't work. --- MainWindow.cpp | 9 +++++++-- MainWindow.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/MainWindow.cpp b/MainWindow.cpp index d10a590..d0dbb0c 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -1198,9 +1198,14 @@ void MainWindow::createActions() connect(stickyVertices, SIGNAL(toggled(bool)), outputWindow->getCanvas(), SLOT(enableStickyVertices(bool))); } -void MainWindow::enableFullscreen() +void MainWindow::startFullScreen() { - outputWindowFullScreen->setEnabled(true); + // Remove canvas controls. + displayCanvasControls->setChecked(false); + // Display output window. + displayOutputWindow->setChecked(true); + // Send fullscreen. + outputWindowFullScreen->setChecked(true); } void MainWindow::createMenus() diff --git a/MainWindow.h b/MainWindow.h index 7cf2c5c..5df305d 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -323,7 +323,7 @@ public: void removeCurrentPaint(); void removeCurrentMapping(); - void enableFullscreen(); + void startFullScreen(); void setOscPort(QString portNumber); public: // Constants. /////////////////////////////////////////////////////////////////////////////////////// From 8e9f7dd7e5999179beef23009a3b330d0edf159c Mon Sep 17 00:00:00 2001 From: Vasilis Liaskovitis Date: Sat, 18 Oct 2014 17:12:39 +0200 Subject: [PATCH 2/4] use startFullScreen to fix compilation failure (introduced for bug #33) --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 3cb5421..7ccc150 100644 --- a/main.cpp +++ b/main.cpp @@ -144,7 +144,7 @@ int main(int argc, char *argv[]) if (parser.isSet(fullscreenOption)) { qDebug() << "TODO: Running in fullscreen mode"; - win.enableFullscreen(); + win.startFullScreen(); } // Start app. From 835165c89aee93983eec564f1392b1a68f559969 Mon Sep 17 00:00:00 2001 From: Vasilis Liaskovitis Date: Sat, 18 Oct 2014 19:03:06 +0200 Subject: [PATCH 3/4] Fix some issues with shmsrc pipeline and video dimensions (bug #29) Shmsrc seems to work with a gstreamer 1.4 build, but not with distro gstreamer (segfault due to missing fix https://bugzilla.gnome.org/show_bug.cgi?id=731093) Reader / writer of live source need to be using same gstreamer build, otherwise some pipeline problems appear in deserializing and caps detection. Playback of the first shape mapped with the live source doesn't seem to work (?), so this bug stiil needs investigation. --- MediaImpl.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/MediaImpl.cpp b/MediaImpl.cpp index ac1fdb4..083971e 100644 --- a/MediaImpl.cpp +++ b/MediaImpl.cpp @@ -103,6 +103,19 @@ bool MediaImpl::_videoPull() // Pull current frame buffer. GstBuffer *buffer = gst_sample_get_buffer(sample); + // for live sources, video dimensions have not been set, because + // gstPadAddedCallback is never called. Fix dimensions from first sample / + // caps we receive + if (_isSharedMemorySource && ( _padHandlerData.width == -1 || + _padHandlerData.height == -1)) { + GstCaps *caps = gst_sample_get_caps(sample); + GstStructure *structure; + structure = gst_caps_get_structure(caps, 0); + gst_structure_get_int(structure, "width", &_padHandlerData.width); + gst_structure_get_int(structure, "height", &_padHandlerData.height); + // g_print("Size is %u x %u\n", _padHandlerData.width, _padHandlerData.height); + } + GstMapInfo map; if (gst_buffer_map(buffer, &map, GST_MAP_READ)) { @@ -347,14 +360,14 @@ bool MediaImpl::loadMovie(QString filename) // Build the pipeline. Note that we are NOT linking the source at this // point. We will do it later. gst_bin_add_many (GST_BIN (_pipeline), - _uridecodebin0, _queue0, _videoconvert0, - videoscale0, capsfilter0, _appsink0, NULL); + _isSharedMemorySource ? _shmsrc0 : _uridecodebin0, _queue0, + _videoconvert0, videoscale0, capsfilter0, _appsink0, NULL); // special case for shmsrc if (_isSharedMemorySource) { gst_bin_add (GST_BIN(_pipeline), _gdpdepay0); - if (! gst_element_link_many (_uridecodebin0, _gdpdepay0, _queue0, NULL)) + if (! gst_element_link_many (_shmsrc0, _gdpdepay0, _queue0, NULL)) { g_printerr ("Could not link shmsrc, deserializer and video queue.\n"); } @@ -410,8 +423,8 @@ bool MediaImpl::loadMovie(QString filename) else { //qDebug() << "LIVE mode" << uri; - g_object_set (_uridecodebin0, "socket-path", uri, NULL); - g_object_set (_uridecodebin0, "is-live", TRUE, NULL); + g_object_set (_shmsrc0, "socket-path", uri, NULL); + g_object_set (_shmsrc0, "is-live", TRUE, NULL); _padHandlerData.videoIsConnected = true; } @@ -448,7 +461,6 @@ bool MediaImpl::loadMovie(QString filename) { return false; } - qDebug() << "Pipeline started."; //_movieReady = true; From 6c95c8f11a43b665591dc4a5f249c769c64cb237 Mon Sep 17 00:00:00 2001 From: Alexandre Quessy Date: Sat, 18 Oct 2014 21:02:42 -0400 Subject: [PATCH 4/4] Add Dame Diongue to the list of developers --- MM.cpp | 1 + MM.h | 1 + MainWindow.cpp | 5 ++--- README | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/MM.cpp b/MM.cpp index 97098ec..3455bbb 100644 --- a/MM.cpp +++ b/MM.cpp @@ -20,6 +20,7 @@ #include "MM.h" const QString MM::VERSION = "0.1.1"; +const QString MM::COPYRIGHT_OWNERS = "Sofian Audry, Alexandre Quessy, Mike Latona, Vasilis Liaskovitis, Dame Diongue"; const QString MM::FILE_EXTENSION = "mmp"; const QString MM::VIDEO_FILES_FILTER = "*.mov *.mp4 *.avi *.ogg *.ogv *.mpeg *.mpeg1 *.mpeg4 *.mpg *.mpg2 *.mp2 *.mjpq *.mjp *.wmv *sock"; const QString MM::IMAGE_FILES_FILTER = "*.jpg *.jpeg *.gif *.png *.tiff *.tif *.bmp"; diff --git a/MM.h b/MM.h index 22fc5aa..7ffb8a0 100644 --- a/MM.h +++ b/MM.h @@ -30,6 +30,7 @@ class MM public: // General. static const QString VERSION; + static const QString COPYRIGHT_OWNERS; static const QString FILE_EXTENSION; static const QString VIDEO_FILES_FILTER; static const QString IMAGE_FILES_FILTER; diff --git a/MainWindow.cpp b/MainWindow.cpp index d0dbb0c..bd547e5 100644 --- a/MainWindow.cpp +++ b/MainWindow.cpp @@ -532,8 +532,7 @@ void MainWindow::about() // Pop-up about dialog. QMessageBox::about(this, tr("About MapMap"), tr("

%1

" - "

Copyright © 2013 Sofian Audry, Alexandre Quessy, " - "Mike Latona and Vasilis Liaskovitis.

" + "

Copyright © 2013 %2.

" "

MapMap is a free software for video mapping.

" "

Projection mapping, also known as video mapping and spatial augmented reality, " "is a projection technology used to turn objects, often irregularly shaped, into " @@ -550,7 +549,7 @@ void MainWindow::about() "La Francophonie.

" "

http://mapmap.info
" "http://www.francophonie.org

" - ).arg(MM::VERSION)); + ).arg(MM::VERSION, MM::COPYRIGHT_OWNERS)); // Restart video playback. XXX Hack videoTimer->start(); diff --git a/README b/README index 3fc5bd7..87fa1b4 100644 --- a/README +++ b/README @@ -35,6 +35,7 @@ Authors * Sofian Audry: lead developer, user interface designer, project manager. * Vasilis Liaskovitis: developer. * Mike Latona: user interface designer. +* Dame Diongue: developer. Contributors ------------