* Add discontinuity support to stream recorder
* Use same container options for both StreamOutputs
* Fix pts adjuster
* Remove redundant/incorrect duplicate hls segment check
* Use same StreamBuffer across outputs
* Remove keepalive check for recorder
* Set output video timescale explicitly
* Disable avoid_negative_ts
Separate the HLS stream view logic out of StreamOutput since the hls
stream view is about to get more complex to track discontinuities. This
makes the idle timeout, shutdown, and coupling between hls and record
more explicit.
* Change the API boundary between stream and camera
Shift more of the stream lifecycle management to the camera. The motivation is to support stream urls that expire
giving the camera the ability to change the stream once it is created.
* Document stream lifecycle and simplify stream/camera interaction
* Reorder create_stream function to reduce diffs
* Increase test coverage for camera_sdm.py
* Fix ffmpeg typo.
* Add a stream identifier for each stream, managed by camera
* Remove stream record service
* Update homeassistant/components/stream/__init__.py
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Unroll changes to Stream interface back into camera component
* Fix preload stream to actually start the background worker
* Reduce unncessary diffs for readability
* Remove redundant camera stream start code
Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>
* Remove dependencies on keepalive from StremaOutput and stream_worker
Pull logic from StreamOutput and stream_worker into the Stream
class, unifying keepalive and idle timeout logic. This prepares
for future changes to preserve hls state across stream url changes.
* Add audio to stream component
* Use container options to do most fmp4 formatting
* Add test for treatment of different audio inputs
* Add test for treatment of different audio inputs
* pcm_mulaw frames should be s16
* Use seek to get BytesIO length
* Remove unused utcnow
* Remove peek_next_audio_pts
* only demux audio and video packets - ignoring data and subtitle streams
Co-authored-by: Jason Hunter <hunterjm@gmail.com>
* initial commit of streams
* refactor stream component
* refactor so stream formats are not considered a platform
* initial test and minor refactor
* fix linting
* update requirements
* need av in tests as well
* fix import in class def vs method
* fix travis and docker builds
* address code review comments
* fix logger, add stream start/stop logs, listen to HASS stop
* address additional code review comments
* beef up tests
* fix tests
* fix lint
* add stream_source to onvif camera
* address pr comments
* add keepalive to camera play_stream service
* remove keepalive and move import
* implement registry and have output provider remove itself from stream after idle, set libav log level to error