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/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; 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 ------------ 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.