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

Video Recording implementation using CameraX lib #419

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Commits on Apr 21, 2019

  1. Call cameraview destroy() instead of close() on Fragment onDestroy()

    - destroy() releases the camera resource unlike close() which just stops the preview
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 21, 2019
    Configuration menu
    Copy the full SHA
    2e94d58 View commit details
    Browse the repository at this point in the history
  2. Set LifecyclerOwner to the CameraView

    - setting LifecycleOwner will remove boilerplate around open(),
      close() and destroy()
    - a possible fix for guardianproject#376 ?
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 21, 2019
    Configuration menu
    Copy the full SHA
    9f54d45 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2019

  1. Set listener to null while canceling task

    - holding this reference may lead to Context leak
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 25, 2019
    Configuration menu
    Copy the full SHA
    9ef9908 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2019

  1. Add LeakCanary dependency

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 26, 2019
    Configuration menu
    Copy the full SHA
    aac0f96 View commit details
    Browse the repository at this point in the history
  2. Keep application context in Signal Sender

    - keeping Context (Activity/Fragment) in a singleton will cause memory leaks
      Keep the global application object associated with it instead
    - fix guardianproject#399
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 26, 2019
    Configuration menu
    Copy the full SHA
    99eded9 View commit details
    Browse the repository at this point in the history
  3. Remove redundant methods

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 26, 2019
    Configuration menu
    Copy the full SHA
    0a99b02 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2019

  1. Update dependencies

    - Among others this updates materialdatetimepicker to 4.2.0 which
      fixes a memory leak
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed May 5, 2019
    Configuration menu
    Copy the full SHA
    ba89c2d View commit details
    Browse the repository at this point in the history

Commits on May 14, 2019

  1. Remove Leak Canary dependency

    - keep this app dependency free; can be added in debug builds whenever
      another investigation is required
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed May 14, 2019
    Configuration menu
    Copy the full SHA
    e8e972b View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2020

  1. Merge branch 'master' of github.com:guardianproject/haven into leak_c…

    …anary
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    2179d56 View commit details
    Browse the repository at this point in the history
  2. Update dependencies

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    25581c4 View commit details
    Browse the repository at this point in the history
  3. Add leak canary in debug builds

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 17, 2020
    Configuration menu
    Copy the full SHA
    8716256 View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2020

  1. Use HavenCameraView instead of CameraView

    - aims to solve guardianproject#395 (comment)
    - According to https://developer.android.com/reference/androidx/lifecycle/DefaultLifecycleObserver
      [DefaultLifecycleObserver] should *always* be preferred over [androidx.lifecycle.LifecycleObserver]
      if we use Java 8. [CameraView] library targets Java 7 hence this implementation aims to ignore
      [androidx.lifecycle.OnLifecycleEvent] annotated methods in the super class and replace them with
      the callbacks implemeted in this sub class
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Apr 18, 2020
    Configuration menu
    Copy the full SHA
    b891062 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2020

  1. Update deps

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    07b9aa4 View commit details
    Browse the repository at this point in the history
  2. Adding CameraX dependencies

    - due to camerax preview lib we need to make minSDK to 21 from 16; if
    this is going to be a major problem we may need to go ahead without the
    preview lib
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    5b09e9f View commit details
    Browse the repository at this point in the history
  3. Remove unused codes

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    626bdc7 View commit details
    Browse the repository at this point in the history

Commits on Jun 12, 2020

  1. Add coroutines lib for concurrent tasks

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    13944af View commit details
    Browse the repository at this point in the history
  2. Initial implementation using CameraX

    - Use PreviewView instead of CameraView
    - MotionAnalyser as the image analysis Use Case to work with
    MotionDetector to detct motion
    - save image on motion detect and notify running service
    - Expose LiveData from MotionDetector for result; alternative to
    callbacks
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 12, 2020
    Configuration menu
    Copy the full SHA
    ef6c1a2 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2020

  1. Enable camera switching + use Events for notifying motion

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    e8c2825 View commit details
    Browse the repository at this point in the history
  2. Introduce a detection buffer

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    dc0734a View commit details
    Browse the repository at this point in the history
  3. Introduce Video Monitoring

    - current implementation does not allow both image and video capture
    simultaneously
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 13, 2020
    Configuration menu
    Copy the full SHA
    23e89e6 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2020

  1. Honor video monitoring length

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    b68e306 View commit details
    Browse the repository at this point in the history
  2. Stop monitoring and close activity after a delay

    - stop monitoring via a message to service instead of invoking from
    outside
    - close the activity after a delay of 3s to clean up video capture and
    image capture
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    492774d View commit details
    Browse the repository at this point in the history
  3. Remove unused code

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    9da31d4 View commit details
    Browse the repository at this point in the history
  4. Set up analyser while configuring camera

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 17, 2020
    Configuration menu
    Copy the full SHA
    54df268 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2020

  1. Camera configuration activity cleanup

    - listen on a live data of result instead of events
    - string formatting
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    0593cd7 View commit details
    Browse the repository at this point in the history
  2. Code cleanup

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    1c13cea View commit details
    Browse the repository at this point in the history
  3. Annotate methods with thread of execution

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 18, 2020
    Configuration menu
    Copy the full SHA
    f09ce95 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2020

  1. Version bump

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jun 28, 2020
    Configuration menu
    Copy the full SHA
    74e00f2 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Simultaneous video monitoring

    - Keep switch in preference to toggle simultaneous video monitoring
    - when on along with video monitoring both image and video will be
    captured; this will stop camera preview
    - when off but video monitoring on only video will be captured for the
    camera events and we will have image preview
    - video monitoring off will keep only image capture on
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    67e494b View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2020

  1. Remove deps

    - Copy image helper from cameraview lib
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jul 11, 2020
    Configuration menu
    Copy the full SHA
    2e096f3 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2020

  1. Update dependencies

    Signed-off-by: Arka Prava Basu <[email protected]>
    
    Update dependencies
    
    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    edf2f0c View commit details
    Browse the repository at this point in the history
  2. Add more helpers

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Dec 5, 2020
    Configuration menu
    Copy the full SHA
    a90c92a View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2021

  1. Add helpers

    Signed-off-by: Arka Prava Basu <[email protected]>
    archie94 committed Jul 13, 2021
    Configuration menu
    Copy the full SHA
    2509938 View commit details
    Browse the repository at this point in the history