diff --git a/Makefile b/Makefile index 2f75d520..c6ba4cae 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,9 @@ +deps: + @cd rtmp; $(MAKE) all + @echo "\n\nNow run sudo make install-deps\n" + +install-deps: + @cd rtmp; $(MAKE) install + all: - go build RevidCLI.go + go build -o RevidCLI ./cmd/revid-cli diff --git a/basicDriver.go b/cmd/basic-driver/main.go similarity index 100% rename from basicDriver.go rename to cmd/basic-driver/main.go diff --git a/RevidCLI.go b/cmd/revid-cli/main.go similarity index 100% rename from RevidCLI.go rename to cmd/revid-cli/main.go diff --git a/flv/audioTag.go b/flv/audio_tag.go similarity index 87% rename from flv/audioTag.go rename to flv/audio_tag.go index be8edce4..397bc9d6 100644 --- a/flv/audioTag.go +++ b/flv/audio_tag.go @@ -1,15 +1,15 @@ /* NAME - audioTag.go + audio_tag.go DESCRIPTION See Readme.md AUTHORS - Saxon Nelson-Milton + Saxon Nelson-Milton LICENSE - audioTag.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + audio_tag.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package flv diff --git a/flv/FLV.go b/flv/flv.go similarity index 87% rename from flv/FLV.go rename to flv/flv.go index 530c351c..dd2b7a04 100644 --- a/flv/FLV.go +++ b/flv/flv.go @@ -1,15 +1,15 @@ /* NAME - FLV.go + flv.go DESCRIPTION See Readme.md AUTHORS - Saxon A. Nelson-Milton + Saxon A. Nelson-Milton LICENSE - FLV.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + flv.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package flv diff --git a/flv/videoTag.go b/flv/video_tag.go similarity index 88% rename from flv/videoTag.go rename to flv/video_tag.go index 6c1f658a..cfc27fa8 100644 --- a/flv/videoTag.go +++ b/flv/video_tag.go @@ -1,15 +1,15 @@ /* NAME - videoTag.go + video_tag.go DESCRIPTION See Readme.md AUTHORS - Saxon Nelson-Milton + Saxon Nelson-Milton LICENSE - videoTag.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + video_tag.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package flv diff --git a/generator/FLVGenerator.go b/generator/flv_generator.go similarity index 97% rename from generator/FLVGenerator.go rename to generator/flv_generator.go index 826addc6..7c6d6ddd 100644 --- a/generator/FLVGenerator.go +++ b/generator/flv_generator.go @@ -1,6 +1,6 @@ /* NAME - FLVGenerator.go + flv_generator.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - FLVGenerator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + flv_generator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package generator diff --git a/generator/Generator.go b/generator/generator.go similarity index 82% rename from generator/Generator.go rename to generator/generator.go index f47869ef..5e04fb3d 100644 --- a/generator/Generator.go +++ b/generator/generator.go @@ -1,6 +1,6 @@ /* NAME - Generator.go + generator.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - Generator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + generator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package generator diff --git a/generator/MPEGTSGenerator.go b/generator/mpegts_generator.go similarity index 96% rename from generator/MPEGTSGenerator.go rename to generator/mpegts_generator.go index f6ca5070..2cc4792e 100644 --- a/generator/MPEGTSGenerator.go +++ b/generator/mpegts_generator.go @@ -1,6 +1,6 @@ /* NAME - MPEGTSGenerator.go + mpegts_generator.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - MPEGTSGenerator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + mpegts_generator.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,17 +22,14 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package generator import ( "bitbucket.org/ausocean/av/mpegts" "bitbucket.org/ausocean/av/pes" - /* - "../mpegts" - "../pes" - */) +) const mpegtsPacketSize = 184 diff --git a/generator/tsgenerator_test.go b/generator/tsgenerator_test.go deleted file mode 100644 index 7fd0d500..00000000 --- a/generator/tsgenerator_test.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -NAME - RtpToTsConverter.go - provides utilities for the conversion of Rtp packets - to equivalent MpegTs packets. - -DESCRIPTION - See Readme.md - -AUTHOR - Saxon Nelson-Milton - -LICENSE - RtpToTsConverter.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) - - It is free software: you can redistribute it and/or modify them - under the terms of the GNU General Public License as published by the - Free Software Foundation, either version 3 of the License, or (at your - option) any later version. - - It is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). -*/ - -package generator diff --git a/parser/H264Parser.go b/parser/h264.go similarity index 95% rename from parser/H264Parser.go rename to parser/h264.go index 06766c7a..0ad65c6a 100644 --- a/parser/H264Parser.go +++ b/parser/h264.go @@ -1,6 +1,6 @@ /* NAME - H264Parser.go + h264.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - H264Parser.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + h264.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package parser diff --git a/parser/MJPEGParser.go b/parser/mjpeg.go similarity index 89% rename from parser/MJPEGParser.go rename to parser/mjpeg.go index 46aad057..2c9a8736 100644 --- a/parser/MJPEGParser.go +++ b/parser/mjpeg.go @@ -1,6 +1,6 @@ /* NAME - MJPEGParser.go + mjpeg.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - MJPEGParser.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + mjpeg.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,14 +22,12 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package parser -const ( - frameStartCode = 0xD8 -) +const frameStartCode = 0xD8 type mjpegParser struct { inputBuffer []byte diff --git a/parser/Parser.go b/parser/parser.go similarity index 80% rename from parser/Parser.go rename to parser/parser.go index 1d68dbb9..59ac5448 100644 --- a/parser/Parser.go +++ b/parser/parser.go @@ -1,6 +1,6 @@ /* NAME - Parser.go + parser.go DESCRIPTION See Readme.md @@ -9,7 +9,7 @@ AUTHOR Saxon Nelson-Milton LICENSE - RtpToTsConverter.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + parser.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -22,7 +22,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licensesx). */ package parser @@ -33,9 +33,7 @@ import ( ) // h264 consts -const ( - acceptedLength = 1000 -) +const acceptedLength = 1000 var ( Info *log.Logger diff --git a/pes/Pes.go b/pes/pes.go similarity index 95% rename from pes/Pes.go rename to pes/pes.go index 413c1732..82cccafe 100644 --- a/pes/Pes.go +++ b/pes/pes.go @@ -1,6 +1,6 @@ /* NAME - PES.go - + pes.go - DESCRIPTION See Readme.md @@ -8,7 +8,7 @@ AUTHOR Saxon A. Nelson-Milton LICENSE - PES.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) + pes.go is Copyright (C) 2017 the Australian Ocean Lab (AusOcean) It is free software: you can redistribute it and/or modify them under the terms of the GNU General Public License as published by the @@ -21,19 +21,14 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package pes -import ( - "bitbucket.org/ausocean/av/tools" - //"../tools" -) +import "bitbucket.org/ausocean/av/tools" -const ( - maxPesSize = 10000 -) +const maxPesSize = 10000 /* The below data struct encapsulates the fields of an PES packet. Below is diff --git a/pes/pes_test.go b/pes/pes_test.go index e99d2bd8..172e11c2 100644 --- a/pes/pes_test.go +++ b/pes/pes_test.go @@ -23,7 +23,7 @@ LICENSE for more details. You should have received a copy of the GNU General Public License - along with revid in gpl.txt. If not, see [GNU licenses](http://www.gnu.org/licenses). + along with revid in gpl.txt. If not, see http://www.gnu.org/licenses. */ package pes