From b900ca013e1fee1d0c64fc2a40879f99bb3724f8 Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Tue, 25 Jan 2022 08:07:15 -0500 Subject: [PATCH] test --- .github/stale.yml | 17 +++++++++++++++++ LICENSE | 13 +++++++++++++ README.md | 32 +++++++++++++++++++++++++++++++- __init__.py | 38 ++++++++++++++++++++++++++++++++++++++ opencv_conf.json | 5 +++++ plugin.json | 5 +++++ requirements.txt | 1 + 7 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 .github/stale.yml create mode 100644 LICENSE create mode 100644 __init__.py create mode 100644 opencv_conf.json create mode 100644 plugin.json create mode 100644 requirements.txt diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..dc90e5a --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,17 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - pinned + - security +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..130e443 --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + +Copyright (C) 2017 Sam Zick + +Everyone is permitted to copy and distribute verbatim or modified +copies of this license document, and changing it is allowed as long +as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/README.md b/README.md index 352983a..8c3224d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,32 @@ -# fHDHR_plugin_stream_opencv +

fHDHR stream Plugin vlc Logo

+ +Welcome to the world of streaming content as a DVR device! We use some fancy python here to achieve a system of: + +**f**un +**H**ome +**D**istribution +**H**iatus +**R**ecreation + +fHDHR is labeled as beta until we reach v1.0.0 + +Join us in `#fHDHR `_ on Freenode. + +# Installation + +1) Review Installation guide located at [Docs](https://github.com/fHDHR/fHDHR/blob/main/docs/README.md) + +2) Insert this plugin into the `plugins` directory of fHDHR using `git clone` or downloading a release zip file. + +3) Adjust your configuration file with the below settings: + +```` +[vlc] +# path = +```` + + +# Developer Note + +This was made as a plugin, instead of being included in core, due to its dependency on vlc. diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..3ed1de4 --- /dev/null +++ b/__init__.py @@ -0,0 +1,38 @@ +import cv2 + +# from fHDHR.exceptions import TunerError + + +class Plugin_OBJ(): + + def __init__(self, fhdhr, plugin_utils, stream_args, tuner): + self.fhdhr = fhdhr + self.plugin_utils = plugin_utils + self.stream_args = stream_args + self.tuner = tuner + + def get(self): + + def generate(): + + chunk_counter = 0 + + vid_cap = cv2.VideoCapture(self.stream_args["stream_info"]["url"]) + + try: + while (vid_cap.isOpened()): + + chunk_counter += 1 + self.fhdhr.logger.debug("Reading Chunk #%s" % chunk_counter) + + chunk = vid_cap.read() + + if not chunk: + break + + yield chunk + + except Exception as err: + self.fhdhr.logger.error("Chunk #%s unable to process: %s" % (chunk_counter, err)) + + return generate() diff --git a/opencv_conf.json b/opencv_conf.json new file mode 100644 index 0000000..c7e9d38 --- /dev/null +++ b/opencv_conf.json @@ -0,0 +1,5 @@ +{ + "opencv":{ + + } +} diff --git a/plugin.json b/plugin.json new file mode 100644 index 0000000..1d0e72e --- /dev/null +++ b/plugin.json @@ -0,0 +1,5 @@ +{ + "name":"opencv", + "version":"v0.6.0-beta", + "type":"alt_stream" +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6ab6d0d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +opencv-python-headless