summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2007-04-13Provide internal functions to lock port rewiring.Reinhard Nißl
The introduced function give "frontend like" plugins a chance to lock and unlock port rewiring. This protects such threads (when combined with holding the frontend lock) from beeing blocked when calling functions like xine_get_current_frame().
2007-04-13Merge extentions to ticket system.Reinhard Nißl
2007-04-13Provide ability to lock port rewiring.Reinhard Nißl
The idea is to allow only a "single" frontend to rewire ports at a certain point in time. Regarding a stream, frontend_lock is used for example to allow only a single frontend to change the speed. Unfortunately, frontend_lock cannot be used as the rewire functions are not stream related. Therefore a new port_rewiring_lock was introduced and used at appropriate locations. When an arbitrary thread now holds the frontend_lock and the port_rewiring_lock, it is safe that acquiring a port ticket in functions like xine_get_current_frame() will never block the thread.
2007-04-13Disable bob deinterlacing on a per frame decision (continued).Reinhard Nißl
One can assume that a still frame is to show when there are no more frames left to display. The changed code uses _x_query_buffer_usage() to retrieve the number of frames waiting to be displayed to integrate this information into the decision.
2007-04-12Merge some code for still frame detection.Reinhard Nißl
2007-04-12Disable bob deinterlacing on a per frame decision.Reinhard Nißl
There are some situations where bob deinterlacing doesn't make much sense, as the effect doesn't work for example for slow motion. And in fast motion mode, the sleep between displaying the two fields lowers the reachable fast motion frame rate. Another annoying effect is the reduction in vertical resolution for still images. The changed code tries to detect such issues and disables bob deinterlacing for such frames. The detection of still images is still to come.
2007-04-12Make bob deinterlacing more precisely and skip it on demand.Reinhard Nißl
Bob deinterlacing is implemented as showing the top field, sleeping for half the frame duration and showing the bottom field. Most drivers tend to synchronize displaying a field on the VBI and thus displaying a field may take up to half the frame duration in certain cases. According to the original code, the sleep took always half the frame duration and therefore the second field could get displayed too late. As a result, the driver was syncing to VBI most often, so that things got even worse. The changed code now calculates the sleep time in a way that the second field gets displayed half the frame duration after the first field. Moreover, it monitors how much time was spent to display the first field and when this time exceeds 75 % of the field time (= half the frame time), it skips displaying the second field, as usually this is an indicator that the driver has no more frame buffers left. So displaying the second field would just make things go worse.
2007-04-12Avoid keeping frames referenced which are nolonger used.Reinhard Nißl
The current implementation keeps references to VO_NUM_RECENT_FRAMES frames (for deinterlacing), but doesn't make any use of them. As many XXMC capable devices only supply 8 frames at all, keeping fewer frames referenced makes more available for decoding and thus avoids frame drops by keeping the number of frames which are ready for display more often above frame_drop_limit.
2007-04-12Let xxmc switch back to an unaccelerated context.Reinhard Nißl
The current code misses the ability to switch back to an unaccelerated context, e. g. when previously MPEG2 material was displayed which is then followed by H.264 material. As the latter is not handled as XINE_IMGFMT_XXMC there was no way to leave the accelerated context and therefore the images did not appear on screen.
2007-04-12Provide a function to query buffer usage.Reinhard Nißl
This function shall be used to poll the number of remaining frames from a certain point in time on until the reported numbers are all 0. At that point in time, the content on screen is identical to a certain state of the stream, at which for example, a hardcopy may be taken.
2007-04-12Extend ticket system for nonblocking ticket acquiries.Reinhard Nißl
The current code has a race condition which can block arbitrary threads that call for example xine_get_current_frame() until the stream gets unpaused again. This can happen when the internal ticket acquiration collides with a ticket revokation for example when another thread is going to pause the stream. There are a few situations where a port ticket needs to be acquired for calling a port function but where it is absolutely undesireable to get blocked for an undetermined period of time. Therefore the ticket system should be extended by nonblocking functions which allow ticket acquiration even when a ticket revokation is in progress. And in the case where blocking is not avoidable, it should simply be indicated that no ticket was acquired. The caller can then choose to repeat the call at a later point in time.
2007-04-12Convert more documentation to Doxygen format; hide two functions.Diego 'Flameeyes' Pettenò
The _x_config_init() and _x_config_change_opt() functions should stay internal and not be exported by the library, so remove XINE_PROTECTED to hide them.
2007-04-12Speed up start code scanning.Reinhard Nißl
The current code implements hardware (a shift register) in software just to find the byte pattern 00 00 01 xx, which causes remarkable CPU load on less powerful machines. The new approach uses memchr() to find the 01 in the buffer, which most often hits a start code. memchr() seems to be even faster then implementing a real pattern search (i. e. by just looking at every third byte to find 01). The new implementation causes significantly fewer CPU load on less powerful machines.
2007-04-11Special handling of sequence end code to improve still frames.Reinhard Nißl
The current code emits a frame when a non slice start code is seen. For still frames, this is typically a sequence end code. But the current code doesn't call parse_chunk() immediately because it waits for a further start code to determine the chunk of data to pass to parse_chunk(). But there isn't such a further start code for still frames after the sequence end code and thus, the still frame will not be emitted. As sequence end code is the only start code which has no data according to the MPEG specification, let's use this information to call parse_chunk() immediately.
2007-04-11Detect absence of AFD and report only changes.Reinhard Nißl
The current code cannot detect the absence of AFD once it has been seen in the stream. As AFD can appear in user data after sequence, group or picture start codes, the idea is to reset the stored AFD value when processing the sequence start code. In the case where AFD is seen in user data, it is stored internally, to have it ready when the first slice is processed. At least at that time, AFD data has been seen and can be analyzed for changes. At any change, the AFD value will then be stored into a stream property. Doing this only for changes avoids locks while writing the same value over and over to the stream's property.
2007-04-11Improve MPEG2 detection to have it ready for correct aspect ratioReinhard Nißl
determination. The current code detects MPEG2 when parsing the sequence extention which appears only in MPEG2 streams. But this is to late for correct aspect ratio determination which happens earlier and therefore assumes MPEG1. The result is a totally wrong aspect ratio. To fix this issue, the next start code (which is already available at that time) is passed to parse_chunk() too, which can then be used to detect a MPEG2 extension start code early enough before the aspect ratio is determined.
2007-04-11Merge changes from 1.1 branch (where they still make sense).Diego 'Flameeyes' Pettenò
2007-04-11Merge from -build-fixes branch.Darren Salt
2007-04-11Merge Matt Messier video output for Mac OS X.Diego 'Flameeyes' Pettenò
2007-04-11Now that libmpcdec sources are in contrib/ subdirectory, move ↵Diego 'Flameeyes' Pettenò
xine_musepack_decoder.c in libxineadec. --HG-- rename : src/libmusepack/xine_musepack_decoder.c => src/libxineadec/xine_musepack_decoder.c
2007-04-11Update libmpcdec (formerly libmusepack) to version 1.2.5, this also reduces ↵Diego 'Flameeyes' Pettenò
the patching needed. Contestually, move libmpcdec code in contrib/libmpcdec, so that it's not mixed together with xine code. The use of MUSEPACK_LIBS/MUSEPACK_CFLAGS intermediate is to make simpler move to pkg-config checks if libmpcdec developers decide to install one.
2007-04-11Forgot to include attributes.hDiego 'Flameeyes' Pettenò
2007-04-11Merge 1.1 branch.Diego 'Flameeyes' Pettenò
2007-04-11Convert almost the whole buffer.h documentation to Doxygen format, and ↵Diego 'Flameeyes' Pettenò
extend the documentation available before.
2007-04-10Initial import of VDR plugins.vdr-xine-version-711Reinhard Nißl
2007-04-10Merge Reinhard Nissl's changes.Darren Salt
2007-04-10Allow xine-lib to be built with CFLAGS='-O0 -g3' by changing optimizationReinhard Nißl
as needed for some files where gcc runs out of registers otherwise.
2007-04-10Split the DirectFB plugin into X11 and non-X versions.Darren Salt
This fixes linkage problems for people who want this but don't want X.
2007-04-10Use ATTR_ALIGN to declare alignment.Diego 'Flameeyes' Pettenò
2007-04-10Rationalise __attribute__((packed)) usage.Diego 'Flameeyes' Pettenò
First of all, as we check the presence of the attribute in configure.ac and we generate the XINE_PACKED definition there, there's no need to do the work again on attributes.h. Also remove #pragma pack support for now, as the trick is just not neat enough, and as it is it's just noise. Make Wine, libdvdnav and nosefart use XINE_PACKED rather than doing their own checks, as they are less reliable.
2007-04-10Instead of recreating the FOURCC_32 wheel, use ME_FOURCC and read directly a ↵Diego 'Flameeyes' Pettenò
32-bit value.
2007-04-10Replace the duplicated meFOURCC macro with ME_FOURCC that is declared in ↵Diego 'Flameeyes' Pettenò
bswap.h already.
2007-04-10Use ME_FOURCC rather than having two declarations for wvpk_signature.Diego 'Flameeyes' Pettenò
2007-04-09Remove stray FFmpeg code.Diego 'Flameeyes' Pettenò
2007-04-09Don't export _x_(dummy_)fifo_buffer_new functions.Diego 'Flameeyes' Pettenò
2007-04-09Check for external FFmpeg before checking if the given decoder wasDiego 'Flameeyes' Pettenò
enabled in configuration. As external FFmpeg does not install its own ffmpeg_config.h, we have to assume that it supports every buffer type; this should probably be checked for errors when opening the decode, but at least it should work to the same extent it worked on 1.1.
2007-04-09Check for include files in the included libavcodec directory.Diego 'Flameeyes' Pettenò
The dvdata.h is never installed by FFmpeg, so when using the external copy you have to still use the internal dvdata.h file at the moment.
2007-04-09Use ffmpeg_config.h only when using internal FFmpeg.Diego 'Flameeyes' Pettenò
This way there's no need to fake it when using the external copy.
2007-04-09Merge the FFmpeg integration branch into the nopadding branch.Diego 'Flameeyes' Pettenò
2007-04-09Update from 1.1 branch.Diego 'Flameeyes' Pettenò
2007-04-08Beside the name, constants can't be marked const or gcc miscompiles the ↵Diego 'Flameeyes' Pettenò
Altivec code.
2007-04-08Mark various private arrays, structs & fn parameters as static and/or const.Darren Salt
Two of the modified files are headers, but each contains definitions as well as declarations and is only ever used once.
2007-04-07Declare ffmpeg_config.h part of sources for the decode plugin.Diego 'Flameeyes' Pettenò
2007-04-07ffmpeg_config.h is no more generated by (xine-lib's) configure, so copy it ↵Diego 'Flameeyes' Pettenò
from the FFmpeg's build directory (as it's not easy to take it with relative path).
2007-04-07Remove the fake avcodec_register_all() function for internal FFmpeg.Diego 'Flameeyes' Pettenò
With the new way to build FFmpeg, there's no need for a special function to use when building with internal FFmpeg, so just use the one already provided by libavcodec. Codecs that shouldn't be registered should just be disabled in the build.
2007-04-07Remove diff_to_ffmpeg_cvs.txt file from EXTRA_DIST, as if we'll still need ↵Diego 'Flameeyes' Pettenò
it, we should put it in contrib/ instead.
2007-04-07Merge changes from main repository.Diego 'Flameeyes' Pettenò
2007-04-07Merge changes from main repository.Diego 'Flameeyes' Pettenò
2007-04-07video_overlay_s uses C's inheritance-like definition, so the first field has ↵Diego 'Flameeyes' Pettenò
to be video_overlay.
2007-04-07Use CC_ATTRIBUTE_FORMAT; replace __attribute((format(printf, ...))) accordingly.Darren Salt