diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-14 01:05:18 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-14 01:05:18 +0100 |
| commit | 7b9c6d3afa80e3c299e30aa11d47253bbc5a8fa8 (patch) | |
| tree | 280398a122f5c07f5f437428f6ac98a4acc62020 /src/lib/butler.cc | |
| parent | 795de4ac5c56c722556cd4c914a11eddcb323343 (diff) | |
wip: Error when failing to read MXF frame.bad-mxf
Diffstat (limited to 'src/lib/butler.cc')
| -rw-r--r-- | src/lib/butler.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc index b2fbc6c60..4efe4fbfb 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -36,6 +36,7 @@ using std::make_pair; using std::pair; using std::shared_ptr; using std::string; +using std::vector; using std::weak_ptr; using boost::bind; using boost::optional; @@ -92,6 +93,7 @@ Butler::Butler ( _player_video_connection = _player.Video.connect(bind(&Butler::video, this, _1, _2)); _player_audio_connection = _player.Audio.connect(bind(&Butler::audio, this, _1, _2, _3)); _player_text_connection = _player.Text.connect(bind(&Butler::text, this, _1, _2, _3, _4)); + _player_error_connection = _player.Error.connect(bind(&Butler::error, this, _1)); /* The butler must hear about things first, otherwise it might not sort out suspensions in time for get_video() to be called in response to this signal. */ @@ -481,3 +483,19 @@ Butler::Error::summary () const return ""; } + +void +Butler::error(string message) +{ + boost::mutex::scoped_lock lm(_mutex); + _errors.push_back(message); +} + + +vector<string> +Butler::errors() const +{ + boost::mutex::scoped_lock lm(_mutex); + return _errors; +} + |
