From b065b0619c663a2d87ac207fc107ead4dca84b31 Mon Sep 17 00:00:00 2001 From: Alberto Fustinoni Date: Tue, 20 Jun 2017 13:37:32 +0900 Subject: [PATCH] cruft --- .../include/streams/interface_stream.h | 91 --------------- .../include/streams/memory_stream.h | 61 ---------- .../include/streams/stdin_stream.h | 40 ------- .../include/streams/trans_stream.h | 108 ------------------ 4 files changed, 300 deletions(-) delete mode 100644 libretro-common/include/streams/interface_stream.h delete mode 100644 libretro-common/include/streams/memory_stream.h delete mode 100644 libretro-common/include/streams/stdin_stream.h delete mode 100644 libretro-common/include/streams/trans_stream.h diff --git a/libretro-common/include/streams/interface_stream.h b/libretro-common/include/streams/interface_stream.h deleted file mode 100644 index a389f26..0000000 --- a/libretro-common/include/streams/interface_stream.h +++ /dev/null @@ -1,91 +0,0 @@ -/* Copyright (C) 2010-2017 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (interface_stream.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _LIBRETRO_SDK_INTERFACE_STREAM_H -#define _LIBRETRO_SDK_INTERFACE_STREAM_H - -#include -#include -#include - -#include -#include - -RETRO_BEGIN_DECLS - -enum intfstream_type -{ - INTFSTREAM_FILE = 0, - INTFSTREAM_MEMORY -}; - -typedef struct intfstream_internal intfstream_internal_t; - -typedef struct intfstream intfstream_t; - -typedef struct intfstream_info -{ - struct - { - struct - { - uint8_t *data; - unsigned size; - } buf; - bool writable; - } memory; - enum intfstream_type type; -} intfstream_info_t; - -void *intfstream_init(intfstream_info_t *info); - -bool intfstream_resize(intfstream_internal_t *intf, - intfstream_info_t *info); - -bool intfstream_open(intfstream_internal_t *intf, - const char *path, unsigned mode, ssize_t len); - -ssize_t intfstream_read(intfstream_internal_t *intf, - void *s, size_t len); - -ssize_t intfstream_write(intfstream_internal_t *intf, - const void *s, size_t len); - -char *intfstream_gets(intfstream_internal_t *intf, - char *buffer, size_t len); - -int intfstream_getc(intfstream_internal_t *intf); - -int intfstream_seek(intfstream_internal_t *intf, - int offset, int whence); - -void intfstream_rewind(intfstream_internal_t *intf); - -int intfstream_tell(intfstream_internal_t *intf); - -void intfstream_putc(intfstream_internal_t *intf, int c); - -int intfstream_close(intfstream_internal_t *intf); - -RETRO_END_DECLS - -#endif diff --git a/libretro-common/include/streams/memory_stream.h b/libretro-common/include/streams/memory_stream.h deleted file mode 100644 index dca8e7a..0000000 --- a/libretro-common/include/streams/memory_stream.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (C) 2010-2017 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (memory_stream.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef _LIBRETRO_SDK_FILE_MEMORY_STREAM_H -#define _LIBRETRO_SDK_FILE_MEMORY_STREAM_H - -#include -#include - -#include - -RETRO_BEGIN_DECLS - -typedef struct memstream memstream_t; - -memstream_t *memstream_open(unsigned writing); - -void memstream_close(memstream_t *stream); - -size_t memstream_read(memstream_t *stream, void *data, size_t bytes); - -size_t memstream_write(memstream_t *stream, const void *data, size_t bytes); - -int memstream_getc(memstream_t *stream); - -void memstream_putc(memstream_t *stream, int c); - -char *memstream_gets(memstream_t *stream, char *buffer, size_t len); - -size_t memstream_pos(memstream_t *stream); - -void memstream_rewind(memstream_t *stream); - -int memstream_seek(memstream_t *stream, int offset, int whence); - -void memstream_set_buffer(uint8_t *buffer, size_t size); - -size_t memstream_get_last_size(void); - -RETRO_END_DECLS - -#endif diff --git a/libretro-common/include/streams/stdin_stream.h b/libretro-common/include/streams/stdin_stream.h deleted file mode 100644 index ce5ebe5..0000000 --- a/libretro-common/include/streams/stdin_stream.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2010-2017 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (stdin_stream.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef LIBRETRO_SDK_STDIN_STREAM_H__ -#define LIBRETRO_SDK_STDIN_STREAM_H__ - -#include -#include - -#include - -#include - -RETRO_BEGIN_DECLS - -size_t read_stdin(char *buf, size_t size); - -RETRO_END_DECLS - -#endif - diff --git a/libretro-common/include/streams/trans_stream.h b/libretro-common/include/streams/trans_stream.h deleted file mode 100644 index 4023103..0000000 --- a/libretro-common/include/streams/trans_stream.h +++ /dev/null @@ -1,108 +0,0 @@ -/* Copyright (C) 2010-2017 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this file (trans_stream.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef LIBRETRO_SDK_TRANS_STREAM_H__ -#define LIBRETRO_SDK_TRANS_STREAM_H__ - -#include -#include -#include - -#ifdef _WIN32 -#include -#else -#include -#endif - -#include - -#include - -RETRO_BEGIN_DECLS - - -enum trans_stream_error -{ - TRANS_STREAM_ERROR_NONE = 0, - TRANS_STREAM_ERROR_AGAIN, /* more work to do */ - TRANS_STREAM_ERROR_ALLOCATION_FAILURE, /* malloc failure */ - TRANS_STREAM_ERROR_INVALID, /* invalid state */ - TRANS_STREAM_ERROR_BUFFER_FULL, /* output buffer full */ - TRANS_STREAM_ERROR_OTHER -}; - -struct trans_stream_backend -{ - const char *ident; - const struct trans_stream_backend *reverse; - - /* Create a stream data structure */ - void *(*stream_new)(void); - - /* Free it */ - void (*stream_free)(void *); - - /* (Optional) Set extra properties, defined per transcoder */ - bool (*define)(void *, const char *, uint32_t); - - /* Set our input source */ - void (*set_in)(void *, const uint8_t *, uint32_t); - - /* Set our output target */ - void (*set_out)(void *, uint8_t *, uint32_t); - - /* Perform a transcoding, flushing/finalizing if asked to. Writes out how - * many bytes were read and written. Error target optional. */ - bool (*trans)(void *, bool, uint32_t *, uint32_t *, enum trans_stream_error *); -}; - -/** - * trans_stream_trans_full: - * @backend : transcoding backend - * @data : (optional) existing stream data, or a target - * for the new stream data to be saved - * @in : input data - * @in_size : input size - * @out : output data - * @out_size : output size - * @error : (optional) output for error code - * - * Perform a full transcoding from a source to a destination. - */ -bool trans_stream_trans_full( - struct trans_stream_backend *backend, void **data, - const uint8_t *in, uint32_t in_size, - uint8_t *out, uint32_t out_size, - enum trans_stream_error *error); - -const struct trans_stream_backend* trans_stream_get_zlib_deflate_backend(void); -const struct trans_stream_backend* trans_stream_get_zlib_inflate_backend(void); -const struct trans_stream_backend* trans_stream_get_pipe_backend(void); - -extern const struct trans_stream_backend zlib_deflate_backend; -extern const struct trans_stream_backend zlib_inflate_backend; -extern const struct trans_stream_backend pipe_backend; - -RETRO_END_DECLS - -#endif -