summaryrefslogtreecommitdiff
path: root/src/input
AgeCommit message (Collapse)Author
2008-11-20Some warning fixes: XINE_FORMAT_SCANF, statics in headers, consts, ...František Dvořák
Add warning flags to the DEBUG_CFLAGS too.
2008-08-25Fix CDDB access on 64-bit.Darren Salt
2008-08-13Improve parsing of cddb informationArnold Metselaar
Date: Thu, 1 May 2008 21:09:25 +0200 This patch improves the parsing of cddb information: * Disc and track titles can now contain '='. * If a track title is of the form <track-artist> / <track-title> the meta-info will contain the track-artist rather than the disc-artist. I have tested these changes together with my get_dir patch with the sources from debian testing/security and both Amarok and gxine now show the right artists for tracks on a compilation album.
2008-08-13add cdda_class_get_dir method to cdda pluginArnold Metselaar
Date: Thu, 1 May 2008 21:05:55 +0200 This patch adds a cdda_class_get_dir method to the cdda input plugin. I can now add an audio cd to a play-list in Amarok. There may be small interruptions if another cd is playing though, so it would be desirable to lower the priority for access to the cd-drive by the get_dir function.
2008-07-08Avoid using strlen() in loops, calculate it beforehand.Diego 'Flameeyes' Pettenò
--HG-- extra : transplant_source : %80%12%03%93%EFL%FC%AF%A6%22Z%D0%95C%D5%29%AF%FB%95%B2
2008-07-28Only set the tuner if we're going to use it (fixes baseband video inputs)Simon Farnsworth
2008-07-28Preallocate after we know how large the frames will be (fixes a buffer overrun)Simon Farnsworth
2008-07-08Fix compile of input_vcd for ming32Matthias Ringwald
HAVE_FREEBSD_CDROM is not defined for mingw which results in just some stub code. However, the include of <arpa/inet.h> breaks the default build. Moving this #incldue into the conditional HAVE_FREEBSD_CDROM block helps. --HG-- extra : transplant_source : %3D1%FEt%90%F0qS%F18%D9%AA%5By%0C%9AN%87%A6%1F
2008-07-08Add #include <windef.h> to fix compile for mingw32Matthias Ringwald
--HG-- extra : transplant_source : %24%19%EE%23d%E8%AE%93%98%9E%B4%2B%2C%A1%BE%D9%92%B7%27%1E
2008-07-02Don't segfault when the user requests an input the card doesn't posess.Simon Farnsworth
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-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.
2008-06-18input_dvb: Recognise new audio and video stream formatsSimon Farnsworth
Update input_dvb's PMT parser to match demux_ts's list of stream types. This is a stop-gap approach, to avoid doing major rewrites to input_dvb. Ideally, we'd fix the limitations in demux_ts that the comment above input_dvb's PMT parser alludes to, and just parse all the streams in the PMT to demux_ts. In the meantime, this enables use of input_dvb with things like Finnish DVB-T
2008-06-18input_dvb: Allow automatic detection of DVB parametersSimon Farnsworth
We've experienced glitches where the NIT does not match the transmission parameters, and bugs in the kernel where the values we read back from the frontend don't match the transmission. To get round this, we've changed scan to store BANDWIDTH_AUTO and equivalents in the channels.conf file. Update input_dvb to cope with automatic detection of all frontend parameters.
2008-06-17input_v4l: Set video formatSimon Farnsworth
Allow the user to manually configure their tuner to AUTO, PAL, SECAM or NTSC as appropriate. OLD is allowed (but not documented); it's the default value, and gives you the same behaviour as you would get before this option was implemented.
2008-06-17input_dvb: Allow the user to configure the location of the channels.conf ↵Simon Farnsworth
filename We don't have a "normal" Linux directory layout, and thus prefer to keep channels.conf in an unusual place. Provide a configuration option to tell Xine where to find channels.conf
2008-06-16input_dvb: Allow the user to configure the DVB GUI off.Simon Farnsworth
When using Xine in a kiosk-type application, the DVB GUI presents messages onscreen that confuse the user; because there's no keyboard and mouse, there's no way to actually do anything useful with the GUI. Provide a configuration option to turn off the GUI --HG-- extra : transplant_source : c%F4%13I%97%3F%11%E8s%CCc%15%9F%AF%97%D7%13D%FC%AB
2008-06-15Merge.Darren Salt
2008-06-15Remove nbc_check_buffers calls; mark it & the low-water mark fns as deprecated.Darren Salt
2008-06-15Backed out changeset a1dad259c8f8. In 1.1.x, deprecated functions must remain.Darren Salt
2008-06-11Fix va_list-related breakage. Multiple use needs va_copy().Darren Salt
2008-06-09Fix Shoutcast NSV detection.Darren Salt
Leading whitespace could prevent this from working.
2008-05-23Remove MIN/MAX macro definitions on unit.Diego 'Flameeyes' Pettenò
Now that the macro are either imported from the system or defined by configure. don't define them in every source file.
2008-05-23Mark initialisation functions with malloc attribute.Diego 'Flameeyes' Pettenò
All the initialisation functions returning a new object instance that was allocated through malloc() or calloc() can get the malloc attribute so that the compiler can optimise their call.
2008-05-09Use size_t to keep the value returned by strlen().Diego 'Flameeyes' Pettenò
When using a variable to store the result of strlen(), make sure its type is size_t just like the function returns, rather than using a smaller type like int. --HG-- extra : transplant_source : %B0%D5%3B%D7%1Dy%0A%7E%7D%7C%023%08%B2%CE%D3t%0B3%D7
2008-05-09Use snprintf() return value rather than calling strlen() multiple times.Diego 'Flameeyes' Pettenò
Instead of using strlen() to get the new size of the string every time, use the value returned by snprintf() to gather the size of the final string. --HG-- extra : transplant_source : %AA%0D%D3d9%D6%99%D7BP%21w%F3%DE%8Au%90l%AD%16
2008-05-09Initialise the xine_event_t instance directly on declaration.Diego 'Flameeyes' Pettenò
--HG-- extra : transplant_source : %3B%87%DA%89%F2.%1F%F4%F0L/%C4%A3%5B%5C3%1A%09%05g
2008-05-09Use xine_ui_data_t's array rather than creating a temporary.Diego 'Flameeyes' Pettenò
Instead of passing through a temporary ui_title array on the stack, use the array already allocated for the xine_ui_data_t element. Also do that for ui_str_length. --HG-- extra : transplant_source : %1A%B5e%8E%C0gQ%A9%BC%08%B2%0Bm%A9Ec%C1%9F%23%EF
2008-05-09Use asprintf() rather than sn?printf() + strn?dup().Diego 'Flameeyes' Pettenò
Instead of duplicating a buffer after using sn?printf() on it, use asprintf() directly on the final variable.
2008-05-09Use size_t rather than int to store the return value of strlen().Diego 'Flameeyes' Pettenò
2008-05-09Use asprintf() rather than malloc() + snprintf().Diego 'Flameeyes' Pettenò
2008-05-09Use size_t rather than int to store the return value of strlen().Diego 'Flameeyes' Pettenò
Also, reduce visibility of the i variable to the loop where it is used.
2008-05-09Use size_t rather than int to store the return value of strlen().Diego 'Flameeyes' Pettenò
Also, don't reset buffers when we're just going to run a snprintf() call, and avoid multiple calls to strlen() when we're appending to it.
2008-05-09Avoid loop for common memory operations (zeroing, copying, moving).Diego 'Flameeyes' Pettenò
Use the proper function for common memory operations (memset() for zeroing, memcpy() for copying, memmove() for moving), instead of looping through arrays. By extension, remove loops to reset arrays when they were allocated with calloc() and thus already zeroed.
2008-05-09Loop improvements, avoid multiple strlen() and strdup() calls.Diego 'Flameeyes' Pettenò
Instead of executing strlen() after each snprintf() call, use the value returned by the call itself. Instead of using sprintf() on a buffer and then duplicate it, use asprintf().
2008-05-07Don't overuse sscanf().Diego 'Flameeyes' Pettenò
Instead of using sscanf() to get the data out of headers, as we just compared them, skip the name of the header and get the rest. Add the whitespace to the compare so that it actually works as intended. Also save some unneeded dup/free.
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-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-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-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-03Define print_command only when actually logging.Diego 'Flameeyes' Pettenò
2008-05-03Make two arrays of string become arrays of arrays of characters.Diego 'Flameeyes' Pettenò