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

Add the latest feature #81

Merged
merged 101 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
4bdc5bc
Update beta branch
marcelGoerentz Nov 6, 2024
1d471cf
Merge branch 'main' into beta
marcelGoerentz Nov 6, 2024
e77866f
Update beta branch
marcelGoerentz Nov 6, 2024
510c62d
Bugfix terminating streams and possible fix for counter error, unkill…
marcelGoerentz Nov 7, 2024
9a05190
Add fix
marcelGoerentz Nov 7, 2024
855c5a4
Update packages and extend API so client counter will now be displaye…
marcelGoerentz Nov 10, 2024
a45f7e9
Trying something
marcelGoerentz Nov 11, 2024
4596710
Reworked buffer is working for one client for each stream
marcelGoerentz Nov 17, 2024
fff27eb
Update Dockerfile and pipeline
marcelGoerentz Nov 17, 2024
22ebce7
Multiple Streams are now working! Need to check API response!
marcelGoerentz Nov 18, 2024
38081c5
Finish reworking the buffer
marcelGoerentz Nov 18, 2024
750d801
Update version
marcelGoerentz Nov 18, 2024
287f185
Add function to close client connection explicitly! Re arranged the c…
marcelGoerentz Nov 19, 2024
36296d8
Made some changes to the bufferig and streaming logic
marcelGoerentz Nov 19, 2024
0772c40
Add doku and fix issue in the API
marcelGoerentz Nov 19, 2024
e64362f
Adjust the sleep time so synchronizing the streams will be more fluently
marcelGoerentz Nov 19, 2024
980ad02
Add docu and error codes
marcelGoerentz Nov 20, 2024
5124ec7
Fine tuning of the buffer
marcelGoerentz Nov 20, 2024
d352061
Fix web client
marcelGoerentz Nov 21, 2024
4596167
More fine tuning of buffer
marcelGoerentz Nov 21, 2024
0184ef5
Not supporting VLC anymore! Add new / old Threadfin option again
marcelGoerentz Nov 22, 2024
e1b06f1
Reactivate the VLC option
marcelGoerentz Nov 24, 2024
2ca6c61
Allow rtp/rtsp urls
marcelGoerentz Nov 26, 2024
e8229ae
Reallign Threadfin buffer starting
marcelGoerentz Nov 26, 2024
f0605f5
Make RTP streaming possible
marcelGoerentz Nov 27, 2024
f723754
Testing stuff (#43)
marcelGoerentz Dec 27, 2024
45bc091
2nd Test (#44)
marcelGoerentz Dec 27, 2024
bd48c0a
3rd Test (#45)
marcelGoerentz Dec 27, 2024
a355c43
4th test (#46)
marcelGoerentz Dec 27, 2024
703bc66
5th test (#47)
marcelGoerentz Dec 27, 2024
b6e4f08
Update release yml file
marcelGoerentz Dec 27, 2024
b14f005
Update yml files and fix issue
marcelGoerentz Dec 27, 2024
4318ded
Update script
marcelGoerentz Dec 27, 2024
ca4de1e
Debug script
marcelGoerentz Dec 27, 2024
5776799
Debug script
marcelGoerentz Dec 27, 2024
f05444a
Debug script
marcelGoerentz Dec 27, 2024
45b9bd7
Finalize scripts
marcelGoerentz Dec 27, 2024
17d71fa
Fix version showing issues
marcelGoerentz Dec 27, 2024
5352441
Do some minor changes
marcelGoerentz Dec 27, 2024
4facbb0
Add beta to created tags
marcelGoerentz Dec 27, 2024
5933a42
Fix script
marcelGoerentz Dec 27, 2024
ad28f98
Merge branch 'beta' into Update_from_development
marcelGoerentz Dec 29, 2024
c0842a2
Merge pull request #48 from marcelGoerentz/Update_from_development
marcelGoerentz Dec 29, 2024
b113c83
Merge branch 'development' into beta
marcelGoerentz Dec 29, 2024
72578cd
Fix bug in yml file
marcelGoerentz Dec 29, 2024
842afcc
Merge branch 'development' into beta
marcelGoerentz Dec 29, 2024
08d8155
Merge branch 'development' into beta
marcelGoerentz Dec 29, 2024
023982e
Merge branch 'development' into beta
marcelGoerentz Dec 29, 2024
07bb441
Merge branch 'development' into beta
marcelGoerentz Dec 30, 2024
8391717
Merge branch 'beta' of github.com:marcelGoerentz/Threadfin into beta
marcelGoerentz Dec 30, 2024
ee2b5df
Update beta workflow
marcelGoerentz Dec 30, 2024
a08b021
Update beta workflow
marcelGoerentz Dec 30, 2024
a5b71c8
Update beta workflow
marcelGoerentz Dec 30, 2024
f3fa425
Update beta workflow
marcelGoerentz Dec 30, 2024
fb50bff
Update beta workflow
marcelGoerentz Dec 30, 2024
47a46cc
Update beta workflow
marcelGoerentz Dec 30, 2024
c4823e3
Update beta workflow
marcelGoerentz Dec 30, 2024
59e35e6
Update script and beta workflow
marcelGoerentz Dec 30, 2024
6b49234
Update script
marcelGoerentz Dec 30, 2024
2e6af43
Update script and beta workflow
marcelGoerentz Dec 30, 2024
8e4cb03
Update script names
marcelGoerentz Dec 30, 2024
e4bb6e4
Update beta workflow
marcelGoerentz Dec 30, 2024
b1a5545
Merge branch 'beta' into Fix_Buffer_In_RAM
marcelGoerentz Dec 31, 2024
192980a
Merge pull request #52 from marcelGoerentz/Fix_Buffer_In_RAM
marcelGoerentz Dec 31, 2024
6b7e2fe
Merge pull request #53 from marcelGoerentz/development
marcelGoerentz Jan 1, 2025
62f4a66
(#55) Add a button to change the Threadfin version within the webclient
marcelGoerentz Jan 3, 2025
5b5a02b
49 move version dialogue (#56)
marcelGoerentz Jan 5, 2025
b36f16f
* Improve the handling of the buffer/stream by adding some params to …
marcelGoerentz Jan 9, 2025
050f727
Hotfix webUI.go
marcelGoerentz Jan 9, 2025
a87be69
Hotfix buffer issue (#60)
marcelGoerentz Jan 9, 2025
631d681
Merge branch 'beta' into Update_web_client
marcelGoerentz Jan 9, 2025
511aede
Hotfix buffer
marcelGoerentz Jan 9, 2025
4a2baa5
Merge pull request #62 from marcelGoerentz/development
marcelGoerentz Jan 13, 2025
3cad7b8
Create release new beta version
marcelGoerentz Jan 16, 2025
b72eda5
Rework update (#68)
marcelGoerentz Jan 19, 2025
ae4a6f8
Add signature check for the updater
marcelGoerentz Jan 20, 2025
352fa0d
Enhance the security for deployment of Threadfin
marcelGoerentz Jan 21, 2025
44ec4a3
Enhance buffer performance (#69)
marcelGoerentz Jan 21, 2025
4dbc0ac
Update threadfin.go
marcelGoerentz Jan 21, 2025
a13f1fd
Merge pull request #70 from marcelGoerentz/development
marcelGoerentz Jan 21, 2025
036241d
Adapt beta workflow
marcelGoerentz Jan 21, 2025
be89be3
Merge pull request #71 from marcelGoerentz/development
marcelGoerentz Jan 21, 2025
53c771e
Adapt the other workflows
marcelGoerentz Jan 21, 2025
d20e67f
Update stream.go
marcelGoerentz Jan 21, 2025
4b067c5
Merge pull request #72 from marcelGoerentz/development
marcelGoerentz Jan 21, 2025
b4ed83f
First try
marcelGoerentz Jan 21, 2025
7d0f2b0
Enhance the buffer, buffer termination timeout is now working
marcelGoerentz Jan 22, 2025
1edf38a
Enhance the buffer
marcelGoerentz Jan 22, 2025
be4e539
Merge pull request #73 from marcelGoerentz/add_termination_timeout
marcelGoerentz Jan 22, 2025
b6e7f31
Add buffer termination timeout (#74)
marcelGoerentz Jan 22, 2025
4c03e92
Add translations for buffer termination timeout
marcelGoerentz Jan 22, 2025
70318f9
Add parsing for termination timeout in web client
marcelGoerentz Jan 22, 2025
3f7fdcb
Fix already closed buffer issue, fix little web client bug
marcelGoerentz Jan 23, 2025
f82d369
Merge branch 'beta' into development
marcelGoerentz Jan 23, 2025
bb50831
Enhance the download of playlist files, Enhance the streaming when tu…
marcelGoerentz Jan 24, 2025
af3efd4
Fix bug when the streaming tuner limit is reached and a custom image …
marcelGoerentz Jan 24, 2025
b1959f8
Added stream-loading.jpg to resources/images.
Renkyz Jan 24, 2025
76c4351
Add video file for stream loading
marcelGoerentz Jan 24, 2025
4636b3b
Add functionality to show a image unitl the real stream gets started
marcelGoerentz Jan 24, 2025
1374559
Merge pull request #78 from marcelGoerentz/add_wait_function_for_buffer
marcelGoerentz Jan 24, 2025
0609fc4
Revert the latest feature implementation
marcelGoerentz Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,6 +63,7 @@ jobs:
- name: Build binaries
run: |
go mod tidy && go mod vendor
echo "$PRIVATE_KEY=${{ secrets.SIGNING_KEY }}" >> $GITHUB_ENV
bash ${GITHUB_WORKSPACE}/Utility/create_binaries.sh beta

- name: Create a Release
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
contents: write
outputs:
new_version: ${{ steps.set-build-number.outputs.new_version }}
env:
PRIVATE_KEY: ${{ secrets.SIGNING_KEY }}

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
Expand Down Expand Up @@ -47,6 +50,7 @@ jobs:
- name: Build binaries
run: |
go mod tidy && go mod vendor
echo "$PRIVATE_KEY=${{ secrets.SIGNING_KEY }}" >> $GITHUB_ENV
bash ${GITHUB_WORKSPACE}/Utility/create_binaries.sh

- name: Create a Release
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ FROM base AS beta
RUN go build -tags beta .

FROM ${BUILD_FLAG} AS builder
ARG BRANCH
RUN echo "Build ${BRANCH} version"
ARG BUILD_FLAG
RUN echo "Build ${BUILD_FLAG} version"

# Second stage. Creating an image
# -----------------------------------------------------------------------------
Expand Down
61 changes: 58 additions & 3 deletions Utility/create_binaries.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,46 @@
#!/bin/bash

set -e

if [ -z "$PRIVATE_KEY" ]; then
echo "PRIVATE_KEY environment variable is not set. Exiting..."
exit 1
fi

function exitOnFailure {
echo "Build failed for ${1}/${2}. Exiting..."
rm threadfin_privkey.pem
exit 1
}

function verifySignature {
# Variables
binary_file="dist/${1}"
signature_file="signature.bin"
original_file="original_binary"
signature_size=256

# Extract the signature (assuming the signature is 256 bytes long)
tail -c $signature_size "$binary_file" > "$signature_file"

# Extract the original binary content
head -c -$signature_size "$binary_file" > "$original_file"

# Verify the signature
if ! openssl dgst -sha256 -verify threadfin_pubkey.pem -signature "$signature_file" "$original_file"; then
echo "Signature verification failed for ${1}. Exiting..."
exit 1
fi

# Clean up
rm "$signature_file" "$original_file"
}

os_list=("darwin" "freebsd" "linux" "windows")
arch_list=("amd64" "arm64")

echo "$PRIVATE_KEY" > threadfin_privkey.pem

for os in "${os_list[@]}"; do
export GOOS=$os
for arch in "${arch_list[@]}"; do
Expand All @@ -12,14 +50,31 @@ for os in "${os_list[@]}"; do
bin_string="${bin_string}_beta"
fi
bin_string="${bin_string}_${os}_${arch}"
sha_string="${bin_string}"
if [ "$os" = "windows" ]; then
bin_string="${bin_string}.exe"
fi
echo "Building ${bin_string}"
if [ "$1" = "beta" ]; then
go build -o "dist/${bin_string}" -tags beta
if ! go build -o "dist/${bin_string}" -tags beta; then
exitOnFailure "$os" "$arch"
fi
else
go build -o "dist/${bin_string}"
if ! go build -o "dist/${bin_string}"; then
exitOnFailure "$os" "$arch"
fi
fi

echo "Signing the binary"
openssl dgst -sha256 -sign threadfin_privkey.pem -out signature.bin "dist/${bin_string}"
cat signature.bin >> "dist/${bin_string}"

echo "Verify signature"
verifySignature "$bin_string"

echo "Calculating sha256 for ${bin_string}"
sha256sum "dist/${bin_string}" > "dist/${sha_string}.sha256"
done
done
done

rm threadfin_privkey.pem
22 changes: 22 additions & 0 deletions src/buffer-interface.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package src

import "io"

type BufferInterface interface {
StartBuffer(stream *Stream) error
StopBuffer()
CloseBuffer()
HandleByteOutput(stdOut io.ReadCloser)
PrepareBufferFolder(folder string) error
GetBufTmpFiles() []string
GetBufferedSize() int
addBufferedFilesToPipe()
DeleteOldestSegment()
CheckBufferFolder() (bool, error)
CheckBufferedFile(file string) (bool, error)
writeToPipe(file string) error
writeBytesToPipe(data []byte) error
GetPipeReader() *io.PipeReader
GetStopChan() chan struct{}
SetStopChan(chan struct{})
}
Loading