summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2008-05-07Optimise input_vcd: don't use a static-sized filelist array, and use ↵Diego 'Flameeyes' Pettenò
asprintf where appropriate. Instead of creating a 100-elements filelist array, with each element containing a 256 bytes string, make it dynamic, create it when get_autoplay_list is called, free it if it was present before, and use asprintf() for creating the entries. This not only reduces the complexity of the code, but also reduces the size of the input class object (which in turn reduce memory usage), but also avoids memory leaks that the previous code certainly had. The total memory used even with a full list of files should also be drastically reduced. Also, use asprintf while filling the mrls data, rather than allocating a 1 KiB array on the stack, and use it as temporary.
2008-05-07Centralise frames allocation for input_v4l.Diego 'Flameeyes' Pettenò
Allocate all the frames, the extra info data and the audio and video content areas as one big memory area each. This also remove some use of xine_xmalloc().
2008-05-07Deprecate xine_xmalloc().Diego 'Flameeyes' Pettenò
2008-05-07Cleanup http_proxy environment variable handling.Diego 'Flameeyes' Pettenò
Instead of duplicating twice the http_proxy environment variable value, do so only once, avoid a strlen() call when checking if the string is not empty, remove the http_proxy variable entirely, don't free the duplicated string as that's what it's used.
2008-05-07Remove strlen() call after strftime, the returned value is what is needed.Diego 'Flameeyes' Pettenò
2008-05-07Replace strn?cpy() + strn?cat() calls with a?sprintf().Diego 'Flameeyes' Pettenò
Instead of creating strings through a series os string copy and concatenations, use directly the appropriate printf-like function.
2008-05-07Use strn?dup instead of alloc + strn?cpy.Diego 'Flameeyes' Pettenò
Whenever an allocated memory area is immediately filled in with a string through strcpy() or strncpy(), replace the calls with the appropriate strn?dup().
2008-05-07Use proper string functions in place of sn?printf.Diego 'Flameeyes' Pettenò
Instead of calling sprintf or snprintf with a "%s" format string, use the proper strcpy, strncpy, strdup or strndup function.
2008-05-07Simplify MRL_FREE and MRL_DUPLICATE macros.Diego 'Flameeyes' Pettenò
There is no need to check if a pointer is not NULL before freeing it, so just call free() during MRL_FREE. During duplication, always prefer freeing and recreating to reallocating, as that would probably take more time than would actually be needed to allocate a new memory area. Also, most likely the duplication will happen on a new instance.
2008-05-07Use asprintf() rather than malloc() + sprintf().Diego 'Flameeyes' Pettenò
Using asprintf() instead of malloc() + sprintf() reduces the lines of code in xine-lib (moving the allocation to the C library or asprintf replacement), makes it safer to access the string and can also improve performance whenever the value returned by a function was used as parameter, as before it had to run the function twice in almost every case (once for strlen(), once for sprintf()).
2008-05-07Merge file removal.Diego 'Flameeyes' Pettenò
2008-05-07xine_xmalloc() deprecation: replace its use with static and non-zero size.Diego 'Flameeyes' Pettenò
The xine_xmalloc() function is going to be deprecated, as its behaviour is rarely needed as such, and it's thus misused. With this, almost all uses of xine_xmalloc() with static size (for instance the value returned by sizeof()) or with a size that is guaranteed not to be zero (like strlen()+1) are replaced with calls to either calloc(1, ...) or malloc(). malloc() is used whenever the allocated memory is going to be immediately overwritten, while calloc() is used in every other case, as it sets the whole memory area to zero. --HG-- extra : transplant_source : %8F%98%EC%02%1E%83%F0s%06X%83C%205Y%80%B12%CC%E1
2008-05-07Actually remove the xine_check.h file.Diego 'Flameeyes' Pettenò
2008-05-07Define support for attributes based on compiler's version outside xine build.Diego 'Flameeyes' Pettenò
When we're including xine/attributes.h but we're not building xine, define the support for particular attributes based on the compiler and its version. This way semantic information is maintained outside xine's build (such as deprecated functions).
2008-05-07Mark internal functions and data structures static.Diego 'Flameeyes' Pettenò
Functions and data structures that are not exported and are only ever used in the same unit they are defined should be marked static to improve compiler's ability to optimise them. This applies to xine_dispose_internal() function for xine-lib, the extended_to_int() function in the AIFF demuxer, the bandwidths array in QuickTime demuxer, the wc_pal_lookup table in the WC3 movie demuxer, and the rm_header and pnm_data_header arrays in pnm input plugin.
2008-05-07Make _x_health_check_* functions static.Diego 'Flameeyes' Pettenò
The xine_check.h header is not currently installed and the symbols are not exported, their are only ever used in the same unit they are defined.
2008-05-05Make open_internal static again.Darren Salt
2008-05-05Check for malloc attribute and define XINE_MALLOC for use in xineutils.h, ↵Diego 'Flameeyes' Pettenò
rather than just checking for GCC 3.
2008-05-03Define print_command only when actually logging.Diego 'Flameeyes' Pettenò
2008-05-03Don't define flac_metadata_callback if we're not going to use it. It's only ↵Diego 'Flameeyes' Pettenò
used for legacy flac.
2008-05-03Make two arrays of string become arrays of arrays of characters.Diego 'Flameeyes' Pettenò
2008-05-03Remove deprecated functions from net_buf_ctrl.c.Diego 'Flameeyes' Pettenò
2008-05-03Remove unused variables, as reported by GCC 4.3.Diego 'Flameeyes' Pettenò
2008-05-03Remove specific ID3v2 parsing funcion from the header file, always use the ↵Diego 'Flameeyes' Pettenò
generic one to access them.
2008-05-03Mark some removed-in-1.2 exported/unimplemented functions as deprecated.Darren Salt
2008-05-03Add support for "deprecated" attribute.Darren Salt
2008-04-30Fix green smearing in h264 decodingJason Tackaberry
Occasionally when playing h264-encoded files, green blocks will appear at the edges of the frame, and get smeared around (following the motion vectors, of course). This bug has existing in Xine for well over a year, and I keep hoping it will be fixed, but it never was. I recently learned that gstreamer had a similar problem and it was fixed last year. With this as a hint, I found http://bugzilla.gnome.org/show_bug.cgi?id=364139 and the patch attached to that bug. I've adapted that patch to xine, and it is attached. I have compared clips before and after applying this patch, and in all cases the green artifacts have gone away, and I have seen no negative side effects.
2008-04-30Replace calloc (n, sizeof (char)) with malloc (n) where zero init isn't needed.Darren Salt
2008-04-28Add xine_get_pluginroot() for win32. Completely untested.Darren Salt
2008-04-21Fix Xv driver debug build.Darren Salt
2008-04-21Fix display of some MJPEG streams (YUVJ420P).Darren Salt
2008-04-21Debug logging of ffmpeg pixel format in case of display errors.Darren Salt
2008-04-21Add MIME types and .mpp for musepack.Darren Salt
2008-04-19Replace xine_xcalloc usage with calloc, for the revisions transplanted from ↵Diego 'Flameeyes' Pettenò
1.2 series.
2008-03-10Add Xv port selection by type (overlay or textured video).Darren Salt
This uses the adapter names reported by the X 2D graphics driver. (Transplanted from 8c06e053c6dbb2f31c004f6eb615ebbf3f67d667)
2008-02-25When auto-detecting Xv ports, prefer port nos. >= configured.Darren Salt
(Transplanted from f03669a2395d97a3e40615db1089af084a69d299)
2008-02-02Move more shared Xv config desc. & help strings; add new location to POTFILES.Darren Salt
(Transplanted from 574fefcee8b1b6456fd8dc9c06191cf4622f07eb)
2008-02-02Handle invalid port nos. properly (avoids a possible xcbxv segfault).Darren Salt
(Transplanted from 378582ca7b95e634cb0b04b714df0170b60688b3)
2008-02-02Convert the XxMC plugin to use the new header file.Darren Salt
Also, a few trivial constness cleanups. (Transplanted from 3ede88232fd45bca91eb0b1cfa2d70de040cadb8)
2008-02-02XvMC plugin uses the new header; use config_help; small var/struct cleanup.Darren Salt
- Removed display in open_plugin(); - Converted adaptor_{info,num} in xvmc_class_t into locals in open_plugin(). Also, a few trivial constness cleanups. (Not fully tested; XvMC doesn't work for me. (Transplanted from 234c8a2131e9a19d52414733dfc2bf93beb80af0)
2008-02-02Convert the plain Xv plugins to use the new header file.Darren Salt
Also, a few trivial constness cleanups. (Transplanted from 83c85e349d6d09b06faa6d34c090038d7bd1ac81)
2008-02-02Add a header file for some strings shared between the Xv-using plugins.Darren Salt
(Transplanted from 39cc466bebc1f98bb20411351fd4c671ad1e190d)
2008-02-01Port Xv port selection to xxmc.Darren Salt
(Transplanted from ec0d80a280e90494306023b66e5917209b2c4155)
2008-02-01Add Xv port selection to the XCB xv plugin.Darren Salt
(Transplanted from b2dd043f187b6332248fd58410ffebf7e7727aeb)
2008-02-01Fallback to auto-detect when the specified Xv port is unavailable or unusable.Darren Salt
(Transplanted from 649b3a6f755edaed6edc44e95b13cf2a84d19a57)
2008-02-01patch adding video.device.xv_port optionJean-Yves Lefort
The attached patch allows to specify the Xv port to use (needed with some nvidia twinview configurations). (Transplanted from 307aa599ccb0e496638738accbdb85b493904e18)
2008-06-20Ask the input plugin which demuxer to use.Darren Salt
This overrides the normal content/extension detection, but can be overridden by the user. This is an input plugin API extension; ABI is unchanged. The version is not bumped (we can't bump it due to 1.2).
2008-06-20Read the MIME type from the plugin & use it for demuxer selection (if by extn).Darren Salt
text/plain is specifically filtered out because it could cause lots of false positives, at least with http; web servers tend to default to text/plain for unknown types.
2008-06-20Allow input plugins to report MIME types as optional data. Implement for http.Darren Salt
This is an input plugin API extension; ABI is unchanged. The version is not bumped (we can't bump it due to 1.2).
2008-06-19Swap positions of "auto" and "old" in the v4l TV standards list.Darren Salt
"Old" is still the default.