21 |
22 | $searchbox
23 |
24 |
25 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/doc/performance.md:
--------------------------------------------------------------------------------
1 | # Performance
2 |
3 | The old performance article for RapidJSON 0.1 is provided [here](https://code.google.com/p/rapidjson/wiki/Performance).
4 |
5 | This file will be updated with new version and better procedures.
6 |
7 | In the meantime, you may also refer to the following third-party benchmarks.
8 |
9 | ## Third-party benchmarks
10 |
11 | * [Basic benchmarks for miscellaneous C++ JSON parsers and generators](https://github.com/mloskot/json_benchmark) by Mateusz Loskot (Jun 2013)
12 | * [casablanca](https://casablanca.codeplex.com/)
13 | * [json_spirit](https://github.com/cierelabs/json_spirit)
14 | * [jsoncpp](http://jsoncpp.sourceforge.net/)
15 | * [libjson](http://sourceforge.net/projects/libjson/)
16 | * [rapidjson](https://github.com/miloyip/rapidjson/)
17 | * [QJsonDocument](http://qt-project.org/doc/qt-5.0/qtcore/qjsondocument.html)
18 |
19 | * [JSON Parser Benchmarking](http://chadaustin.me/2013/01/json-parser-benchmarking/) by Chad Austin (Jan 2013)
20 | * [sajson](https://github.com/chadaustin/sajson)
21 | * [rapidjson](https://github.com/miloyip/rapidjson/)
22 | * [vjson](https://code.google.com/p/vjson/)
23 | * [YAJL](http://lloyd.github.com/yajl/)
24 | * [Jansson](http://www.digip.org/jansson/)
25 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/example/condense/condense.cpp:
--------------------------------------------------------------------------------
1 | // JSON condenser exmaple
2 |
3 | // This example parses JSON text from stdin with validation,
4 | // and re-output the JSON content to stdout without whitespace.
5 |
6 | #include "rapidjson/reader.h"
7 | #include "rapidjson/writer.h"
8 | #include "rapidjson/filereadstream.h"
9 | #include "rapidjson/filewritestream.h"
10 | #include "rapidjson/error/en.h"
11 |
12 | using namespace rapidjson;
13 |
14 | int main(int, char*[]) {
15 | // Prepare JSON reader and input stream.
16 | Reader reader;
17 | char readBuffer[65536];
18 | FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
19 |
20 | // Prepare JSON writer and output stream.
21 | char writeBuffer[65536];
22 | FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
23 | Writer
writer(os);
24 |
25 | // JSON reader parse from the input stream and let writer generate the output.
26 | if (!reader.Parse(is, writer)) {
27 | fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode()));
28 | return 1;
29 | }
30 |
31 | return 0;
32 | }
33 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/example/pretty/pretty.cpp:
--------------------------------------------------------------------------------
1 | // JSON pretty formatting example
2 | // This example can only handle UTF-8. For handling other encodings, see prettyauto example.
3 |
4 | #include "rapidjson/reader.h"
5 | #include "rapidjson/prettywriter.h"
6 | #include "rapidjson/filereadstream.h"
7 | #include "rapidjson/filewritestream.h"
8 | #include "rapidjson/error/en.h"
9 |
10 | using namespace rapidjson;
11 |
12 | int main(int, char*[]) {
13 | // Prepare reader and input stream.
14 | Reader reader;
15 | char readBuffer[65536];
16 | FileReadStream is(stdin, readBuffer, sizeof(readBuffer));
17 |
18 | // Prepare writer and output stream.
19 | char writeBuffer[65536];
20 | FileWriteStream os(stdout, writeBuffer, sizeof(writeBuffer));
21 | PrettyWriter writer(os);
22 |
23 | // JSON reader parse from the input stream and let writer generate the output.
24 | if (!reader.Parse(is, writer)) {
25 | fprintf(stderr, "\nError(%u): %s\n", (unsigned)reader.GetErrorOffset(), GetParseError_En(reader.GetParseErrorCode()));
26 | return 1;
27 | }
28 |
29 | return 0;
30 | }
31 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/example/simpledom/simpledom.cpp:
--------------------------------------------------------------------------------
1 | // JSON simple example
2 | // This example does not handle errors.
3 |
4 | #include "rapidjson/document.h"
5 | #include "rapidjson/writer.h"
6 | #include "rapidjson/stringbuffer.h"
7 | #include
8 |
9 | using namespace rapidjson;
10 |
11 | int main() {
12 | // 1. Parse a JSON string into DOM.
13 | const char* json = "{\"project\":\"rapidjson\",\"stars\":10}";
14 | Document d;
15 | d.Parse(json);
16 |
17 | // 2. Modify it by DOM.
18 | Value& s = d["stars"];
19 | s.SetInt(s.GetInt() + 1);
20 |
21 | // 3. Stringify the DOM
22 | StringBuffer buffer;
23 | Writer writer(buffer);
24 | d.Accept(writer);
25 |
26 | // Output {"project":"rapidjson","stars":11}
27 | std::cout << buffer.GetString() << std::endl;
28 | return 0;
29 | }
30 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/example/simplewriter/simplewriter.cpp:
--------------------------------------------------------------------------------
1 | #include "rapidjson/writer.h"
2 | #include "rapidjson/stringbuffer.h"
3 | #include
4 |
5 | using namespace rapidjson;
6 | using namespace std;
7 |
8 | int main() {
9 | StringBuffer s;
10 | Writer writer(s);
11 |
12 | writer.StartObject();
13 | writer.String("hello");
14 | writer.String("world");
15 | writer.String("t");
16 | writer.Bool(true);
17 | writer.String("f");
18 | writer.Bool(false);
19 | writer.String("n");
20 | writer.Null();
21 | writer.String("i");
22 | writer.Uint(123);
23 | writer.String("pi");
24 | writer.Double(3.1416);
25 | writer.String("a");
26 | writer.StartArray();
27 | for (unsigned i = 0; i < 4; i++)
28 | writer.Uint(i);
29 | writer.EndArray();
30 | writer.EndObject();
31 |
32 | cout << s.GetString() << endl;
33 |
34 | return 0;
35 | }
36 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/license.txt:
--------------------------------------------------------------------------------
1 | Copyright (C) 2011 Milo Yip
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/test/perftest/perftest.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2011 Milo Yip
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "perftest.h"
22 |
23 | int main(int argc, char **argv) {
24 | #if _MSC_VER
25 | _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
26 | //void *testWhetherMemoryLeakDetectionWorks = malloc(1);
27 | #endif
28 | ::testing::InitGoogleTest(&argc, argv);
29 | return RUN_ALL_TESTS();
30 | }
31 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/test/perftest/yajl_all.c:
--------------------------------------------------------------------------------
1 | #include "perftest.h"
2 |
3 | #if TEST_YAJL
4 |
5 | #ifdef _MSC_VER
6 | #include
7 | #define isinf !_finite
8 | #define isnan _isnan
9 | #define snprintf _snprintf
10 | #endif
11 |
12 | #include "yajl/src/yajl.c"
13 | #include "yajl/src/yajl_alloc.c"
14 | #include "yajl/src/yajl_buf.c"
15 | #include "yajl/src/yajl_encode.c"
16 | #include "yajl/src/yajl_gen.c"
17 | #include "yajl/src/yajl_lex.c"
18 | #include "yajl/src/yajl_parser.c"
19 | #include "yajl/src/yajl_tree.c"
20 | #include "yajl/src/yajl_version.c"
21 |
22 | #endif // TEST_YAJL
23 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/test/unittest/unittest.cpp:
--------------------------------------------------------------------------------
1 | // Copyright (C) 2011 Milo Yip
2 | //
3 | // Permission is hereby granted, free of charge, to any person obtaining a copy
4 | // of this software and associated documentation files (the "Software"), to deal
5 | // in the Software without restriction, including without limitation the rights
6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | // copies of the Software, and to permit persons to whom the Software is
8 | // furnished to do so, subject to the following conditions:
9 | //
10 | // The above copyright notice and this permission notice shall be included in
11 | // all copies or substantial portions of the Software.
12 | //
13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | // THE SOFTWARE.
20 |
21 | #include "unittest.h"
22 |
23 | int main(int argc, char **argv) {
24 | #if _MSC_VER
25 | _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
26 | //void *testWhetherMemoryLeakDetectionWorks = malloc(1);
27 | #endif
28 | ::testing::InitGoogleTest(&argc, argv);
29 | return RUN_ALL_TESTS();
30 | }
31 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/AUTHORS:
--------------------------------------------------------------------------------
1 | Baptiste Lepilleur
2 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/LICENSE:
--------------------------------------------------------------------------------
1 | The json-cpp library and this documentation are in Public Domain.
2 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/include/json/autolink.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_AUTOLINK_H_INCLUDED
2 | # define JSON_AUTOLINK_H_INCLUDED
3 |
4 | # include "config.h"
5 |
6 | # ifdef JSON_IN_CPPTL
7 | # include
8 | # endif
9 |
10 | # if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) && !defined(JSON_IN_CPPTL)
11 | # define CPPTL_AUTOLINK_NAME "json"
12 | # undef CPPTL_AUTOLINK_DLL
13 | # ifdef JSON_DLL
14 | # define CPPTL_AUTOLINK_DLL
15 | # endif
16 | # include "autolink.h"
17 | # endif
18 |
19 | #endif // JSON_AUTOLINK_H_INCLUDED
20 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/include/json/features.h:
--------------------------------------------------------------------------------
1 | #ifndef CPPTL_JSON_FEATURES_H_INCLUDED
2 | # define CPPTL_JSON_FEATURES_H_INCLUDED
3 |
4 | # include "forwards.h"
5 |
6 | namespace Json {
7 |
8 | /** \brief Configuration passed to reader and writer.
9 | * This configuration object can be used to force the Reader or Writer
10 | * to behave in a standard conforming way.
11 | */
12 | class JSON_API Features
13 | {
14 | public:
15 | /** \brief A configuration that allows all features and assumes all strings are UTF-8.
16 | * - C & C++ comments are allowed
17 | * - Root object can be any JSON value
18 | * - Assumes Value strings are encoded in UTF-8
19 | */
20 | static Features all();
21 |
22 | /** \brief A configuration that is strictly compatible with the JSON specification.
23 | * - Comments are forbidden.
24 | * - Root object must be either an array or an object value.
25 | * - Assumes Value strings are encoded in UTF-8
26 | */
27 | static Features strictMode();
28 |
29 | /** \brief Initialize the configuration like JsonConfig::allFeatures;
30 | */
31 | Features();
32 |
33 | /// \c true if comments are allowed. Default: \c true.
34 | bool allowComments_;
35 |
36 | /// \c true if root must be either an array or an object value. Default: \c false.
37 | bool strictRoot_;
38 | };
39 |
40 | } // namespace Json
41 |
42 | #endif // CPPTL_JSON_FEATURES_H_INCLUDED
43 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/include/json/forwards.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_FORWARDS_H_INCLUDED
2 | # define JSON_FORWARDS_H_INCLUDED
3 |
4 | # include "config.h"
5 |
6 | namespace Json {
7 |
8 | // writer.h
9 | class FastWriter;
10 | class StyledWriter;
11 |
12 | // reader.h
13 | class Reader;
14 |
15 | // features.h
16 | class Features;
17 |
18 | // value.h
19 | typedef int Int;
20 | typedef unsigned int UInt;
21 | class StaticString;
22 | class Path;
23 | class PathArgument;
24 | class Value;
25 | class ValueIteratorBase;
26 | class ValueIterator;
27 | class ValueConstIterator;
28 | #ifdef JSON_VALUE_USE_INTERNAL_MAP
29 | class ValueAllocator;
30 | class ValueMapAllocator;
31 | class ValueInternalLink;
32 | class ValueInternalArray;
33 | class ValueInternalMap;
34 | #endif // #ifdef JSON_VALUE_USE_INTERNAL_MAP
35 |
36 | } // namespace Json
37 |
38 |
39 | #endif // JSON_FORWARDS_H_INCLUDED
40 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/include/json/json.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_JSON_H_INCLUDED
2 | # define JSON_JSON_H_INCLUDED
3 |
4 | # include "autolink.h"
5 | # include "value.h"
6 | # include "reader.h"
7 | # include "writer.h"
8 | # include "features.h"
9 |
10 | #endif // JSON_JSON_H_INCLUDED
11 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/src/jsontestrunner/sconscript:
--------------------------------------------------------------------------------
1 | Import( 'env_testing buildJSONTests' )
2 |
3 | buildJSONTests( env_testing, Split( """
4 | main.cpp
5 | """ ),
6 | 'jsontestrunner' )
7 |
8 | # For 'check' to work, 'libs' must be built first.
9 | env_testing.Depends('jsontestrunner', '#libs')
10 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/src/lib_json/sconscript:
--------------------------------------------------------------------------------
1 | Import( 'env buildLibrary' )
2 |
3 | buildLibrary( env, Split( """
4 | json_reader.cpp
5 | json_value.cpp
6 | json_writer.cpp
7 | """ ),
8 | 'json' )
9 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/src/test_lib_json/sconscript:
--------------------------------------------------------------------------------
1 | Import( 'env_testing buildUnitTests' )
2 |
3 | buildUnitTests( env_testing, Split( """
4 | main.cpp
5 | jsontest.cpp
6 | """ ),
7 | 'test_lib_json' )
8 |
9 | # For 'check' to work, 'libs' must be built first.
10 | env_testing.Depends('test_lib_json', '#libs')
11 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/jsoncpp/version:
--------------------------------------------------------------------------------
1 | 0.5.0
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/COPYING:
--------------------------------------------------------------------------------
1 | Copyright (c) 2007-2011, Lloyd Hilaiel
2 |
3 | Permission to use, copy, modify, and/or distribute this software for any
4 | purpose with or without fee is hereby granted, provided that the above
5 | copyright notice and this permission notice appear in all copies.
6 |
7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/TODO:
--------------------------------------------------------------------------------
1 | * add a test for 0x1F bug
2 | * numeric overflow in integers and double
3 | * line and char offsets in the lexer and in error messages
4 | * testing:
5 | a. the permuter
6 | b. some performance comparison against json_checker.
7 | * investigate pull instead of push parsing
8 | * Handle memory allocation failures gracefully
9 | * cygwin/msys support on win32
10 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/include/yajl/yajl_version.h:
--------------------------------------------------------------------------------
1 | #ifndef YAJL_VERSION_H_
2 | #define YAJL_VERSION_H_
3 |
4 | #include
5 |
6 | #define YAJL_MAJOR 2
7 | #define YAJL_MINOR 0
8 | #define YAJL_MICRO 1
9 |
10 | #define YAJL_VERSION ((YAJL_MAJOR * 10000) + (YAJL_MINOR * 100) + YAJL_MICRO)
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | extern int YAJL_API yajl_version(void);
17 |
18 | #ifdef __cplusplus
19 | }
20 | #endif
21 |
22 | #endif /* YAJL_VERSION_H_ */
23 |
24 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/src/api/yajl_version.h.cmake:
--------------------------------------------------------------------------------
1 | #ifndef YAJL_VERSION_H_
2 | #define YAJL_VERSION_H_
3 |
4 | #include
5 |
6 | #define YAJL_MAJOR ${YAJL_MAJOR}
7 | #define YAJL_MINOR ${YAJL_MINOR}
8 | #define YAJL_MICRO ${YAJL_MICRO}
9 |
10 | #define YAJL_VERSION ((YAJL_MAJOR * 10000) + (YAJL_MINOR * 100) + YAJL_MICRO)
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 |
16 | extern int YAJL_API yajl_version(void);
17 |
18 | #ifdef __cplusplus
19 | }
20 | #endif
21 |
22 | #endif /* YAJL_VERSION_H_ */
23 |
24 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/src/yajl:
--------------------------------------------------------------------------------
1 | /**
2 | \example reformatter/json_reformat.c
3 | \example example/parse_config.c
4 | */
5 |
6 | /*!
7 | \mainpage Yet Another JSON Library (YAJL)
8 | \author Lloyd Hilaiel
9 | \date 2007-2011
10 |
11 | Yet Another JSON Library (YAJL) is a small event-driven (SAX-style)
12 | JSON parser written in ANSI C, and a small validating JSON
13 | generator. YAJL is released under the permissive ISC license.
14 |
15 | \section features Features
16 |
17 | -# Stream (incremental) parsing and generation of JSON
18 | -# ANSI C
19 | -# Human readable error messages with context
20 | -# tiny
21 | -# event driven
22 | -# support for generating "beautified" JSON
23 | -# includes
24 | It also includes a small simplified tree interface for
25 | simplified parsing and extraction of data from smallish JSON documents.
26 |
27 | \section usage Usage
28 |
29 | See json_reformat.c for a complete example of stream based parsing
30 | and generation of JSON. See parse_config.c for an example of the
31 | simplified tree interface.
32 |
33 | */
34 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/src/yajl_alloc.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007-2011, Lloyd Hilaiel
3 | *
4 | * Permission to use, copy, modify, and/or distribute this software for any
5 | * purpose with or without fee is hereby granted, provided that the above
6 | * copyright notice and this permission notice appear in all copies.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | /**
18 | * \file yajl_alloc.h
19 | * default memory allocation routines for yajl which use malloc/realloc and
20 | * free
21 | */
22 |
23 | #ifndef __YAJL_ALLOC_H__
24 | #define __YAJL_ALLOC_H__
25 |
26 | #include "api/yajl_common.h"
27 |
28 | #define YA_MALLOC(afs, sz) (afs)->malloc((afs)->ctx, (sz))
29 | #define YA_FREE(afs, ptr) (afs)->free((afs)->ctx, (ptr))
30 | #define YA_REALLOC(afs, ptr, sz) (afs)->realloc((afs)->ctx, (ptr), (sz))
31 |
32 | void yajl_set_default_alloc_funcs(yajl_alloc_funcs * yaf);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/src/yajl_encode.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2007-2011, Lloyd Hilaiel
3 | *
4 | * Permission to use, copy, modify, and/or distribute this software for any
5 | * purpose with or without fee is hereby granted, provided that the above
6 | * copyright notice and this permission notice appear in all copies.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | #ifndef __YAJL_ENCODE_H__
18 | #define __YAJL_ENCODE_H__
19 |
20 | #include "yajl_buf.h"
21 | #include "api/yajl_gen.h"
22 |
23 | void yajl_string_encode(const yajl_print_t printer,
24 | void * ctx,
25 | const unsigned char * str,
26 | size_t length,
27 | int escape_solidus);
28 |
29 | void yajl_string_decode(yajl_buf buf, const unsigned char * str,
30 | size_t length);
31 |
32 | int yajl_string_validate_utf8(const unsigned char * s, size_t len);
33 |
34 | #endif
35 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/jni/rapidjson/thirdparty/yajl/src/yajl_version.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | int yajl_version(void)
4 | {
5 | return YAJL_VERSION;
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
23 |
24 |
28 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/java/com/serenegiant/usb/IButtonCallback.java:
--------------------------------------------------------------------------------
1 | package com.serenegiant.usb;
2 |
3 | public interface IButtonCallback {
4 | void onButton(int button, int state);
5 | }
6 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/java/com/serenegiant/usb/IStatusCallback.java:
--------------------------------------------------------------------------------
1 | package com.serenegiant.usb;
2 |
3 | import java.nio.ByteBuffer;
4 |
5 | public interface IStatusCallback {
6 | void onStatus(int statusClass, int event, int selector, int statusAttribute, ByteBuffer data);
7 | }
8 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/res/layout/listitem_device.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
30 |
31 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 | 16dp
26 | 16dp
27 | 48dp
28 | 18sp
29 | 32dp
30 |
31 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
24 |
25 | Select USB Web Camera
26 | Camera
27 | Refresh
28 | No USB camera found
29 |
30 |
--------------------------------------------------------------------------------
/libraries/libuvccamera/src/main/res/xml/device_filter.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/libraries/streamlib/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 |
4 | android {
5 | namespace "dev.alejandrorosas.streamlib"
6 | }
7 |
8 | dependencies {
9 | implementation project(":libraries:libuvccamera")
10 | api "com.github.pedroSG94.rtmp-rtsp-stream-client-java:rtplibrary:2.2.4"
11 | implementation rootProject.ext.core
12 | }
13 |
--------------------------------------------------------------------------------
/libraries/streamlib/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name='UVC Rtmp Stream'
2 | include ':app'
3 | include ':core'
4 | include ':libraries:streamlib'
5 | include ':libraries:libuvccamera'
6 |
--------------------------------------------------------------------------------