10 |
11 |
41 |
--------------------------------------------------------------------------------
/live555/config.iphone-simulator:
--------------------------------------------------------------------------------
1 | # Change the following version number, if necessary, before running "genMakefiles iphoneos"
2 | IOS_VERSION = 6.1
3 |
4 | DEVELOPER_PATH = /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer
5 | TOOL_PATH = $(DEVELOPER_PATH)/usr/bin
6 | SDK_PATH = $(DEVELOPER_PATH)/SDKs
7 | SDK = $(SDK_PATH)/iPhoneSimulator$(IOS_VERSION).sdk
8 | COMPILE_OPTS = $(INCLUDES) -I. $(EXTRA_LDFLAGS) -DBSD=1 -O2 -DSOCKLEN_T=socklen_t -DHAVE_SOCKADDR_LEN=1 -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC -arch i386 --sysroot=$(SDK)
9 | C = c
10 | C_COMPILER = $(TOOL_PATH)/gcc
11 | C_FLAGS = $(COMPILE_OPTS)
12 | CPP = cpp
13 | CPLUSPLUS_COMPILER = $(TOOL_PATH)/g++
14 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall
15 | OBJ = o
16 | LINK = $(TOOL_PATH)/g++ -o
17 | LINK_OPTS = -L. -arch i386 --sysroot=$(SDK) -L$(SDK)/usr/lib/system
18 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
19 | LIBRARY_LINK = libtool -s -o
20 | LIBRARY_LINK_OPTS =
21 | LIB_SUFFIX = a
22 | LIBS_FOR_CONSOLE_APPLICATION =
23 | LIBS_FOR_GUI_APPLICATION =
24 | EXE =
25 |
--------------------------------------------------------------------------------
/ipcam/static/jquery.waitforimages.min.js:
--------------------------------------------------------------------------------
1 | /*! waitForImages jQuery Plugin 2013-07-20 */
2 | !function(a){var b="waitForImages";a.waitForImages={hasImageProperties:["backgroundImage","listStyleImage","borderImage","borderCornerImage","cursor"]},a.expr[":"].uncached=function(b){if(!a(b).is('img[src!=""]'))return!1;var c=new Image;return c.src=b.src,!c.complete},a.fn.waitForImages=function(c,d,e){var f=0,g=0;if(a.isPlainObject(arguments[0])&&(e=arguments[0].waitForAll,d=arguments[0].each,c=arguments[0].finished),c=c||a.noop,d=d||a.noop,e=!!e,!a.isFunction(c)||!a.isFunction(d))throw new TypeError("An invalid callback was supplied.");return this.each(function(){var h=a(this),i=[],j=a.waitForImages.hasImageProperties||[],k=/url\(\s*(['"]?)(.*?)\1\s*\)/g;e?h.find("*").addBack().each(function(){var b=a(this);b.is("img:uncached")&&i.push({src:b.attr("src"),element:b[0]}),a.each(j,function(a,c){var d,e=b.css(c);if(!e)return!0;for(;d=k.exec(e);)i.push({src:d[2],element:b[0]})})}):h.find("img:uncached").each(function(){i.push({src:this.src,element:this})}),f=i.length,g=0,0===f&&c.call(h[0]),a.each(i,function(e,i){var j=new Image;a(j).on("load."+b+" error."+b,function(a){return g++,d.call(i.element,g,f,"load"==a.type),g==f?(c.call(h[0]),!1):void 0}),j.src=i.src})})}}(jQuery);
--------------------------------------------------------------------------------
/live555/liveMedia/FramedFileSource.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Framed File Sources
19 | // Implementation
20 |
21 | #include "FramedFileSource.hh"
22 |
23 | ////////// FramedFileSource //////////
24 |
25 | FramedFileSource::FramedFileSource(UsageEnvironment& env, FILE* fid)
26 | : FramedSource(env), fFid(fid) {
27 | }
28 |
29 | FramedFileSource::~FramedFileSource() {
30 | }
31 |
--------------------------------------------------------------------------------
/live555/groupsock/include/IOHandlers.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "mTunnel" multicast access service
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // IO event handlers
19 | // C++ header
20 |
21 | #ifndef _IO_HANDLERS_HH
22 | #define _IO_HANDLERS_HH
23 |
24 | #ifndef _NET_INTERFACE_HH
25 | #include "NetInterface.hh"
26 | #endif
27 |
28 | // Handles incoming data on sockets:
29 | void socketReadHandler(Socket* sock, int mask);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/OutputFile.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Common routines for opening/closing named output files
19 | // C++ header
20 |
21 | #ifndef _OUTPUT_FILE_HH
22 | #define _OUTPUT_FILE_HH
23 |
24 | #include
25 | #include
26 |
27 | FILE* OpenOutputFile(UsageEnvironment& env, char const* fileName);
28 |
29 | void CloseOutputFile(FILE* fid);
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/ipcam/templates/user/settings_user.html:
--------------------------------------------------------------------------------
1 | $def with (name, str, settings)
2 |
3 | $var title: 帐户设置
4 | $var css:
5 | $var js:
6 | $var name: $str $name
7 | $var load:
8 |
9 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/FramedFileSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Framed File Sources
19 | // C++ header
20 |
21 | #ifndef _FRAMED_FILE_SOURCE_HH
22 | #define _FRAMED_FILE_SOURCE_HH
23 |
24 | #ifndef _FRAMED_SOURCE_HH
25 | #include "FramedSource.hh"
26 | #endif
27 |
28 | class FramedFileSource: public FramedSource {
29 | protected:
30 | FramedFileSource(UsageEnvironment& env, FILE* fid); // abstract base class
31 | virtual ~FramedFileSource();
32 |
33 | protected:
34 | FILE* fFid;
35 | };
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/ipcam/templates/user/portal.html:
--------------------------------------------------------------------------------
1 | $def with (name, str)
2 |
3 | $var title: 首页
4 | $var css:
5 | $var js:
6 | $var name: $str $name
7 | $var load:
8 |
9 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/live555/UsageEnvironment/include/strDup.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 |
17 | #ifndef _STRDUP_HH
18 | #define _STRDUP_HH
19 |
20 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
21 | // A C++ equivalent to the standard C routine "strdup()".
22 | // This generates a char* that can be deleted using "delete[]"
23 | // Header
24 |
25 | char* strDup(char const* str);
26 | // Note: strDup(NULL) returns NULL
27 |
28 | char* strDupSize(char const* str);
29 | // Like "strDup()", except that it *doesn't* copy the original.
30 | // (Instead, it just allocates a string of the same size as the original.)
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/live555/UsageEnvironment/include/Boolean.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | #ifndef _BOOLEAN_HH
17 | #define _BOOLEAN_HH
18 |
19 | #if defined(__BORLANDC__) || (!defined(USE_LIVE555_BOOLEAN) && defined(_MSC_VER) && _MSC_VER >= 1400)
20 | // Use the "bool" type defined by the Borland compiler, and MSVC++ 8.0, Visual Studio 2005 and higher
21 | typedef bool Boolean;
22 | #define False false
23 | #define True true
24 | #else
25 | typedef unsigned char Boolean;
26 | #ifndef __MSHTML_LIBRARY_DEFINED__
27 | #ifndef False
28 | const Boolean False = 0;
29 | #endif
30 | #ifndef True
31 | const Boolean True = 1;
32 | #endif
33 |
34 | #endif
35 | #endif
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/live555/UsageEnvironment/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | NAME = libUsageEnvironment
4 | USAGE_ENVIRONMENT_LIB = $(NAME).$(LIB_SUFFIX)
5 | ALL = $(USAGE_ENVIRONMENT_LIB)
6 | all: $(ALL)
7 |
8 | OBJS = UsageEnvironment.$(OBJ) HashTable.$(OBJ) strDup.$(OBJ)
9 |
10 | $(USAGE_ENVIRONMENT_LIB): $(OBJS)
11 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) $(OBJS)
12 |
13 | .$(C).$(OBJ):
14 | $(C_COMPILER) -c $(C_FLAGS) $<
15 |
16 | .$(CPP).$(OBJ):
17 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
18 |
19 | UsageEnvironment.$(CPP): include/UsageEnvironment.hh
20 | include/UsageEnvironment.hh: include/UsageEnvironment_version.hh include/Boolean.hh include/strDup.hh
21 | HashTable.$(CPP): include/HashTable.hh
22 | include/HashTable.hh: include/Boolean.hh
23 | strDup.$(CPP): include/strDup.hh
24 |
25 | clean:
26 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
27 |
28 | install: install1 $(INSTALL2)
29 | install1: $(USAGE_ENVIRONMENT_LIB)
30 | install -d $(DESTDIR)$(PREFIX)/include/UsageEnvironment $(DESTDIR)$(LIBDIR)
31 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/UsageEnvironment
32 | install -m 644 $(USAGE_ENVIRONMENT_LIB) $(DESTDIR)$(LIBDIR)
33 | install_shared_libraries: $(USAGE_ENVIRONMENT_LIB)
34 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX)
35 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so
36 |
37 | ##### Any additional, platform-specific rules come here:
38 |
--------------------------------------------------------------------------------
/ipcam/src/config/mongosession.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | from web.session import Store
5 | import time
6 |
7 | class MongoStore(Store):
8 | def __init__(self, db, collection_name):
9 | self.collection = db[collection_name]
10 |
11 | def __contains__(self, key):
12 | data = self.collection.find_one({'session_id':key})
13 | return bool(data)
14 |
15 | def __getitem__(self, key):
16 | now = time.time()
17 | s = self.collection.find_one({'session_id':key})
18 | if not s:
19 | raise KeyError
20 | else:
21 | s.update({'attime':now})
22 | return s
23 |
24 | def __setitem__(self, key, value):
25 | now = time.time()
26 |
27 | value['attime'] = now
28 |
29 | s = self.collection.find_one({'session_id':key})
30 | if s:
31 | value = dict(map(lambda x: (str(x[0]), x[1]), [(k,v) for (k,v) in value.iteritems() if k not in ['_id']]))
32 | s.update(**value)
33 | self.collection.save(s)
34 | else:
35 | self.collection.insert(value)
36 |
37 | def __delitem__(self, key):
38 | self.collection.remove({'session_id':key})
39 |
40 | def cleanup(self, timeout):
41 | timeout = timeout/(24.0*60*60) #timedelta takes numdays as arg
42 | last_allowed_time = time.time() - timeout
43 | self.collection.remove({'attime' : { '$lt' : last_allowed_time}})
--------------------------------------------------------------------------------
/live555/liveMedia/AMRAudioSource.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A source object for AMR audio sources
19 | // Implementation
20 |
21 | #include "AMRAudioSource.hh"
22 |
23 | AMRAudioSource::AMRAudioSource(UsageEnvironment& env,
24 | Boolean isWideband, unsigned numChannels)
25 | : FramedSource(env),
26 | fIsWideband(isWideband), fNumChannels(numChannels), fLastFrameHeader(0) {
27 | }
28 |
29 | AMRAudioSource::~AMRAudioSource() {
30 | }
31 |
32 | char const* AMRAudioSource::MIMEtype() const {
33 | return "audio/AMR";
34 | }
35 |
36 | Boolean AMRAudioSource::isAMRAudioSource() const {
37 | return True;
38 | }
39 |
--------------------------------------------------------------------------------
/live555/liveMedia/TextRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for text codecs (abstract base class)
19 | // Implementation
20 |
21 | #include "TextRTPSink.hh"
22 |
23 | TextRTPSink::TextRTPSink(UsageEnvironment& env,
24 | Groupsock* rtpgs, unsigned char rtpPayloadType,
25 | unsigned rtpTimestampFrequency,
26 | char const* rtpPayloadFormatName)
27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency,
28 | rtpPayloadFormatName) {
29 | }
30 |
31 | TextRTPSink::~TextRTPSink() {
32 | }
33 |
34 | char const* TextRTPSink::sdpMediaType() const {
35 | return "text";
36 | }
37 |
--------------------------------------------------------------------------------
/live555/liveMedia/FileServerMediaSubsession.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
19 | // on demand, from a file.
20 | // Implementation
21 |
22 | #include "FileServerMediaSubsession.hh"
23 |
24 | FileServerMediaSubsession
25 | ::FileServerMediaSubsession(UsageEnvironment& env, char const* fileName,
26 | Boolean reuseFirstSource)
27 | : OnDemandServerMediaSubsession(env, reuseFirstSource),
28 | fFileSize(0) {
29 | fFileName = strDup(fileName);
30 | }
31 |
32 | FileServerMediaSubsession::~FileServerMediaSubsession() {
33 | delete[] (char*)fFileName;
34 | }
35 |
--------------------------------------------------------------------------------
/live555/liveMedia/VideoRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for video codecs (abstract base class)
19 | // Implementation
20 |
21 | #include "VideoRTPSink.hh"
22 |
23 | VideoRTPSink::VideoRTPSink(UsageEnvironment& env,
24 | Groupsock* rtpgs, unsigned char rtpPayloadType,
25 | unsigned rtpTimestampFrequency,
26 | char const* rtpPayloadFormatName)
27 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency,
28 | rtpPayloadFormatName) {
29 | }
30 |
31 | VideoRTPSink::~VideoRTPSink() {
32 | }
33 |
34 | char const* VideoRTPSink::sdpMediaType() const {
35 | return "video";
36 | }
37 |
--------------------------------------------------------------------------------
/live555/rec/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | REC = rec$(EXE)
4 |
5 | PREFIX = /usr/local
6 | ALL = $(REC)
7 | all: $(ALL)
8 |
9 | C_FLAGS += -O1
10 | C_FLAGS += -Wall
11 | C_FLAGS += -W -Wstrict-prototypes
12 | #C_FLAGS += -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112L
13 | #C_FLAGS += -DLINUX
14 |
15 | .$(C).$(OBJ):
16 | $(C_COMPILER) -c $(C_FLAGS) $<
17 | .$(CPP).$(OBJ):
18 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
19 |
20 | REC_OBJS = rec.$(OBJ) http_lib.$(OBJ) kam.$(OBJ) main.$(OBJ)
21 |
22 | rec.$(CPP): rec.hh kam.h
23 |
24 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment
25 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX)
26 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment
27 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX)
28 | LIVEMEDIA_DIR = ../liveMedia
29 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
30 | GROUPSOCK_DIR = ../groupsock
31 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
32 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
33 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
34 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION) -lpthread
35 |
36 | $(REC): $(REC_OBJS) $(LOCAL_LIBS)
37 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(REC_OBJS) $(LIBS)
38 |
39 |
40 | clean:
41 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
42 |
43 | ##### Any additional, platform-specific rules come here:
44 |
--------------------------------------------------------------------------------
/live555/UsageEnvironment/strDup.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
17 | // A C++ equivalent to the standard C routine "strdup()".
18 | // This generates a char* that can be deleted using "delete[]"
19 | // Implementation
20 |
21 | #include "strDup.hh"
22 | #include "string.h"
23 |
24 | char* strDup(char const* str) {
25 | if (str == NULL) return NULL;
26 | size_t len = strlen(str) + 1;
27 | char* copy = new char[len];
28 |
29 | if (copy != NULL) {
30 | memcpy(copy, str, len);
31 | }
32 | return copy;
33 | }
34 |
35 | char* strDupSize(char const* str) {
36 | if (str == NULL) return NULL;
37 | size_t len = strlen(str) + 1;
38 | char* copy = new char[len];
39 |
40 | return copy;
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2020, jack139.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | 1. Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 |
10 | 2. Redistributions in binary form must reproduce the above copyright
11 | notice, this list of conditions and the following disclaimer in the
12 | documentation and/or other materials provided with the distribution.
13 |
14 | 3. Neither the name of the copyright holder nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
21 | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
24 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
26 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/live555/liveMedia/AudioRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for audio codecs (abstract base class)
19 | // Implementation
20 |
21 | #include "AudioRTPSink.hh"
22 |
23 | AudioRTPSink::AudioRTPSink(UsageEnvironment& env,
24 | Groupsock* rtpgs, unsigned char rtpPayloadType,
25 | unsigned rtpTimestampFrequency,
26 | char const* rtpPayloadFormatName,
27 | unsigned numChannels)
28 | : MultiFramedRTPSink(env, rtpgs, rtpPayloadType, rtpTimestampFrequency,
29 | rtpPayloadFormatName, numChannels) {
30 | }
31 |
32 | AudioRTPSink::~AudioRTPSink() {
33 | }
34 |
35 | char const* AudioRTPSink::sdpMediaType() const {
36 | return "audio";
37 | }
38 |
--------------------------------------------------------------------------------
/live555/Makefile:
--------------------------------------------------------------------------------
1 | ##### Change the following for your environment:
2 | COMPILE_OPTS = $(INCLUDES) -I. -O -DSOCKLEN_T=socklen_t -DXLOCALE_NOT_USED=1
3 | C = c
4 | C_COMPILER = gcc
5 | C_FLAGS = $(COMPILE_OPTS) -DUSE_OUR_BZERO=1 -D__CYGWIN__
6 | CPP = cpp
7 | CPLUSPLUS_COMPILER = c++
8 | CPLUSPLUS_FLAGS = $(COMPILE_OPTS) -Wall -DBSD=1
9 | OBJ = o
10 | LINK = c++ -o
11 | LINK_OPTS = -L.
12 | CONSOLE_LINK_OPTS = $(LINK_OPTS)
13 | LIBRARY_LINK = ld -o
14 | LIBRARY_LINK_OPTS = $(LINK_OPTS) -r -Bstatic
15 | LIB_SUFFIX = a
16 | LIBS_FOR_CONSOLE_APPLICATION =
17 | LIBS_FOR_GUI_APPLICATION =
18 | EXE =
19 | ##### End of variables to change
20 |
21 | LIVEMEDIA_DIR = liveMedia
22 | GROUPSOCK_DIR = groupsock
23 | USAGE_ENVIRONMENT_DIR = UsageEnvironment
24 | BASIC_USAGE_ENVIRONMENT_DIR = BasicUsageEnvironment
25 |
26 | STREAM = streaming
27 | REC = rec
28 |
29 | all:
30 | cd $(LIVEMEDIA_DIR) ; $(MAKE)
31 | cd $(GROUPSOCK_DIR) ; $(MAKE)
32 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE)
33 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE)
34 | cd $(STREAM) ; $(MAKE)
35 | cd $(REC) ; $(MAKE)
36 |
37 | install:
38 |
39 | clean:
40 | cd $(LIVEMEDIA_DIR) ; $(MAKE) clean
41 | cd $(GROUPSOCK_DIR) ; $(MAKE) clean
42 | cd $(USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean
43 | cd $(BASIC_USAGE_ENVIRONMENT_DIR) ; $(MAKE) clean
44 | cd $(STREAM) ; $(MAKE) clean
45 | cd $(REC) ; $(MAKE) clean
46 |
47 | distclean: clean
48 | -rm -f $(LIVEMEDIA_DIR)/Makefile $(GROUPSOCK_DIR)/Makefile \
49 | $(USAGE_ENVIRONMENT_DIR)/Makefile $(BASIC_USAGE_ENVIRONMENT_DIR)/Makefile \
50 | $(STREAM)/Makefile Makefile $(REC)/Makefile Makefile
51 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/QCELPAudioRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Qualcomm "PureVoice" (aka. "QCELP") Audio RTP Sources
19 | // C++ header
20 |
21 | #ifndef _QCELP_AUDIO_RTP_SOURCE_HH
22 | #define _QCELP_AUDIO_RTP_SOURCE_HH
23 |
24 | #ifndef _RTP_SOURCE_HH
25 | #include "RTPSource.hh"
26 | #endif
27 |
28 | class QCELPAudioRTPSource {
29 | public:
30 | static FramedSource* createNew(UsageEnvironment& env,
31 | Groupsock* RTPgs,
32 | RTPSource*& resultRTPSource,
33 | unsigned char rtpPayloadFormat = 12,
34 | unsigned rtpTimestampFrequency = 8000);
35 | // This returns a source to read from, but "resultRTPSource" will
36 | // point to RTP-related state.
37 | };
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/live555/liveMedia/JPEGVideoSource.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // JPEG video sources
19 | // Implementation
20 |
21 | #include "JPEGVideoSource.hh"
22 |
23 | JPEGVideoSource::JPEGVideoSource(UsageEnvironment& env)
24 | : FramedSource(env) {
25 | }
26 |
27 | JPEGVideoSource::~JPEGVideoSource() {
28 | }
29 |
30 | u_int8_t const* JPEGVideoSource::quantizationTables(u_int8_t& precision,
31 | u_int16_t& length) {
32 | // Default implementation
33 | precision = 0;
34 | length = 0;
35 | return NULL;
36 | }
37 |
38 | u_int16_t JPEGVideoSource::restartInterval() {
39 | // Default implementation
40 | return 0;
41 | }
42 |
43 | Boolean JPEGVideoSource::isJPEGVideoSource() const {
44 | return True;
45 | }
46 |
--------------------------------------------------------------------------------
/ipcam/src/config/url.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 |
4 | urls = (
5 | '/', 'Login',
6 | '/login', 'Login',
7 | '/logout', 'Reset',
8 | '/live2', 'LiveCam2',
9 | '/search', 'Search',
10 | '/settings_add_kam','SettingsAddKam',
11 | '/settings_del', 'SettingsDelCam',
12 | '/settings_cams', 'SettingsCamsList',
13 | '/settings', 'Settings',
14 | '/settings_user', 'SettingsUser',
15 | '/replay', 'Replay',
16 | '/alert_log', 'AlertQuery',
17 | '/alert_info', 'AlertInfo',
18 | '/snapshot', 'Snapshot',
19 | '/article', 'Aticle',
20 | '/shadow_setting', 'ShadowSetting',
21 | '/download', 'Download',
22 |
23 | '/admin/order', 'AdminOrder',
24 | '/admin/order_setting','AdminOrderSetting',
25 | '/admin/order_add', 'AdminOrderAdd',
26 | '/admin/order_del', 'AdminOrderDel',
27 | '/admin/kam', 'AdminKam',
28 | '/admin/kam_setting', 'AdminKamSetting',
29 | '/admin/kam_add', 'AdminKamAdd',
30 | '/admin/kam_del', 'AdminKamDel',
31 | '/admin/user', 'AdminUser',
32 | '/admin/user_setting', 'AdminUserSetting',
33 | '/admin/user_add', 'AdminUserAdd',
34 | '/admin/self_setting', 'AdminSelfSetting',
35 | '/admin/sys_setting', 'AdminSysSetting',
36 | '/admin/status', 'AdminStatus',
37 | '/admin/data', 'AdminData',
38 |
39 | '/kam/handshake', 'KamHandshake',
40 | '/kam/conf', 'KamConf',
41 | )
42 |
--------------------------------------------------------------------------------
/ipcam/templates/admin/status.html:
--------------------------------------------------------------------------------
1 | $def with (name, str, info)
2 |
3 | $var title: 系统状态
4 | $var css:
5 | $var js:
6 | $var name: $str $name
7 |
8 |
系统状态
9 |
10 |
$info['uptime']
11 | $for l in info['df_data']:
12 |
$l
13 |
14 |
15 |
进程状态:
16 |
17 |
18 |
Web界面
$info['ipcam']
19 |
视频录像
$info['rec']
20 |
视频回放
$info['stream']
21 |
远程同步
$info['sync']
22 |
移动侦测
$info['detector']
23 |
守护进程
$info['daemon']
24 |
25 |
26 |
backbone日志:
27 | $for l in info['backbone_log']:
28 |
$l
29 |
30 |
daemon日志:
31 | $for l in info['daemon_log']:
32 |
$l
33 |
34 |
detector日志:
35 | $for l in info['detector_log']:
36 |
$l
37 |
38 |
stream日志:
39 | $for l in info['stream_log']:
40 |
$l
41 |
42 |
sync日志:
43 | $for l in info['sync_log']:
44 |
$l
45 |
46 |
bar.js日志:
47 | $for l in info['barjs_log']:
48 |
$l
49 |
50 |
Nginx error日志:
51 | $for l in info['error_log']:
52 |
$l
53 |
54 |
uWSGI日志:
55 | $for l in info['uwsgi_log']:
56 |
$l
57 |
58 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/MP3Transcoder.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // MP3 Transcoder
19 | // C++ header
20 |
21 | #ifndef _MP3_TRANSCODER_HH
22 | #define _MP3_TRANSCODER_HH
23 |
24 | #ifndef _MP3_ADU_HH
25 | #include "MP3ADU.hh"
26 | #endif
27 | #ifndef _MP3_ADU_TRANSCODER_HH
28 | #include "MP3ADUTranscoder.hh"
29 | #endif
30 |
31 | class MP3Transcoder: public MP3FromADUSource {
32 | public:
33 | static MP3Transcoder* createNew(UsageEnvironment& env,
34 | unsigned outBitrate /* in kbps */,
35 | FramedSource* inputSource);
36 |
37 | protected:
38 | MP3Transcoder(UsageEnvironment& env,
39 | MP3ADUTranscoder* aduTranscoder);
40 | // called only by createNew()
41 | virtual ~MP3Transcoder();
42 | };
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/live555/streaming/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | STREAMING = streaming$(EXE)
4 |
5 | PREFIX = /usr/local
6 | ALL = $(STREAMING)
7 | all: $(ALL)
8 |
9 | C_FLAGS += -O1
10 | C_FLAGS += -Wall
11 | C_FLAGS += -W -Wstrict-prototypes
12 | #C_FLAGS += -D_BSD_SOURCE -D_POSIX_C_SOURCE=200112L
13 | #C_FLAGS += -DLINUX
14 |
15 | .$(C).$(OBJ):
16 | $(C_COMPILER) -c $(C_FLAGS) $<
17 | .$(CPP).$(OBJ):
18 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
19 |
20 | STREAMING_OBJS = streaming.$(OBJ) DynamicRTSPServer.$(OBJ)
21 |
22 | streaming.$(CPP): DynamicRTSPServer.hh
23 | DynamicRTSPServer.$(CPP): DynamicRTSPServer.hh
24 |
25 | USAGE_ENVIRONMENT_DIR = ../UsageEnvironment
26 | USAGE_ENVIRONMENT_LIB = $(USAGE_ENVIRONMENT_DIR)/libUsageEnvironment.$(libUsageEnvironment_LIB_SUFFIX)
27 | BASIC_USAGE_ENVIRONMENT_DIR = ../BasicUsageEnvironment
28 | BASIC_USAGE_ENVIRONMENT_LIB = $(BASIC_USAGE_ENVIRONMENT_DIR)/libBasicUsageEnvironment.$(libBasicUsageEnvironment_LIB_SUFFIX)
29 | LIVEMEDIA_DIR = ../liveMedia
30 | LIVEMEDIA_LIB = $(LIVEMEDIA_DIR)/libliveMedia.$(libliveMedia_LIB_SUFFIX)
31 | GROUPSOCK_DIR = ../groupsock
32 | GROUPSOCK_LIB = $(GROUPSOCK_DIR)/libgroupsock.$(libgroupsock_LIB_SUFFIX)
33 | LOCAL_LIBS = $(LIVEMEDIA_LIB) $(GROUPSOCK_LIB) \
34 | $(BASIC_USAGE_ENVIRONMENT_LIB) $(USAGE_ENVIRONMENT_LIB)
35 | LIBS = $(LOCAL_LIBS) $(LIBS_FOR_CONSOLE_APPLICATION)
36 |
37 | $(STREAMING): $(STREAMING_OBJS) $(LOCAL_LIBS)
38 | $(LINK)$@ $(CONSOLE_LINK_OPTS) $(STREAMING_OBJS) $(LIBS)
39 |
40 |
41 | clean:
42 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
43 |
44 | ##### Any additional, platform-specific rules come here:
45 |
--------------------------------------------------------------------------------
/live555/liveMedia/GSMAudioRTPSink.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // RTP sink for GSM audio
19 | // Implementation
20 |
21 | #include "GSMAudioRTPSink.hh"
22 |
23 | GSMAudioRTPSink::GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs)
24 | : AudioRTPSink(env, RTPgs, 3, 8000, "GSM") {
25 | }
26 |
27 | GSMAudioRTPSink::~GSMAudioRTPSink() {
28 | }
29 |
30 | GSMAudioRTPSink*
31 | GSMAudioRTPSink::createNew(UsageEnvironment& env, Groupsock* RTPgs) {
32 | return new GSMAudioRTPSink(env, RTPgs);
33 | }
34 |
35 | Boolean GSMAudioRTPSink
36 | ::frameCanAppearAfterPacketStart(unsigned char const* /*frameStart*/,
37 | unsigned /*numBytesInFrame*/) const {
38 | // Allow at most 5 frames in a single packet:
39 | return numFramesUsedSoFar() < 5;
40 | }
41 |
--------------------------------------------------------------------------------
/ipcam/templates/user/status.html:
--------------------------------------------------------------------------------
1 | $def with (name, str, info)
2 |
3 | $var title: 系统状态
4 | $var css:
5 | $var js:
6 | $var name: $str $name
7 | $var load:
8 |
9 |
系统状态
10 |
11 |
$info['uptime']
12 | $for l in info['df_data']:
13 |
$l
14 |
15 |
16 |
进程状态:
17 |
18 |
19 |
Web界面
$info['ipcam']
20 |
视频录像
$info['rec']
21 |
视频回放
$info['stream']
22 |
远程同步
$info['sync']
23 |
移动侦测
$info['detector']
24 |
守护进程
$info['daemon']
25 |
26 |
27 |
backbone日志:
28 | $for l in info['backbone_log']:
29 |
$l
30 |
31 |
daemon日志:
32 | $for l in info['daemon_log']:
33 |
$l
34 |
35 |
detector日志:
36 | $for l in info['detector_log']:
37 |
$l
38 |
39 |
stream日志:
40 | $for l in info['stream_log']:
41 |
$l
42 |
43 |
sync日志:
44 | $for l in info['sync_log']:
45 |
$l
46 |
47 |
bar.js日志:
48 | $for l in info['barjs_log']:
49 |
$l
50 |
51 |
Nginx error日志:
52 | $for l in info['error_log']:
53 |
$l
54 |
55 |
uWSGI日志:
56 | $for l in info['uwsgi_log']:
57 |
$l
58 |
59 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/TextRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for text codecs (abstract base class)
19 | // C++ header
20 |
21 | #ifndef _TEXT_RTP_SINK_HH
22 | #define _TEXT_RTP_SINK_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH
25 | #include "MultiFramedRTPSink.hh"
26 | #endif
27 |
28 | class TextRTPSink: public MultiFramedRTPSink {
29 | protected:
30 | TextRTPSink(UsageEnvironment& env,
31 | Groupsock* rtpgs, unsigned char rtpPayloadType,
32 | unsigned rtpTimestampFrequency,
33 | char const* rtpPayloadFormatName);
34 | // (we're an abstract base class)
35 | virtual ~TextRTPSink();
36 |
37 | private: // redefined virtual functions:
38 | virtual char const* sdpMediaType() const;
39 | };
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/ipcam/templates/visitor/layout.html:
--------------------------------------------------------------------------------
1 | $def with (content)
$content.title - Kam Cloud
$if content.css:
$for f in content.css.split():
$if content.js:
$for f in content.js.split():
--------------------------------------------------------------------------------
/live555/liveMedia/include/VideoRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for video codecs (abstract base class)
19 | // C++ header
20 |
21 | #ifndef _VIDEO_RTP_SINK_HH
22 | #define _VIDEO_RTP_SINK_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH
25 | #include "MultiFramedRTPSink.hh"
26 | #endif
27 |
28 | class VideoRTPSink: public MultiFramedRTPSink {
29 | protected:
30 | VideoRTPSink(UsageEnvironment& env,
31 | Groupsock* rtpgs, unsigned char rtpPayloadType,
32 | unsigned rtpTimestampFrequency,
33 | char const* rtpPayloadFormatName);
34 | // (we're an abstract base class)
35 | virtual ~VideoRTPSink();
36 |
37 | private: // redefined virtual functions:
38 | virtual char const* sdpMediaType() const;
39 | };
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/live555/UsageEnvironment/HashTable.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
17 | // Generic Hash Table
18 | // Implementation
19 |
20 | #include "HashTable.hh"
21 |
22 | HashTable::HashTable() {
23 | }
24 |
25 | HashTable::~HashTable() {
26 | }
27 |
28 | HashTable::Iterator::Iterator() {
29 | }
30 |
31 | HashTable::Iterator::~Iterator() {}
32 |
33 | void* HashTable::RemoveNext() {
34 | Iterator* iter = Iterator::create(*this);
35 | char const* key;
36 | void* removedValue = iter->next(key);
37 | if (removedValue != 0) Remove(key);
38 |
39 | delete iter;
40 | return removedValue;
41 | }
42 |
43 | void* HashTable::getFirst() {
44 | Iterator* iter = Iterator::create(*this);
45 | char const* key;
46 | void* firstValue = iter->next(key);
47 |
48 | delete iter;
49 | return firstValue;
50 | }
51 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/GSMAudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // RTP sink for GSM audio
19 | // C++ header
20 |
21 | #ifndef _GSM_AUDIO_RTP_SINK_HH
22 | #define _GSM_AUDIO_RTP_SINK_HH
23 |
24 | #ifndef _AUDIO_RTP_SINK_HH
25 | #include "AudioRTPSink.hh"
26 | #endif
27 |
28 | class GSMAudioRTPSink: public AudioRTPSink {
29 | public:
30 | static GSMAudioRTPSink* createNew(UsageEnvironment& env, Groupsock* RTPgs);
31 |
32 | protected:
33 | GSMAudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs);
34 | // called only by createNew()
35 |
36 | virtual ~GSMAudioRTPSink();
37 |
38 | private: // redefined virtual functions:
39 | virtual
40 | Boolean frameCanAppearAfterPacketStart(unsigned char const* frameStart,
41 | unsigned numBytesInFrame) const;
42 | };
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/AudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A generic RTP sink for audio codecs (abstract base class)
19 | // C++ header
20 |
21 | #ifndef _AUDIO_RTP_SINK_HH
22 | #define _AUDIO_RTP_SINK_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SINK_HH
25 | #include "MultiFramedRTPSink.hh"
26 | #endif
27 |
28 | class AudioRTPSink: public MultiFramedRTPSink {
29 | protected:
30 | AudioRTPSink(UsageEnvironment& env,
31 | Groupsock* rtpgs, unsigned char rtpPayloadType,
32 | unsigned rtpTimestampFrequency,
33 | char const* rtpPayloadFormatName,
34 | unsigned numChannels = 1);
35 | // (we're an abstract base class)
36 | virtual ~AudioRTPSink();
37 |
38 | private: // redefined virtual functions:
39 | virtual char const* sdpMediaType() const;
40 | };
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/FileServerMediaSubsession.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A 'ServerMediaSubsession' object that creates new, unicast, "RTPSink"s
19 | // on demand, from a file.
20 | // C++ header
21 |
22 | #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH
23 | #define _FILE_SERVER_MEDIA_SUBSESSION_HH
24 |
25 | #ifndef _ON_DEMAND_SERVER_MEDIA_SUBSESSION_HH
26 | #include "OnDemandServerMediaSubsession.hh"
27 | #endif
28 |
29 | class FileServerMediaSubsession: public OnDemandServerMediaSubsession {
30 | protected: // we're a virtual base class
31 | FileServerMediaSubsession(UsageEnvironment& env, char const* fileName,
32 | Boolean reuseFirstSource);
33 | virtual ~FileServerMediaSubsession();
34 |
35 | protected:
36 | char const* fFileName;
37 | u_int64_t fFileSize; // if known
38 | };
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/ipcam/static/My97DatePicker/My97DatePicker.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | My97DatePicker
7 |
8 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/AMRAudioFileSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A source object for AMR audio files (as defined in RFC 4867, section 5)
19 | // C++ header
20 |
21 | #ifndef _AMR_AUDIO_FILE_SOURCE_HH
22 | #define _AMR_AUDIO_FILE_SOURCE_HH
23 |
24 | #ifndef _AMR_AUDIO_SOURCE_HH
25 | #include "AMRAudioSource.hh"
26 | #endif
27 |
28 | class AMRAudioFileSource: public AMRAudioSource {
29 | public:
30 | static AMRAudioFileSource* createNew(UsageEnvironment& env,
31 | char const* fileName);
32 |
33 | private:
34 | AMRAudioFileSource(UsageEnvironment& env, FILE* fid,
35 | Boolean isWideband, unsigned numChannels);
36 | // called only by createNew()
37 |
38 | virtual ~AMRAudioFileSource();
39 |
40 | private:
41 | // redefined virtual functions:
42 | virtual void doGetNextFrame();
43 |
44 | private:
45 | FILE* fFid;
46 | };
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------
/live555/liveMedia/H264VideoStreamFramer.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units.
19 | // Implementation
20 |
21 | #include "H264VideoStreamFramer.hh"
22 |
23 | H264VideoStreamFramer* H264VideoStreamFramer
24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) {
25 | return new H264VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput);
26 | }
27 |
28 | H264VideoStreamFramer
29 | ::H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput)
30 | : H264or5VideoStreamFramer(264, env, inputSource, createParser, includeStartCodeInOutput) {
31 | }
32 |
33 | H264VideoStreamFramer::~H264VideoStreamFramer() {
34 | }
35 |
36 | Boolean H264VideoStreamFramer::isH264VideoStreamFramer() const {
37 | return True;
38 | }
39 |
--------------------------------------------------------------------------------
/live555/liveMedia/H265VideoStreamFramer.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A filter that breaks up a H.265 Video Elementary Stream into NAL units.
19 | // Implementation
20 |
21 | #include "H265VideoStreamFramer.hh"
22 |
23 | H265VideoStreamFramer* H265VideoStreamFramer
24 | ::createNew(UsageEnvironment& env, FramedSource* inputSource, Boolean includeStartCodeInOutput) {
25 | return new H265VideoStreamFramer(env, inputSource, True, includeStartCodeInOutput);
26 | }
27 |
28 | H265VideoStreamFramer
29 | ::H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput)
30 | : H264or5VideoStreamFramer(265, env, inputSource, createParser, includeStartCodeInOutput) {
31 | }
32 |
33 | H265VideoStreamFramer::~H265VideoStreamFramer() {
34 | }
35 |
36 | Boolean H265VideoStreamFramer::isH265VideoStreamFramer() const {
37 | return True;
38 | }
39 |
--------------------------------------------------------------------------------
/test.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 | # -*- coding: utf-8 -*-
3 | #
4 |
5 | import urllib2
6 |
7 | data= '' \
8 | '1' \
9 | 'true' \
10 | '2' \
11 | '500' \
12 | '500' \
13 | 'grid' \
14 | '' \
15 | '18' \
16 | '22' \
17 | '' \
18 | '' \
19 | '' \
20 | 'false' \
21 | '' \
22 | '' \
23 | '1true6050' \
24 | '002202218018' \
25 | ''
26 |
27 | try:
28 | opener = urllib2.build_opener(urllib2.HTTPHandler)
29 | request = urllib2.Request('http://192.168.100.20/PSIA/Custom/MotionDetection/1', data=data)
30 | request.add_header('Content-Type', 'application/x-www-form-urlencoded')
31 | request.add_header('Authorization', 'Basic YWRtaW46cGNhZG1pbg==')
32 | request.get_method = lambda: 'PUT'
33 | opener.open(request, timeout=5)
34 | except Exception,e:
35 | print "%s: %s" % (type(e), str(e))
36 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/MP3ADURTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // RTP source for 'ADUized' MP3 frames ("mpa-robust")
19 | // C++ header
20 |
21 | #ifndef _MP3_ADU_SOURCE_HH
22 | #define _MP3_ADU_SOURCE_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
25 | #include "MultiFramedRTPSource.hh"
26 | #endif
27 |
28 | class MP3ADURTPSource: public MultiFramedRTPSource {
29 | public:
30 | static MP3ADURTPSource*
31 | createNew(UsageEnvironment& env, Groupsock* RTPgs,
32 | unsigned char rtpPayloadFormat,
33 | unsigned rtpTimestampFrequency = 90000);
34 |
35 | protected:
36 | virtual ~MP3ADURTPSource();
37 |
38 | private:
39 | MP3ADURTPSource(UsageEnvironment& env, Groupsock* RTPgs,
40 | unsigned char rtpPayloadFormat,
41 | unsigned rtpTimestampFrequency);
42 | // called only by createNew()
43 |
44 | private:
45 | // redefined virtual functions:
46 | virtual char const* MIMEtype() const;
47 | };
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/H265VideoStreamFramer.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A filter that breaks up a H.265 Video Elementary Stream into NAL units.
19 | // C++ header
20 |
21 | #ifndef _H265_VIDEO_STREAM_FRAMER_HH
22 | #define _H265_VIDEO_STREAM_FRAMER_HH
23 |
24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH
25 | #include "H264or5VideoStreamFramer.hh"
26 | #endif
27 |
28 | class H265VideoStreamFramer: public H264or5VideoStreamFramer {
29 | public:
30 | static H265VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource,
31 | Boolean includeStartCodeInOutput = False);
32 |
33 | protected:
34 | H265VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource, Boolean createParser, Boolean includeStartCodeInOutput);
35 | // called only by "createNew()"
36 | virtual ~H265VideoStreamFramer();
37 |
38 | // redefined virtual functions:
39 | virtual Boolean isH265VideoStreamFramer() const;
40 | };
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/live555/liveMedia/OggDemuxedTrack.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A media track, demultiplexed from an Ogg file
19 | // Implementation
20 |
21 | #include "OggDemuxedTrack.hh"
22 | #include "OggFile.hh"
23 |
24 | OggDemuxedTrack::OggDemuxedTrack(UsageEnvironment& env, unsigned trackNumber, OggDemux& sourceDemux)
25 | : FramedSource(env),
26 | fOurTrackNumber(trackNumber), fOurSourceDemux(sourceDemux),
27 | fCurrentPageIsContinuation(False) {
28 | fNextPresentationTime.tv_sec = 0; fNextPresentationTime.tv_usec = 0;
29 | }
30 |
31 | OggDemuxedTrack::~OggDemuxedTrack() {
32 | fOurSourceDemux.removeTrack(fOurTrackNumber);
33 | }
34 |
35 | void OggDemuxedTrack::doGetNextFrame() {
36 | fOurSourceDemux.continueReading();
37 | }
38 |
39 | char const* OggDemuxedTrack::MIMEtype() const {
40 | OggTrack* track = fOurSourceDemux.fOurFile.lookup(fOurTrackNumber);
41 | if (track == NULL) return "(unknown)"; // shouldn't happen
42 | return track->mimeType;
43 | }
44 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/H264VideoStreamFramer.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A filter that breaks up a H.264 Video Elementary Stream into NAL units.
19 | // C++ header
20 |
21 | #ifndef _H264_VIDEO_STREAM_FRAMER_HH
22 | #define _H264_VIDEO_STREAM_FRAMER_HH
23 |
24 | #ifndef _H264_OR_5_VIDEO_STREAM_FRAMER_HH
25 | #include "H264or5VideoStreamFramer.hh"
26 | #endif
27 |
28 | class H264VideoStreamFramer: public H264or5VideoStreamFramer {
29 | public:
30 | static H264VideoStreamFramer* createNew(UsageEnvironment& env, FramedSource* inputSource,
31 | Boolean includeStartCodeInOutput = False);
32 |
33 | protected:
34 | H264VideoStreamFramer(UsageEnvironment& env, FramedSource* inputSource,
35 | Boolean createParser, Boolean includeStartCodeInOutput);
36 | // called only by "createNew()"
37 | virtual ~H264VideoStreamFramer();
38 |
39 | // redefined virtual functions:
40 | virtual Boolean isH264VideoStreamFramer() const;
41 | };
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/live555/liveMedia/AudioInputDevice.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // Copyright (c) 2001-2003 Live Networks, Inc. All rights reserved.
17 | // Generic audio input device (such as a microphone, or an input sound card)
18 | // Implementation
19 |
20 | #include
21 |
22 | AudioInputDevice
23 | ::AudioInputDevice(UsageEnvironment& env, unsigned char bitsPerSample,
24 | unsigned char numChannels,
25 | unsigned samplingFrequency, unsigned granularityInMS)
26 | : FramedSource(env), fBitsPerSample(bitsPerSample),
27 | fNumChannels(numChannels), fSamplingFrequency(samplingFrequency),
28 | fGranularityInMS(granularityInMS) {
29 | }
30 |
31 | AudioInputDevice::~AudioInputDevice() {
32 | }
33 |
34 | char** AudioInputDevice::allowedDeviceNames = NULL;
35 |
36 | ////////// AudioPortNames implementation //////////
37 |
38 | AudioPortNames::AudioPortNames()
39 | : numPorts(0), portName(NULL) {
40 | }
41 |
42 | AudioPortNames::~AudioPortNames() {
43 | for (unsigned i = 0; i < numPorts; ++i) delete portName[i];
44 | delete portName;
45 | }
46 |
--------------------------------------------------------------------------------
/nginx.conf:
--------------------------------------------------------------------------------
1 |
2 | user nobody;
3 | worker_processes 4;
4 |
5 | #error_log logs/error.log;
6 | #error_log logs/error.log notice;
7 | #error_log logs/error.log debug;
8 |
9 | pid logs/nginx.pid;
10 |
11 |
12 | events {
13 | worker_connections 1024;
14 | }
15 |
16 |
17 | http {
18 | include mime.types;
19 | default_type application/octet-stream;
20 |
21 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
22 | # '$status $body_bytes_sent "$http_referer" '
23 | # '"$http_user_agent" "$http_x_forwarded_for"';
24 |
25 | #access_log logs/access.log main;
26 |
27 | #rewrite_log on;
28 |
29 | sendfile on;
30 | #tcp_nopush on;
31 |
32 | #keepalive_timeout 0;
33 | keepalive_timeout 65;
34 |
35 | gzip on;
36 |
37 | server {
38 | listen 80;
39 | listen 443 ssl;
40 | server_name localhost;
41 | ssl_certificate /usr/local/nginx/conf/ssl/f8kam.crt;
42 | ssl_certificate_key /usr/local/nginx/conf/ssl/f8kam.key;
43 |
44 | access_log logs/access_80.log;
45 |
46 | location / {
47 | include uwsgi_params;
48 | uwsgi_pass unix:/tmp/uwsgi_80.sock;
49 | uwsgi_param UWSGI_CHDIR /usr/local/nginx/html/ipcam_hf;
50 | uwsgi_param UWSGI_SCRIPT ipcam;
51 | }
52 |
53 | location /static/ {
54 | if (-f $request_filename) {
55 | rewrite ^/static/(.*)$ /static/$1 break;
56 | }
57 | }
58 |
59 | # redirect server error pages to the static page /50x.html
60 | #
61 | error_page 500 502 503 504 /50x.html;
62 | location = /50x.html {
63 | root html;
64 | }
65 |
66 | }
67 |
68 |
69 | }
70 |
--------------------------------------------------------------------------------
/live555/liveMedia/H264VideoStreamDiscreteFramer.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A simplified version of "H264VideoStreamFramer" that takes only complete,
19 | // discrete frames (rather than an arbitrary byte stream) as input.
20 | // This avoids the parsing and data copying overhead of the full
21 | // "H264VideoStreamFramer".
22 | // Implementation
23 |
24 | #include "H264VideoStreamDiscreteFramer.hh"
25 |
26 | H264VideoStreamDiscreteFramer*
27 | H264VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) {
28 | return new H264VideoStreamDiscreteFramer(env, inputSource);
29 | }
30 |
31 | H264VideoStreamDiscreteFramer
32 | ::H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource)
33 | : H264or5VideoStreamDiscreteFramer(264, env, inputSource) {
34 | }
35 |
36 | H264VideoStreamDiscreteFramer::~H264VideoStreamDiscreteFramer() {
37 | }
38 |
39 | Boolean H264VideoStreamDiscreteFramer::isH264VideoStreamFramer() const {
40 | return True;
41 | }
42 |
--------------------------------------------------------------------------------
/live555/liveMedia/H265VideoStreamDiscreteFramer.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A simplified version of "H265VideoStreamFramer" that takes only complete,
19 | // discrete frames (rather than an arbitrary byte stream) as input.
20 | // This avoids the parsing and data copying overhead of the full
21 | // "H265VideoStreamFramer".
22 | // Implementation
23 |
24 | #include "H265VideoStreamDiscreteFramer.hh"
25 |
26 | H265VideoStreamDiscreteFramer*
27 | H265VideoStreamDiscreteFramer::createNew(UsageEnvironment& env, FramedSource* inputSource) {
28 | return new H265VideoStreamDiscreteFramer(env, inputSource);
29 | }
30 |
31 | H265VideoStreamDiscreteFramer
32 | ::H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource)
33 | : H264or5VideoStreamDiscreteFramer(265, env, inputSource) {
34 | }
35 |
36 | H265VideoStreamDiscreteFramer::~H265VideoStreamDiscreteFramer() {
37 | }
38 |
39 | Boolean H265VideoStreamDiscreteFramer::isH265VideoStreamFramer() const {
40 | return True;
41 | }
42 |
--------------------------------------------------------------------------------
/live555/liveMedia/MPEGVideoStreamParser.cpp:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // An abstract parser for MPEG video streams
19 | // Implementation
20 |
21 | #include "MPEGVideoStreamParser.hh"
22 |
23 | MPEGVideoStreamParser
24 | ::MPEGVideoStreamParser(MPEGVideoStreamFramer* usingSource,
25 | FramedSource* inputSource)
26 | : StreamParser(inputSource, FramedSource::handleClosure, usingSource,
27 | &MPEGVideoStreamFramer::continueReadProcessing, usingSource),
28 | fUsingSource(usingSource) {
29 | }
30 |
31 | MPEGVideoStreamParser::~MPEGVideoStreamParser() {
32 | }
33 |
34 | void MPEGVideoStreamParser::restoreSavedParserState() {
35 | StreamParser::restoreSavedParserState();
36 | fTo = fSavedTo;
37 | fNumTruncatedBytes = fSavedNumTruncatedBytes;
38 | }
39 |
40 | void MPEGVideoStreamParser::registerReadInterest(unsigned char* to,
41 | unsigned maxSize) {
42 | fStartOfFrame = fTo = fSavedTo = to;
43 | fLimit = to + maxSize;
44 | fNumTruncatedBytes = fSavedNumTruncatedBytes = 0;
45 | }
46 |
--------------------------------------------------------------------------------
/live555/BasicUsageEnvironment/Makefile.tail:
--------------------------------------------------------------------------------
1 | ##### End of variables to change
2 |
3 | NAME = libBasicUsageEnvironment
4 | LIB = $(NAME).$(LIB_SUFFIX)
5 | ALL = $(LIB)
6 | all: $(ALL)
7 |
8 | OBJS = BasicUsageEnvironment0.$(OBJ) BasicUsageEnvironment.$(OBJ) \
9 | BasicTaskScheduler0.$(OBJ) BasicTaskScheduler.$(OBJ) \
10 | DelayQueue.$(OBJ) BasicHashTable.$(OBJ)
11 |
12 | libBasicUsageEnvironment.$(LIB_SUFFIX): $(OBJS)
13 | $(LIBRARY_LINK)$@ $(LIBRARY_LINK_OPTS) \
14 | $(OBJS)
15 |
16 | .$(C).$(OBJ):
17 | $(C_COMPILER) -c $(C_FLAGS) $<
18 |
19 | .$(CPP).$(OBJ):
20 | $(CPLUSPLUS_COMPILER) -c $(CPLUSPLUS_FLAGS) $<
21 |
22 | BasicUsageEnvironment0.$(CPP): include/BasicUsageEnvironment0.hh
23 | include/BasicUsageEnvironment0.hh: include/BasicUsageEnvironment_version.hh include/DelayQueue.hh
24 | BasicUsageEnvironment.$(CPP): include/BasicUsageEnvironment.hh
25 | include/BasicUsageEnvironment.hh: include/BasicUsageEnvironment0.hh
26 | BasicTaskScheduler0.$(CPP): include/BasicUsageEnvironment0.hh include/HandlerSet.hh
27 | BasicTaskScheduler.$(CPP): include/BasicUsageEnvironment.hh include/HandlerSet.hh
28 | DelayQueue.$(CPP): include/DelayQueue.hh
29 | BasicHashTable.$(CPP): include/BasicHashTable.hh
30 |
31 | clean:
32 | -rm -rf *.$(OBJ) $(ALL) core *.core *~ include/*~
33 |
34 | install: install1 $(INSTALL2)
35 | install1: libBasicUsageEnvironment.$(LIB_SUFFIX)
36 | install -d $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment $(DESTDIR)$(LIBDIR)
37 | install -m 644 include/*.hh $(DESTDIR)$(PREFIX)/include/BasicUsageEnvironment
38 | install -m 644 libBasicUsageEnvironment.$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)
39 | install_shared_libraries: libBasicUsageEnvironment.$(LIB_SUFFIX)
40 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).$(SHORT_LIB_SUFFIX)
41 | ln -s $(NAME).$(LIB_SUFFIX) $(DESTDIR)$(LIBDIR)/$(NAME).so
42 |
43 | ##### Any additional, platform-specific rules come here:
44 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/Base64.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Base64 encoding and decoding
19 | // C++ header
20 |
21 | #ifndef _BASE64_HH
22 | #define _BASE64_HH
23 |
24 | #ifndef _BOOLEAN_HH
25 | #include "Boolean.hh"
26 | #endif
27 |
28 | unsigned char* base64Decode(char const* in, unsigned& resultSize,
29 | Boolean trimTrailingZeros = True);
30 | // returns a newly allocated array - of size "resultSize" - that
31 | // the caller is responsible for delete[]ing.
32 |
33 | unsigned char* base64Decode(char const* in, unsigned inSize,
34 | unsigned& resultSize,
35 | Boolean trimTrailingZeros = True);
36 | // As above, but includes the size of the input string (i.e., the number of bytes to decode) as a parameter.
37 | // This saves an extra call to "strlen()" if we already know the length of the input string.
38 |
39 | char* base64Encode(char const* orig, unsigned origLength);
40 | // returns a 0-terminated string that
41 | // the caller is responsible for delete[]ing.
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/H264or5VideoFileSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // H.264 or H.265 Video File Sinks
19 | // C++ header
20 |
21 | #ifndef _H264_OR_5_VIDEO_FILE_SINK_HH
22 | #define _H264_OR_5_VIDEO_FILE_SINK_HH
23 |
24 | #ifndef _FILE_SINK_HH
25 | #include "FileSink.hh"
26 | #endif
27 |
28 | class H264or5VideoFileSink: public FileSink {
29 | protected:
30 | H264or5VideoFileSink(UsageEnvironment& env, FILE* fid,
31 | unsigned bufferSize, char const* perFrameFileNamePrefix,
32 | char const* sPropParameterSetsStr1,
33 | char const* sPropParameterSetsStr2 = NULL,
34 | char const* sPropParameterSetsStr3 = NULL);
35 | // we're an abstract base class
36 | virtual ~H264or5VideoFileSink();
37 |
38 | protected: // redefined virtual functions:
39 | virtual void afterGettingFrame(unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime);
40 |
41 | private:
42 | char const* fSPropParameterSetsStr[3];
43 | Boolean fHaveWrittenFirstFrame;
44 | };
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/ipcam/templates/admin/layout.html:
--------------------------------------------------------------------------------
1 | $def with (content)
$content.title - Kam Cloud
$if content.css:
$for f in content.css.split():
$if content.js:
$for f in content.js.split():
--------------------------------------------------------------------------------
/live555/liveMedia/include/AMRAudioSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A source object for AMR audio sources
19 | // C++ header
20 |
21 | #ifndef _AMR_AUDIO_SOURCE_HH
22 | #define _AMR_AUDIO_SOURCE_HH
23 |
24 | #ifndef _FRAMED_SOURCE_HH
25 | #include "FramedSource.hh"
26 | #endif
27 |
28 | class AMRAudioSource: public FramedSource {
29 | public:
30 | Boolean isWideband() const { return fIsWideband; }
31 | unsigned numChannels() const { return fNumChannels; }
32 |
33 | u_int8_t lastFrameHeader() const { return fLastFrameHeader; }
34 | // The frame header for the most recently read frame (RFC 4867, sec. 5.3)
35 |
36 | protected:
37 | AMRAudioSource(UsageEnvironment& env, Boolean isWideband, unsigned numChannels);
38 | // virtual base class
39 | virtual ~AMRAudioSource();
40 |
41 | private:
42 | // redefined virtual functions:
43 | virtual char const* MIMEtype() const;
44 | virtual Boolean isAMRAudioSource() const;
45 |
46 | protected:
47 | Boolean fIsWideband;
48 | unsigned fNumChannels;
49 | u_int8_t fLastFrameHeader;
50 | };
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/DVVideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // DV Video RTP Sources
19 | // C++ header
20 |
21 | #ifndef _DV_VIDEO_RTP_SOURCE_HH
22 | #define _DV_VIDEO_RTP_SOURCE_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
25 | #include "MultiFramedRTPSource.hh"
26 | #endif
27 |
28 | class DVVideoRTPSource: public MultiFramedRTPSource {
29 | public:
30 | static DVVideoRTPSource*
31 | createNew(UsageEnvironment& env, Groupsock* RTPgs,
32 | unsigned char rtpPayloadFormat,
33 | unsigned rtpTimestampFrequency);
34 |
35 | protected:
36 | virtual ~DVVideoRTPSource();
37 |
38 | private:
39 | DVVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
40 | unsigned char rtpPayloadFormat,
41 | unsigned rtpTimestampFrequency);
42 | // called only by createNew()
43 |
44 | private:
45 | // redefined virtual functions:
46 | virtual Boolean processSpecialHeader(BufferedPacket* packet,
47 | unsigned& resultSpecialHeaderSize);
48 | virtual char const* MIMEtype() const;
49 | };
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/FramedFilter.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // Framed Filters
19 | // C++ header
20 |
21 | #ifndef _FRAMED_FILTER_HH
22 | #define _FRAMED_FILTER_HH
23 |
24 | #ifndef _FRAMED_SOURCE_HH
25 | #include "FramedSource.hh"
26 | #endif
27 |
28 | class FramedFilter: public FramedSource {
29 | public:
30 | FramedSource* inputSource() const { return fInputSource; }
31 |
32 | void reassignInputSource(FramedSource* newInputSource) { fInputSource = newInputSource; }
33 |
34 | // Call before destruction if you want to prevent the destructor from closing the input source
35 | void detachInputSource();
36 |
37 | protected:
38 | FramedFilter(UsageEnvironment& env, FramedSource* inputSource);
39 | // abstract base class
40 | virtual ~FramedFilter();
41 |
42 | protected:
43 | // Redefined virtual functions (with default 'null' implementations):
44 | virtual char const* MIMEtype() const;
45 | virtual void getAttributes() const;
46 | virtual void doStopGettingFrames();
47 |
48 | protected:
49 | FramedSource* fInputSource;
50 | };
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/VP8VideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // VP8 Video RTP Sources
19 | // C++ header
20 |
21 | #ifndef _VP8_VIDEO_RTP_SOURCE_HH
22 | #define _VP8_VIDEO_RTP_SOURCE_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
25 | #include "MultiFramedRTPSource.hh"
26 | #endif
27 |
28 | class VP8VideoRTPSource: public MultiFramedRTPSource {
29 | public:
30 | static VP8VideoRTPSource*
31 | createNew(UsageEnvironment& env, Groupsock* RTPgs,
32 | unsigned char rtpPayloadFormat,
33 | unsigned rtpTimestampFrequency = 90000);
34 |
35 | protected:
36 | VP8VideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
37 | unsigned char rtpPayloadFormat,
38 | unsigned rtpTimestampFrequency);
39 | // called only by createNew()
40 |
41 | virtual ~VP8VideoRTPSource();
42 |
43 | protected:
44 | // redefined virtual functions:
45 | virtual Boolean processSpecialHeader(BufferedPacket* packet,
46 | unsigned& resultSpecialHeaderSize);
47 | virtual char const* MIMEtype() const;
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/AC3AudioRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // AC3 Audio RTP Sources
19 | // C++ header
20 |
21 | #ifndef _AC3_AUDIO_RTP_SOURCE_HH
22 | #define _AC3_AUDIO_RTP_SOURCE_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
25 | #include "MultiFramedRTPSource.hh"
26 | #endif
27 |
28 | class AC3AudioRTPSource: public MultiFramedRTPSource {
29 | public:
30 | static AC3AudioRTPSource*
31 | createNew(UsageEnvironment& env, Groupsock* RTPgs,
32 | unsigned char rtpPayloadFormat,
33 | unsigned rtpTimestampFrequency);
34 |
35 | protected:
36 | virtual ~AC3AudioRTPSource();
37 |
38 | private:
39 | AC3AudioRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
40 | unsigned char rtpPayloadFormat,
41 | unsigned rtpTimestampFrequency);
42 | // called only by createNew()
43 |
44 | private:
45 | // redefined virtual functions:
46 | virtual Boolean processSpecialHeader(BufferedPacket* packet,
47 | unsigned& resultSpecialHeaderSize);
48 | virtual char const* MIMEtype() const;
49 | };
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/ipcam/templates/user/layout.html:
--------------------------------------------------------------------------------
1 | $def with (content)
$content.title - Kam Cloud
$if content.css:
$for f in content.css.split():
$if content.js:
$for f in content.js.split():
--------------------------------------------------------------------------------
/live555/liveMedia/include/BasicUDPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A simple UDP source, where every UDP payload is a complete frame
19 | // C++ header
20 |
21 | #ifndef _BASIC_UDP_SOURCE_HH
22 | #define _BASIC_UDP_SOURCE_HH
23 |
24 | #ifndef _FRAMED_SOURCE_HH
25 | #include "FramedSource.hh"
26 | #endif
27 | #ifndef _GROUPSOCK_HH
28 | #include "Groupsock.hh"
29 | #endif
30 |
31 | class BasicUDPSource: public FramedSource {
32 | public:
33 | static BasicUDPSource* createNew(UsageEnvironment& env, Groupsock* inputGS);
34 |
35 | virtual ~BasicUDPSource();
36 |
37 | Groupsock* gs() const { return fInputGS; }
38 |
39 | private:
40 | BasicUDPSource(UsageEnvironment& env, Groupsock* inputGS);
41 | // called only by createNew()
42 |
43 | static void incomingPacketHandler(BasicUDPSource* source, int mask);
44 | void incomingPacketHandler1();
45 |
46 | private: // redefined virtual functions:
47 | virtual void doGetNextFrame();
48 | virtual void doStopGettingFrames();
49 |
50 | private:
51 | Groupsock* fInputGS;
52 | Boolean fHaveStartedReading;
53 | };
54 |
55 | #endif
56 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/MPEG4ESVideoRTPSource.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // MP4V-ES video RTP stream sources
19 | // C++ header
20 |
21 | #ifndef _MPEG4_ES_VIDEO_RTP_SOURCE_HH
22 | #define _MPEG4_ES_VIDEO_RTP_SOURCE_HH
23 |
24 | #ifndef _MULTI_FRAMED_RTP_SOURCE_HH
25 | #include "MultiFramedRTPSource.hh"
26 | #endif
27 |
28 | class MPEG4ESVideoRTPSource: public MultiFramedRTPSource {
29 | public:
30 | static MPEG4ESVideoRTPSource*
31 | createNew(UsageEnvironment& env, Groupsock* RTPgs,
32 | unsigned char rtpPayloadFormat,
33 | unsigned rtpTimestampFrequency);
34 |
35 | protected:
36 | virtual ~MPEG4ESVideoRTPSource();
37 |
38 | private:
39 | MPEG4ESVideoRTPSource(UsageEnvironment& env, Groupsock* RTPgs,
40 | unsigned char rtpPayloadFormat,
41 | unsigned rtpTimestampFrequency);
42 | // called only by createNew()
43 |
44 | private:
45 | // redefined virtual functions:
46 | virtual Boolean processSpecialHeader(BufferedPacket* packet,
47 | unsigned& resultSpecialHeaderSize);
48 | virtual char const* MIMEtype() const;
49 | };
50 |
51 | #endif
52 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/H264VideoStreamDiscreteFramer.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A simplified version of "H264VideoStreamFramer" that takes only complete,
19 | // discrete frames (rather than an arbitrary byte stream) as input.
20 | // This avoids the parsing and data copying overhead of the full
21 | // "H264VideoStreamFramer".
22 | // C++ header
23 |
24 | #ifndef _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH
25 | #define _H264_VIDEO_STREAM_DISCRETE_FRAMER_HH
26 |
27 | #ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH
28 | #include "H264or5VideoStreamDiscreteFramer.hh"
29 | #endif
30 |
31 | class H264VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer {
32 | public:
33 | static H264VideoStreamDiscreteFramer*
34 | createNew(UsageEnvironment& env, FramedSource* inputSource);
35 |
36 | protected:
37 | H264VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource);
38 | // called only by createNew()
39 | virtual ~H264VideoStreamDiscreteFramer();
40 |
41 | private:
42 | // redefined virtual functions:
43 | virtual Boolean isH264VideoStreamFramer() const;
44 | };
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/H265VideoStreamDiscreteFramer.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // A simplified version of "H265VideoStreamFramer" that takes only complete,
19 | // discrete frames (rather than an arbitrary byte stream) as input.
20 | // This avoids the parsing and data copying overhead of the full
21 | // "H265VideoStreamFramer".
22 | // C++ header
23 |
24 | #ifndef _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH
25 | #define _H265_VIDEO_STREAM_DISCRETE_FRAMER_HH
26 |
27 | #ifndef _H264_OR_5_VIDEO_STREAM_DISCRETE_FRAMER_HH
28 | #include "H264or5VideoStreamDiscreteFramer.hh"
29 | #endif
30 |
31 | class H265VideoStreamDiscreteFramer: public H264or5VideoStreamDiscreteFramer {
32 | public:
33 | static H265VideoStreamDiscreteFramer*
34 | createNew(UsageEnvironment& env, FramedSource* inputSource);
35 |
36 | protected:
37 | H265VideoStreamDiscreteFramer(UsageEnvironment& env, FramedSource* inputSource);
38 | // called only by createNew()
39 | virtual ~H265VideoStreamDiscreteFramer();
40 |
41 | private:
42 | // redefined virtual functions:
43 | virtual Boolean isH265VideoStreamFramer() const;
44 | };
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/live555/liveMedia/include/MPEG1or2AudioRTPSink.hh:
--------------------------------------------------------------------------------
1 | /**********
2 | This library is free software; you can redistribute it and/or modify it under
3 | the terms of the GNU Lesser General Public License as published by the
4 | Free Software Foundation; either version 2.1 of the License, or (at your
5 | option) any later version. (See .)
6 |
7 | This library is distributed in the hope that it will be useful, but WITHOUT
8 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
10 | more details.
11 |
12 | You should have received a copy of the GNU Lesser General Public License
13 | along with this library; if not, write to the Free Software Foundation, Inc.,
14 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15 | **********/
16 | // "liveMedia"
17 | // Copyright (c) 1996-2014 Live Networks, Inc. All rights reserved.
18 | // RTP sink for MPEG audio (RFC 2250)
19 | // C++ header
20 |
21 | #ifndef _MPEG_1OR2_AUDIO_RTP_SINK_HH
22 | #define _MPEG_1OR2_AUDIO_RTP_SINK_HH
23 |
24 | #ifndef _AUDIO_RTP_SINK_HH
25 | #include "AudioRTPSink.hh"
26 | #endif
27 |
28 | class MPEG1or2AudioRTPSink: public AudioRTPSink {
29 | public:
30 | static MPEG1or2AudioRTPSink* createNew(UsageEnvironment& env,
31 | Groupsock* RTPgs);
32 |
33 | protected:
34 | MPEG1or2AudioRTPSink(UsageEnvironment& env, Groupsock* RTPgs);
35 | // called only by createNew()
36 |
37 | virtual ~MPEG1or2AudioRTPSink();
38 |
39 | private: // redefined virtual functions:
40 | virtual void doSpecialFrameHandling(unsigned fragmentationOffset,
41 | unsigned char* frameStart,
42 | unsigned numBytesInFrame,
43 | struct timeval framePresentationTime,
44 | unsigned numRemainingBytes);
45 | virtual unsigned specialHeaderSize() const;
46 | };
47 |
48 | #endif
49 |
--------------------------------------------------------------------------------