test
This commit is contained in:
parent
5614eafeb7
commit
b900ca013e
17
.github/stale.yml
vendored
Normal file
17
.github/stale.yml
vendored
Normal file
@ -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
|
||||||
13
LICENSE
Normal file
13
LICENSE
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2017 Sam Zick <Sam@deathbybandaid.net>
|
||||||
|
|
||||||
|
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.
|
||||||
32
README.md
32
README.md
@ -1,2 +1,32 @@
|
|||||||
# fHDHR_plugin_stream_opencv
|
<p align="center">fHDHR stream Plugin vlc <img src="docs/images/logo.ico" alt="Logo"/></p>
|
||||||
|
|
||||||
|
|
||||||
|
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 <irc://irc.freenode.net/#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.
|
||||||
|
|||||||
38
__init__.py
Normal file
38
__init__.py
Normal file
@ -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()
|
||||||
5
opencv_conf.json
Normal file
5
opencv_conf.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"opencv":{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
5
plugin.json
Normal file
5
plugin.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"name":"opencv",
|
||||||
|
"version":"v0.6.0-beta",
|
||||||
|
"type":"alt_stream"
|
||||||
|
}
|
||||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
opencv-python-headless
|
||||||
Loading…
Reference in New Issue
Block a user