Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EXTENDED_MEDIA_MODE build and runtime failures #900

Merged
merged 2 commits into from
Oct 24, 2016

Conversation

jacobkeeler
Copy link
Contributor

The build for SDL Core currently fails if EXTENDED_MEDIA_MODE=ON, this is partially due to a mistake made in a large CMake refactoring commit which removes the GStreamer include directories (here).

In addition, the GStreamer config directory is not included in the build, which is used by some of the headers in the gst directory which are included in the Media Manager. Unfortunately, FindGStreamer-1.0.cmake cannot find the config directory automatically, so the GSTREAMER_DIR environment variable still needs to be set manually for these changes to work (for Ubuntu 16.04 64-bit, this path should be /usr/lib/x86_64-linux-gnu/gstreamer-1.0):

export GSTREAMER_DIR=$PATH_TO_GSTREAMER

Finally, once Core is built with this feature, a SEGFAULT occurs in media_manager_impl.cc due to the code attempting to access a member of protocol_handler_ before it is set.

PR Changes

  • Edits Media Manager and appMain CMakeLists to fix build errors with Extended Media Mode
  • Fixes SEGFAULT error which occurs when the Media Manager is being initialized with Extended Media Mode

The GStreamer include directories were not properly set up in the CMake files for appMain and the Media Manager component, this commit fixes this.
media_manager_impl.cc tries to make an A2DPSourcePlayerAdapter using the protocol handler before it is set, causing the program to SEGFAULT. This commit moves this creation to the PlayA2DPSource method and adds an explicit check to make sure that the protocol handler is set beforehand.
@jacobkeeler jacobkeeler changed the title Fix EXENDED_MEDIA_MODE build and runtime failures Fix EXTENDED_MEDIA_MODE build and runtime failures Oct 12, 2016
@jacobkeeler
Copy link
Contributor Author

Should fix #890

@codecov-io
Copy link

codecov-io commented Oct 12, 2016

Current coverage is 68.47% (diff: 100%)

Merging #900 into master will not change coverage

@@             master       #900   diff @@
==========================================
  Files           313        313          
  Lines         22431      22431          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          15359      15359          
  Misses         7072       7072          
  Partials          0          0          

Powered by Codecov. Last update e9b2f5b...cb7972d

@Jack-Byrne
Copy link
Collaborator

@jacobkeeler Reviewed

@Jack-Byrne Jack-Byrne merged commit cba5c4a into master Oct 24, 2016
@jacobkeeler jacobkeeler deleted the hotfix/fix_EXTENDED_MEDIA_MODE branch October 26, 2016 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants