lp://staging/~thomas-voss/media-hub/add-tests-and-testing-infrastructure
- Get this branch:
- bzr branch lp://staging/~thomas-voss/media-hub/add-tests-and-testing-infrastructure
Branch merges
- Jim Hodapp (community): Needs Information
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 9925 lines (+8557/-391)53 files modifiedCMakeLists.txt (+5/-0)
memcheck.suppressions (+4016/-0)
src/core/media/CMakeLists.txt (+4/-8)
src/core/media/gstreamer/engine.cpp (+20/-5)
src/core/media/gstreamer/meta_data_extractor.h (+47/-6)
src/core/media/gstreamer/playbin.cpp (+1/-0)
src/core/media/mpris/player.h (+80/-29)
src/core/media/player_base.h (+332/-0)
src/core/media/player_implementation.cpp (+6/-18)
src/core/media/player_implementation.h (+3/-0)
src/core/media/player_skeleton.cpp (+20/-7)
src/core/media/player_stub.cpp (+44/-53)
src/core/media/player_stub.h (+15/-3)
src/core/media/server/server.cpp (+4/-2)
src/core/media/service.cpp (+24/-2)
src/core/media/service_implementation.cpp (+5/-6)
src/core/media/service_skeleton.cpp (+32/-38)
src/core/media/service_skeleton.h (+15/-0)
src/core/media/service_stub.cpp (+53/-33)
src/core/media/service_stub.h (+18/-4)
tests/CMakeLists.txt (+36/-13)
tests/acceptance-tests/service.cpp (+116/-103)
tests/integration-tests/CMakeLists.txt (+6/-0)
tests/integration-tests/fixtures/player_skeleton.h (+139/-0)
tests/integration-tests/hybris_gl_sink_test.cpp (+199/-0)
tests/integration-tests/player_implementation_test.cpp (+296/-0)
tests/integration-tests/player_skeleton_test.cpp (+517/-0)
tests/integration-tests/service_implementation_test.cpp (+463/-0)
tests/integration-tests/service_skeleton_test.cpp (+344/-0)
tests/mock/audio_output_observer.h (+44/-0)
tests/mock/battery_observer.h (+52/-0)
tests/mock/call_monitor.h (+42/-0)
tests/mock/client_death_observer.h (+48/-0)
tests/mock/engine.h (+231/-0)
tests/mock/engine_factory.h (+47/-0)
tests/mock/keyed_player_store.h (+76/-0)
tests/mock/media_service.h (+37/-0)
tests/mock/player.h (+76/-0)
tests/mock/power_state_controller.h (+127/-0)
tests/mock/recorder_observer.h (+43/-0)
tests/mock/request_authenticator.h (+42/-0)
tests/mock/request_context_resolver.h (+47/-0)
tests/test_data.cpp.in (+1/-1)
tests/tools/a_trap_stopping_itself.h (+42/-0)
tests/tools/did_finish_successfully.h (+39/-0)
tests/tools/event_sink.h (+145/-0)
tests/tools/gdb_barrier.h (+52/-0)
tests/tools/gles_egl_helper.h (+187/-0)
tests/unit-tests/CMakeLists.txt (+4/-46)
tests/unit-tests/existing_request_authenticator_test.cpp (+126/-0)
tests/unit-tests/hashed_keyed_player_store_test.cpp (+97/-0)
tests/unit-tests/pulseaudio_audio_output_observer_test.cpp (+76/-0)
tests/unit-tests/test-gstreamer-engine.cpp (+16/-14)
Branch information
Recent revisions
- 123. By Thomas Voß
-
Add memcheck.
suppressions for handling spurious reports from glib/gobject/ gstreamer (needs more investigation).
Properly scope gstreamer init/deinit to avoid static initialization fiascos.
Ensure that the bus used by the MetaDataExtractor is properly released, together with the overall pipeline.
Ensure that state changes in the MetaDataExtractor are atomic (TODO: split out common wait_for_state_change code).
Make sure that only the engine is kept alive when resetting on client death. Otherwise, objects are leaked, causing issues in integration tests.
Make sure that multimedia sessions are properly resumed when a critical battery notification ends.
Fix the mocked KeyedPlayerStore such that do_has_player_ for_key never throws.
Fix meta data in test files to make GStreamerEngine.* tests pass again. - 121. By Thomas Voß
-
[ Jim Hodapp ]
* Fix the bug which caused music playback to start playing again after
a phonecall hung up after being auto-paused by disconnecting a
headphone jack.
[ Thomas Voss ]
[ CI Train Bot ]
* New rebuild forced.
[ Jim Hodapp ]
* Disconnect playback_status_ changed_ signal in ~Private() to avoid a
deadlock.
* Prevent a 0 position from being reported to the app which happens
while seeking. Covers bad behavior that happens from GStreamer. Also
expose the about_to_finish signal to the client. Enable playback
again after manually seeking all the way to EOS. Also only send
VideoDimensionsChanged signal only when necessary.
[ Ricardo Mendoza ]
* Add an interface apparmor::ubuntu: :RequestAuthent icator that is used
to authenticate incoming open uri requests. Add an interface
apparmor::ubuntu: :RequestContext Resolver that is used to resolve a
dbus name to an apparmor::ubuntu: :Context. Provide an implementation
apparmor::ubuntu: :ExistingAuthen ticator that takes the impl. from
player_skeleton. cpp and uses it to implement the interface. Provide
an implementation apparmor::ubuntu: :RequestContext Resolver that
reaches out to the dbus daemon to resolve a given bus name to an
apparmor profile. Remove obsolete query for the apparmor profile in
ServiceSkeleton. Adjust the implementation in media::PlayerSkeleton
to rely on Request{Authenticator, ContextResolver}. removed:
src/core/media/apparmor. h added: src/core/ media/apparmor/
src/core/media/apparmor/ context. cpp
src/core/media/apparmor/ context. h src/core/ media/apparmor/ dbus.h
src/core/media/apparmor/ ubuntu. cpp src/core/ media/apparmor/ ubuntu. h
* Introduce an interface media::audio:: OutputObserver that allows the
core classes to observer the state of external audio outputs
(headphones/headsets) . Provide an implementation of
media::audio: :OutputObserver that relies on Pulseaudio to monitor
the availability of ports on the default sink. Adjust
media::ServiceImpleme ntation to use media:: audio:: OutputObserver,
defaulting to media::audio:: PulseAudioOutpu tObserver.
* Migrate all Player DBus methods to use transact_method() instead of
invoke_method_ synchronously( ), to prevent bus executor deadlocks.
[ Ricardo Salveti de Araujo ]
* Add an interface apparmor::ubuntu: :RequestAuthent icator that is used
to authenticate incoming open uri requests. Add an interface
apparmor::ubuntu: :RequestContext Resolver that is used to resolve a
dbus name to an apparmor::ubuntu: :Context. Provide an implementation
apparmor::ubuntu: :ExistingAuthen ticator that takes the impl. from
player_skeleton. cpp and uses it to implement the interface. Provide
an implementation apparmor::ubuntu: :RequestContext Resolver that
reaches out to the dbus daemon to resolve a given bus name to an
apparmor profile. Remove obsolete query for the apparmor profile in
ServiceSkeleton. Adjust the implementation in media::PlayerSkeleton
to rely on Request{Authenticator, ContextResolver}. removed:
src/core/media/apparmor. h added: src/core/ media/apparmor/
src/core/media/apparmor/ context. cpp
src/core/media/apparmor/ context. h src/core/ media/apparmor/ dbus.h
src/core/media/apparmor/ ubuntu. cpp src/core/ media/apparmor/ ubuntu. h
* Move src/core/media/call- monitor to src/core/ media/telephony .
Introduce a proper interface media::telephony: :CallMonitor. Slightly
adjust existing implementation based on Qt. Adjust
media::ServiceImpleme ntation to account for changes in
media::telephony: :CallMonitor.
[ thomas-voss ]
* Add an interface apparmor::ubuntu: :RequestAuthent icator that is used
to authenticate incoming open uri requests. Add an interface
apparmor::ubuntu: :RequestContext Resolver that is used to resolve a
dbus name to an apparmor::ubuntu: :Context. Provide an implementation
apparmor::ubuntu: :ExistingAuthen ticator that takes the impl. from
player_skeleton. cpp and uses it to implement the interface. Provide
an implementation apparmor::ubuntu: :RequestContext Resolver that
reaches out to the dbus daemon to resolve a given bus name to an
apparmor profile. Remove obsolete query for the apparmor profile in
ServiceSkeleton. Adjust the implementation in media::PlayerSkeleton
to rely on Request{Authenticator, ContextResolver}. removed:
src/core/media/apparmor. h added: src/core/ media/apparmor/
src/core/media/apparmor/ context. cpp
src/core/media/apparmor/ context. h src/core/ media/apparmor/ dbus.h
src/core/media/apparmor/ ubuntu. cpp src/core/ media/apparmor/ ubuntu. h
* Add an interface media::ClientDeathObse rver that abstracts away
receiving key-based death notifications for clients associated to
media::Player instances server-side Provide an implementation
media::HybrisClientDe athObserver that relies on hybris and
ultimately on Android's onBinderDied to receive death notifications.
Adjust media::PlayerStub and media::PlayerImplement ation to account
for the new interface. Adjust the CMake setup for tests to link
media-hub-service instead of recompiling large parts of the
implementation classes.
* Decouple PlayerSkeleton and PlayerImplementation by making
PlayerImplementation being able to inherit from arbitrary base
classes, as long as they provide the set of properties and signals
defined by media::Player.
* Decouple the ServiceSkeleton from the ServiceImplementation by
introducing a common interface media::KeyedPlayerStor e for storing
running Player sessions indexed by the Player::Key. Provide a
default implementation HashedKeyedPlayerStore relying on a hash map
for keeping track of player instances. Adjust implementation to
account for ServiceImplementation no longer inheriting from
ServiceSkeleton.
* Introduce a common class media::helper: :ExternalHelper s that
provides a convenient way to:
* Introduce an interface media::RecorderObserve r that allows the core
classes to monitor the overall state of the system. Provide an
implementation of media::RecorderObserve r relying on Hybris to
interface with the Android side. Adjust the ServiceImplementation to
connect to the platform-default media::RecorderObserve r.
* Introduce an interface media::audio:: OutputObserver that allows the
core classes to observer the state of external audio outputs
(headphones/headsets) . Provide an implementation of
media::audio: :OutputObserver that relies on Pulseaudio to monitor
the availability of ports on the default sink. Adjust
media::ServiceImpleme ntation to use media:: audio:: OutputObserver,
defaulting to media::audio:: PulseAudioOutpu tObserver.
* Introduce an interface media::power:: BatteryObserver to monitor the
current battery level of the system. The core reacts to low/very low
battery levels by pausing all multimedia playback sessions and
resumes them whenever the user has been notified of the critical
battery level. Provide an implementation of
media::power: :BatteryObserve r using
com.canonical.indicator. power.Battery. Adjust
media::ServiceImpleme ntation to use media:: power:: BatteryObserver .
* Move gstreamer::Playbin implementation to its own cpp file, thus
internalizing the Hybris setup portions. Make sure that media-hub-
service knows about
media::Player: :Error: :OutOfProcessBu fferStreamingNo tSupported by
linking with media-hub-client.
* Move src/core/media/call- monitor to src/core/ media/telephony .
Introduce a proper interface media::telephony: :CallMonitor. Slightly
adjust existing implementation based on Qt. Adjust
media::ServiceImpleme ntation to account for changes in
media::telephony: :CallMonitor.
* Replace home-grown mask type for the video size with a std::tuple,
i.e., media::video:: Dimensions. Introduce a simple TaggedInteger
class to distinguish between Width, Height and other dimensions.
Adjust interfaces of media::Player to rely on the new type. Adjust
implementation classes to account for interface changes. Adjust
Codec implementation for sending the tagged integer via the bus.
Adjust gstreamer::Engine and gstreamer::Playbin to hand out the
correct types.
* debian/control:
- Removing pre-depends that are not required
- Bumping standards-version to 3.9.6
[ Ricardo Salveti de Araujo ]
* Migrating tests to use ogg instead of mp3/avi removed:
tests/h264.avi tests/test.mp3 added: tests/test-audio-1. ogg
tests/test-video. ogg tests/test.mp3 renamed: tests/test.ogg =>
tests/test-audio. ogg - 120. By Thomas Voß
-
Enable integration and unit tests harnessing the most important functionality of media hub.
Introduce mocks and test tooling to help test authors. - 118. By Thomas Voß
-
Merge prereq branch.
Externalize all the functional dependencies of Player{Skeleton, Implementation} and Service{Skeleton, Implementation} to allow
for easy mocking in test cases.
Adjust the server setup to instantiate platform-default implementations. - 116. By Thomas Voß
-
[ Jim Hodapp ]
* Error reporting all the way up to the app level from the playbin
pipeline.
[ Ubuntu daily release ]
* New rebuild forced
[ Jim Hodapp ]
* Don't auto-resume playback of videos after a phone call ends. (LP:
#1411273)
[ Ubuntu daily release ]
* New rebuild forced
[ Ricardo Salveti de Araujo ]
* service_implementation: adding debug for call started/ended signals.
Make sure account and connection are available when setting up
account manager (patch from Gustavo Boiko). call_monitor: don't
check caps when hooking up on/off signals, until bug 1409125 is
fixed. Enable parallel building . (LP: #1409125)
[ Jim Hodapp ]
* Pause playback when recording begins. (LP: #1398047)
[ Ricardo Salveti de Araujo ]
* call_monitor.cpp: waiting for bridge to be up, and also protecting
the on_change call (LP: #1408137)
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp://staging/media-hub