Commit Graph

427 Commits

Author SHA1 Message Date
Stefano Pigozzi 00a08af9f6 macosx_events: fix modifiers handling with media keys
This was caused by a typo. Regression from add7c2955d.

Fixes #213
2013-09-05 07:38:37 +02:00
Stefano Pigozzi d57e1aa599 macosx_events: send a `release all` after key up events
This prevents keys to become stuck due to changing keyboard modifiers during
the key down. Not the prettiest approach but event `x11_common` does it like
this.

Fixes #210
2013-09-02 21:13:56 +02:00
Stefano Pigozzi add7c2955d macosx_events: remove duplication
refactoring: extract method `handleMPKey:withMask:`
2013-09-02 21:11:05 +02:00
Stefano Pigozzi 04caddb7c8 cocoa: enqueue events only if input context is present 2013-09-01 23:51:36 +02:00
Stefano Pigozzi 134c3e148c osx: use MP_KEY_* instead of MK_* for media keys
In 213ad5d6c I added `MK_*` key bindings overlooking the fact that mpv already
has `MP_KEY_*` for media keys.
2013-09-01 20:57:40 +02:00
Stefano Pigozzi 462e6f281a cocoa: let the core handle key repeats
Report key down and key up modifiers to the core so that it can issue it's
own key repeats (instead of relying on Cocoa's ones).
2013-08-30 19:49:30 +02:00
Stefano Pigozzi 11dad6d44b macosx: remove platform specific input queue
Since last commit the input queue in the core is thread safe, so there is no
need for all this platform specific stuff anymore.
2013-08-13 23:02:43 +02:00
Stefano Pigozzi 406241005e core: move contents to mpvcore (2/2)
Followup commit. Fixes all the files references.
2013-08-06 22:52:31 +02:00
James Ross-Gowan 103fbf043f mpv.rc: update Windows icon
Based on the OSX bundle icon.
2013-07-30 16:15:37 +02:00
Diogo Franco (Kovensky) fac2d9097e getch2: Load the "ce", "ks" and "ke" caps into a static buffer
Fixes reports of printing of garbage (or anything else) other than clearing
the status line to the end of line: the buffer returned by termcap_get
could get moved, and if that happened then these 3 caps pointed to garbage.
2013-07-26 16:03:56 -03:00
Diogo Franco (Kovensky) 630edc0637 getch2: Deactivate getch2 on SIGINT; also handle SIGQUIT 2013-07-26 15:51:48 -03:00
Diogo Franco (Kovensky) 15742504d0 getch2: Only send ESC if it was typed twice
Avoids quitting mpv if any unknown escape is entered.
2013-07-26 11:30:10 -03:00
Diogo Franco (Kovensky) 3928b39988 getch2: Handle setupterm errors
setupterm abort()s if it can't initialize the terminal and the last
parameter is NULL; handle setupterm errors and retry with "ansi" if
the TERM env var was unset.
2013-07-26 11:29:34 -03:00
wm4 ca039d42bb getch2: fix compilation 2013-07-26 02:13:35 +02:00
Diogo Franco (Kovensky) fb67770ed6 getch2: Support ESC keypresses again
Due to the termcap matching and the hardcoded fallbacks, the ESC keypress
has to be followed by another non-matching keypress (such as another ESC)
for it to be accepted. We drop the second ESC in case it was typed twice.
2013-07-25 21:10:06 -03:00
Diogo Franco (Kovensky) 0cfc382355 getch2: Doing it right this time
getch2_pos should be set to 1, not 0, when backtracking. Avoids the
possible infinite loop but correctly.
2013-07-25 13:29:10 -03:00
Diogo Franco (Kovensky) c36a5e0f36 Revert "getch2: Avoid possible infinite loop"
This reverts commit ba95aed6f1.
2013-07-25 13:26:19 -03:00
Diogo Franco (Kovensky) ba95aed6f1 getch2: Avoid possible infinite loop
If the first character is not a valid UTF-8 start code nor is in termcap,
getch2 would enter an infinite loop. Always walk 1 byte in the UTF-8 case
unless it's a valid start code.
2013-07-25 13:24:22 -03:00
Diogo Franco (Kovensky) 5586b02931 getch2, mplayer: Always call load_termcap
getch2 now deals with the cases where we don't have termcap. Add a dummy
load_termcap to getch2-win so we don't get linking errors on mingw.
2013-07-25 12:23:40 -03:00
Diogo Franco (Kovensky) 19b1279bb3 getch2: Remove unused function, fix possible crash
If we still haven't read the full key from the input but it's regardless a
unique match in the database, we could receive a NULL keycode from
keys_search (it's not a full match after all) and proceed to use it.

Don't disable the keycode matching code if we don't have termcap as we can
still match against the hardcoded sequences.
2013-07-25 12:21:22 -03:00
Diogo Franco (Kovensky) 057467f6b3 getch2: Refactor/rewrite
Still uses termcap, but uses terminfo for loading the termcap database if
possible. Adds configure test to find terminfo; skips the termcap test
if terminfo is found since terminfo provides termcap.

Use termcap completely for special keys; if we can't get it from termcap
and it isn't one of the known fallbacks, we ignore its specialness and
treat as a sequence of UTF-8 codes.

Further hardcoded fallbacks can be added by calling keys_push_once in
load_termcap; there is no limit to the amount of keys pushed.

Uses the "ke" and "ks" capabilities to start / exit application mode, which
is necessary on vt100 emulators (including screen, xterm and all terminals
that emulate either of those) to correctly receive arrow keys.

It's now possible to compile getch2 even without termcap, though it won't
be of much use since it'll be unable to detect special keys.

Converted to 4 spaces per tab, prettified some statements.
2013-07-25 00:01:51 -03:00
Stefano Pigozzi 5f265d5930 cocoa_common: handle keyboard modifiers for mouse events 2013-07-21 10:49:27 +02:00
James Ross-Gowan 3e7d483ac8 w32: update manifest for high DPI and Windows 8.1
Since Windows Vista, when running at 144 DPI or higher with composition
switched on, applications that don't declare themselves to be DPI aware
are stretched by the window manager, kind of like low resolution apps in
OSX.

To avoid this, declare DPI awareness in the manifest. Since mpv is
practically resolution independent this shouldn't cause any trouble. The
'True/PM' value declares per-monitor DPI awareness in Windows 8.1, so
that the mpv isn't shrunk when moved from a high DPI screen to one with
a lower DPI.

Also, avoid compatibility shims by declaring compatibility with all
Windows versions from Vista to 8.1 and add the missing uiAccess
attribute to the requestedExecutionLevel element.
2013-07-14 16:10:23 +02:00
wm4 5e6b96f1ff getch2-win: uncrustify 2013-07-14 16:08:27 +02:00
wm4 659a314a19 osdep: remove unused mmap compatibility hacks
Not sure how this worked. Only af_export.c and tvi_v4l2.c were
using mmap, but they didn't include osdep/mmap.h or mmap_anon.h. In
any case, we trust that the target system is sufficiently POSIX
compliant if mmap is actually defined (as checked by configure).
2013-07-07 21:44:37 +02:00
Stefano Pigozzi 8af51bd3fe cocoa: remove usage of mp_fifo
Update Cocoa parts to remove usage of the mp_fifo internal API to send events
to the core and use the input context directly. This is to follow commits the
work in commits 70a8079c and d603e73c.
2013-07-03 22:25:45 +02:00
wm4 d603e73c24 core: cleanup more mp_fifo leftovers
Now only the OSX and Wayland parts are using this.
2013-07-02 14:11:31 +02:00
Stefano Pigozzi 0407869ae3 OSX: fix compilation with 10.7 SDK
Recent work in the OS X parts of the code started using clang's support for
Obj-C's support for Literals and Subscripting. These particular language
features remove a lot of boilerplate code and allow to interact with
collections as consicely as one would do in scripting languages like Ruby or
Python.

Even if these are compiler features, Subscripting needs some runtime support.
This is provided with libarclite (coming with the compiler), but we need to
add the proper method definitions since the 10.7 SDK headers do not include
them. That is because 10.7 shipped before this language features.

This will cause some warnings when compiling with the 10.7 SDK because the
commit also redefines BOOL to make autoboxing/unboxing of BOOL literals to
work.

If you need to test this for whatever reason on 10.8, just pass in the correct
SDK to configure's extra cflags:

  ./configure --extra-cflags='-mmacosx-version-min=10.7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk'

Fixes #117
2013-06-19 21:24:26 +02:00
wm4 171d1ef7fe osdep: remove shmem wrapper
This is unused now that the cache is always threaded.
2013-06-18 02:19:15 +02:00
Stefano Pigozzi e8a6e1a201 macosx_events: handle key modifiers with media keys
This was overlooked in the previous inplementation. Adding it required some
refactoring of the `handleKeyDown:` method in order to extract common parts
with `handleMediaKey:`.
2013-06-06 21:33:31 +02:00
Stefano Pigozzi 6619905902 macosx_events: DRY up key lookup over dictionary
Two methods duplicated very similar behaviour. Extract method with the common
behaviour.
2013-06-05 21:39:59 +02:00
Stefano Pigozzi 85c2a4a1d2 macosx_events: make remote property an instance variable
There was no reason for it to be public.
2013-06-05 00:02:29 +02:00
Stefano Pigozzi 213ad5d6c4 osx: improve Media Keys support
This commit addresses some issues with the users had with the previous
implementation in commit c39efb9. Here's the changes:

  * Use Quartz Event Taps to remove Media Key events mpv handles from
    the global OS X queue. This prevents conflicts with iTunes. I did this on
    the main thread since it is mostly idling. It's the playloop thread that
    actually does all the work so there is no danger of blocking the event tap
    callback.
  * Introduce `--no-media-keys` switch so that users can disable all of mpv's
    media key handling at runtime (some prefer iTunes for example).
  * Use mpv's bindings so that users can customize what the media keys do via
    input.conf. Current bindings are:

      MK_PLAY cycle pause
      MK_PREV playlist_prev
      MK_NEXT playlist_next

An additional benefit of this implementation is that it is completly handled
by the `macosx_events` file instead of `macosx_application` making the
project organization more straightforward.
2013-06-04 23:02:23 +02:00
Stefano Pigozzi 72f2942dfa osx: add Apple Remote support
After killing the non functional AR support in c8fd9e5 I got much complaints so
this adds AR support back in (and it works). I am using the HIDRemote class by
Felix Schwarz and that part of the code is under the BSD license. I slightly
modified it replacing [NSApplication sharedApplication] with NSApp. The code
of the class is quite complex (probably because it had to deal with all the
edge cases with IOKit) but it works nicely as a black box.

In a later commit I'll remove the deprecation warnings caused by HIDRemote's
usage of Gestalt.

Check out `etc/input.conf` for the default bindings.

Apple Remote functionality is automatically compiled in when cocoa is enabled.
It can be disabled at runtime with the `--no-ar` option.
2013-06-03 22:35:47 +02:00
Stefano Pigozzi c39efb96d1 osx: implement media keys
Media keys are pretty handy if you use mpv as a music player (yes I'm one of
those people that do).

These are the bindings (which lead to the same behaviour as iTunes):
  * NX_KEYTYPE_PLAY   -> MP_KEY_PLAY
  * NX_KEYTYPE_FAST   -> MP_KEY_NEXT
  * NX_KEYTYPE_REWIND -> MP_KEY_PREV

I just handled these ones as the volume one would be pretty invasive. I could
maybe change it to increase the application's volume instead of system volume
only when mpv is frontmost (iTunes does this), but some users would probably
hate it.
2013-06-03 22:31:14 +02:00
Stefano Pigozzi d67b687530 macosx_events: send all queued events
Seeking feels a little faster or it may be self suggestion. There's really no
reason to just send only one event at a time.
2013-06-03 22:31:13 +02:00
Stefano Pigozzi f0d2120347 osx: cocoa_common: use default wakeup period
Now that Cocoa's input handling is done on a separate thread from the playloop
it is ridicolously simple to have longer asynchronous sleeps when paused.
2013-06-03 22:31:13 +02:00
Stefano Pigozzi f13f0db33a osx: create macosx_events to deal with keyDown events
On OSX with Cocoa enabled keyDown events are now handled with
addLocalMonitorForEventsMatchingMask:handler:. This allows to respond to
events even when there is no VO initialized but the GUI is focused.
2013-06-03 22:31:13 +02:00
Stefano Pigozzi a31422bbfe macosx_application: refactor psn matching code
Objective-C is shorter / more readable than snprintf.
2013-05-30 23:03:20 +02:00
Stefano Pigozzi 8b40494e93 macosx_application: refactor filename escape
Use Objective-C's new literal syntax to make the code simpler.
2013-05-30 23:03:20 +02:00
Stefano Pigozzi 1d11db6596 macosx_application: use @autoreleasepool
I don't even want to know how this worked. It scares me a lot.
2013-05-30 23:01:12 +02:00
Stefano Pigozzi 3396e0565b macosx_application: move escape_loadfile_name in this file
This allows to move back osx_common to raw C.
2013-05-30 23:01:12 +02:00
Stefano Pigozzi 41e6c922a5 macosx_application: fix menu 'ghosting'
This fixes a bug that caused the application to never leave it's frontmost
position.

The idea is stolen from @donmelton who used it in MPlayerShell. Thanks!
2013-05-26 23:46:50 +02:00
wm4 f44a242258 Replace calls to usec_sleep()
This is just dumb sed replacement to mp_sleep_us().

Also remove the now unused usec_sleep() wrapper.
2013-05-26 16:44:20 +02:00
wm4 e56d8a200d Replace all calls to GetTimer()/GetTimerMS()
GetTimer() is generally replaced with mp_time_us(). Both calls return
microseconds, but the latter uses int64_t, us defined to never wrap,
and never returns 0 or negative values.

GetTimerMS() has no direct replacement. Instead the other functions are
used.

For some code, switch to mp_time_sec(), which returns the time as double
float value in seconds. The returned time is offset to program start
time, so there is enough precision left to deliver microsecond
resolution for at least 100 years. Unless it's casted to a float
(or the CPU reduces precision), which is why we still use mp_time_us()
out of paranoia in places where precision is clearly needed.

Always switch to the correct time. The whole point of the new timer
calls is that they don't wrap, and storing microseconds in unsigned int
variables would negate this.

In some cases, remove wrap-around handling for time values.
2013-05-26 16:44:20 +02:00
wm4 561aab2d77 timer: use gettimeofday() on Windows
MinGW-w64 emulates this via GetSystemTimeAsFileTime(), which has
supposedly the best and most stable timer source out of most others.

http://mingw-w64.svn.sourceforge.net/viewvc/mingw-w64/trunk/mingw-w64-crt/misc/gettimeofday.c
2013-05-26 16:44:20 +02:00
wm4 81439c5f35 timer: refactor, add 64 bit timer function
Make OS specific timer code export a mp_raw_time_us() function, and
add generic implementations of GetTimer()/GetTimerMS() using this
function. New mpv code is supposed to call mp_time_us() in situations
where precision is absolutely needed, or mp_time_s() otherwise.

Make it so that mp_time_us() will return a value near program start.
We don't set it to 0 though to avoid confusion with relative vs.
absolute time. Instead, pick an arbitrary offset.

Move the test program in timer-darwin.c to timer.c, and modify it to
work with the generic timer functions.
2013-05-26 16:44:20 +02:00
Stefano Pigozzi 29f5429223 macosx_application: implement "Quit & remember position"
Add a menu item to quit and save the current playback position using the code
added with commit ce9a854.

Fixes #85
2013-05-23 20:07:14 +02:00
wm4 58cc0f637f input: do property expansion for all input command string arguments
Also add a "raw" prefix for commands, which prevents property expansion.
The idea is that if the commands are generated by a program, it doesn't
have to know whether the command expands properties or not.
2013-05-18 17:45:55 +02:00
Stefano Pigozzi 6a83ef1552 macosx_application: fix crash when quitting player
mpv crashed on quit when it was run using the bundle functionality and started
without any files thus waiting for file open events. In that case, since there
is no key_fifo initialized yet, short circuit to `terminate_cocoa_application()`
which is generally called from `exit_player()` during normal lifecycle.

Fixes bug report from user `eng` on IRC.
2013-05-12 20:29:23 +02:00
Stefano Pigozzi 6a14dd593f macosx_application: add menu item for hide operation
Fixes #35
2013-05-12 15:27:54 +02:00
Stefano Pigozzi 134f3e97bf OSX: run native event loop in a separate thread
This commit is a followup on the previous one and uses a solution I like more
since it totally decouples the Cocoa code from mpv's core and tries to emulate
a generic Cocoa application's lifecycle as much as possible without fighting
the framework.

mpv's main is executed in a pthread while the main thread runs the native cocoa
event loop.

All of the thread safety is mainly accomplished with additional logic in
cocoa_common as to not increase complexity on the crossplatform parts of the
code.
2013-05-12 15:27:54 +02:00
Stefano Pigozzi afdc9c4ae2 OSX: use native Cocoa's event loop
Schedule mpv's playloop as a high frequency timer inside the main Cocoa event
loop. This has the benefit to allow accessing menus as well as resizing the
window without the playback being blocked and allows to remove countless hacks
from the code that involved manually pumping the event loop as well simulating
manually some of the Cocoa default behaviours.

A huge improvement consists in removing NSApplicationLoad. This is a C function
defined in the Cocoa header and implements a minimal OSX application under ther
hood so that you can use the Cocoa GUI toolkit from C/C++ without having to
respect the Cocoa standards in terms of application initialization. This was
bad because the behaviour implemented by NSApplicationLoad was hard to customize
and had several gotchas especially in the menu department.

mpv was changed to be just a nib-less application. All the Cocoa part is still
generated in code but the event handling is now not dissimilar to what is
present in a stock Mac application.

As a part of reviewing the initialization process, I also removed all of
`osdep/macosx_finder_args`. The useful parts of the code were moved to
`osdep/macosx_appication` which has the broaded responsibility of managing the
full lifecycle of the Cocoa application. By consequence the
`--enable-macosx-finder` configure switch was killed as well, as this feature
is always enabled.

Another change the users will notice is that when using a bundle the `--quiet`
option will be inserted much earlier in the initializaion process. This results
in mpv not spamming mpv.log anymore with all the initialization outputs.
2013-05-12 15:27:54 +02:00
Rudolf Polzer b1ae33a355 mp_msg: fix status output disappearing when redirecting INPUT.
Instead, we now check stderr's destination against the foreground tty
for deciding whether we want status output or not.
2013-03-18 20:33:29 +01:00
wm4 75e6584ab3 Prefix keycode defines with MP_
Do this to reduce conflicts with <linux/input.h>, which contains some
conflicting defines.

This changes the meaning of MP_KEY_DOWN:

  KEY_DOWN is renamed to MP_KEY_DOWN (cursor down key)
  MP_KEY_DOWN is renamed to MP_KEY_STATE_DOWN (modifier for key down state)
2013-02-12 10:27:00 +01:00
Stefano Pigozzi 68fa3c49db cocoa_events: remove this functionality
This functionality looked smart but created problems with some kinds of
multi touch events. Moreover some events coming from the windows server – like
hovering a corner for window resize – didn't cause the player to wake up
immediately.

The "correct" non hacky way to implement async event polling with cocoa would
be having the vanilla cocoa event loop driving the player and setting up mpv's
terminal FDs as event sources for the cocoa event loop.

Fixes #20
2013-02-02 14:36:05 +01:00
Rudolf Polzer 3b22404e07 mp_msg, getch2: unix tty background support
Now, when backgrounded, mpv plays and outputs messages to stdout, but
statusline is not output.

Background<->foreground transitions are detected by signals and polling
the process groups.
2013-01-23 18:05:34 +01:00
wm4 20c9dfa616 Replace strsep() uses
This function sucks and apparently is not very portable (at least on
mingw, the configure check fails). Also remove the emulation of that
function from osdep/strsep*, and remove the configure check.
2013-01-13 17:32:39 +01:00
wm4 cbdee50f29 windows support: fix _wstat misusage
I have no idea when or how this broke, but _wstati64() is the function
we want anyway (64 bit filesize). Possibly this was a mingw-w64 bug.
It's unknown why "wstat()" just doesn't work in this case, as it's not
defined by MSDN and could be defined by mingw as it needs.
2013-01-13 17:32:39 +01:00
wm4 41dbf07fc5 osdep: remove gettimeofday() emulation
Guaranteed by POSIX, and mingw provides it as well.
2013-01-13 17:32:39 +01:00
wm4 a96788fe57 osdep: remove setenv() emulation
mpv doesn't use setenv() anymore. The configure check was actually
removed earlier; maybe it was forgotten to remove this completely.
2013-01-13 17:31:22 +01:00
wm4 b87b0ef5ec osdep: remove broken vsscanf() emulation
vsscanf() is in POSIX, C99, mingw, etc. Further, the implementation in
osdep/vsscanf.c was completely broken, and if it worked, it worked only
by chance.
2013-01-13 14:27:10 +01:00
wm4 f394a25e7b Update copyright year 2013-01-04 15:23:23 +01:00
Stefano Pigozzi fab9febdc3 path: add mp_find_config_file and reorganize some of the code
Add `mp_find_config_file` to search different known paths and use that in
ass_mp to look for the fontconfig configuration file.

Some incidental changes spawned by this feature where:

 * Buffer allocation for the strings containing the paths is now performed
   with talloc. All of the allocations are done on a NULL context, but it still
   improves readability of the code.
 * Move the OSX function for lookup inside of a bundle: this code path was
   currently not used by the bundle generated with `make osxbundle`. The plan
   is to use it again in a future commit to get a fontconfig config file.
2012-12-15 17:38:00 +01:00
wm4 4873b32c59 Rename directories, move files (step 2 of 2)
Finish renaming directories and moving files. Adjust all include
statements to make the previous commit compile.

The two commits are separate, because git is bad at tracking renames
and content changes at the same time.

Also take this as an opportunity to remove the separation between
"common" and "mplayer" sources in the Makefile. ("common" used to be
shared between mplayer and mencoder.)
2012-11-12 20:08:18 +01:00
wm4 dfcfe05885 build: fix compilation on Windows (manifest files) 2012-10-20 20:03:13 +02:00
wm4 65fc530f0c Rename to "mpv"
This changes the name of this project to mpv. Most user-visible mentions
of "MPlayer" and "mplayer" are changed to "mpv". The binary name and the
default config file location are changed as well.

The new default config file location is: ~/.mpv/

Remove etc/mplayer.desktop. Apparently this was for the MPlayer GUI,
which has been removed from mplayer2 ages ago.

We don't have a logo, and the MS Windows resource files sort-of require
one, so leave etc/mplayer.ico/.xpm as-is.

Remove the debian and rpm packaging scripts. These contained outdated
dependencies and likely were more harmful than useful. (Patches which
add working and well-tested packaging are welcome.)
2012-10-12 10:14:32 +02:00
Kovensky bc63957551 windows support: include io.h when building on Cygwin 2012-09-30 15:16:53 +02:00
Rudolf Polzer a70adbfe65 getch2: request at least 1 byte of input each read
fixes issue with | less, where mplayer broke less's terminal
expectations and made less quit

Note this means that read() will be blocking again. Should be ok, as we
always check via select() before reading.
2012-09-19 14:57:35 +02:00
wm4 c5e2120e15 timer: remove timer_name
This was unreferenced and useless.
2012-09-07 16:06:36 +02:00
Stefano Pigozzi c15270d3b9 macosx_finder_args: fix file open order
When files are double clicked or drag and dropped to the mplayer2 icon they
can be in random order. This commit forces alphabetical order.

Opening them with command + down arrow already worked correctly.
2012-08-16 22:35:27 +02:00
Stefano Pigozzi 39e28570f1 macosx_finder_args: make work with recent changes 2012-08-16 22:32:26 +02:00
mplayer-svn bbc9fccd46 cache2: allow cache sizes up to 4 TB
Remove variable that is only assigned but never used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34791 b3059339-0415-0410-9bf9-f77b7e298cf2

Allow using a cache size of up to 4 TB.
Obviously anything close to 4 GB will always fail
on 32 bit systems.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34792 b3059339-0415-0410-9bf9-f77b7e298cf2

Replace off_t by int64_t in cache code.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34793 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove casts that are no longer necessary.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34794 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix header file after r34793.

Patch by Stephen Sheldon, sfsheldo gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34802 b3059339-0415-0410-9bf9-f77b7e298cf2

Put #include <inttypes.h> into the header file where it should be.

Reported by Stephen Sheldon, sfsheldo gmail com.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34798 b3059339-0415-0410-9bf9-f77b7e298cf2

Correct r34798.

The header only needs stdint.h while the C file needs inttypes.h.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34799 b3059339-0415-0410-9bf9-f77b7e298cf2

Author: reimar
2012-08-03 01:52:40 +02:00
mplayer-svn 1764bfacca osdep:/glob-win.c: reformat
Use uncrustify on glob-win.c to fix the indentation mess in it.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@34239 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
2012-08-03 01:31:32 +02:00
wm4 b0e695cf79 Remove leftover BeOS support stuff
As by mplayer-svn commit 33972. Their BeOS removal was more thorough.
2012-08-03 01:20:51 +02:00
wm4 89a17bcda6 mplayer: turn playtree into a list, and change per-file option handling
Summary:
- There is no playtree anymore. It's reduced to a simple list.
- Options are now always global. You can still have per-file options,
  but these are optional and require special syntax.
- The slave command pt_step has been removed, and playlist_next
  and playlist_prev added. (See etc/input.conf changes.)
  This is a user visible incompatible change, and will break slave-mode
  applications.
- The pt_clear slave command is renamed to playlist_clear.
- Playtree entries could have multiple files. This is not the case
  anymore, and playlist entries have always exactly one entry. Whenever
  something adds more than one file (like ASX playlists or dvd:// or
  dvdnav:// on the command line), all files are added as separate
  playlist entries.

Note that some of the changes are quite deep and violent. Expect
regressions.

The playlist parsing code in particular is of low quality. I didn't try
to improve it, and merely spent to least effort necessary to keep it
somehow working. (Especially ASX playlist handling.)

The playtree code was complicated and bloated. It was also barely used.
Most users don't even know that mplayer manages the playlist as tree,
or how to use it. The most obscure features was probably specifying a
tree on command line (with '{' and '}' to create/close tree nodes). It
filled the player code with complexity and confused users with weird
slave commands like pt_up.

Replace the playtree with a simple flat playlist. Playlist parsers that
actually return trees are changed to append all files to the playlist
pre-order.

It used to be the responsibility of the playtree code to change per-file
config options. Now this is done by the player core, and the playlist
code is free of such details.

Options are not per-file by default anymore. This was a very obscure and
complicated feature that confused even experienced users. Consider the
following command line:

    mplayer file1.mkv file2.mkv --no-audio file3.mkv

This will disable the audio for file2.mkv only, because options are
per-file by default. To make the option affect all files, you're
supposed to put it before the first file.

This is bad, because normally you don't need per-file options. They are
very rarely needed, and the only reasonable use cases I can imagine are
use of the encode backend (mplayer encode branch), or for debugging. The
normal use case is made harder, and the feature is perceived as bug.
Even worse, correct usage is hard to explain for users.

Make all options global by default. The position of an option isn't
significant anymore (except for options that compensate each other,
consider --shuffle --no-shuffle).

One other important change is that no options are reset anymore if a
new file is started. If you change settings with slave mode commands,
they will not be changed by playing a new file. (Exceptions include
settings that are too file specific, like audio/subtitle stream
selection.)

There is still some need for per-file options. Debugging and encoding
are use cases that profit from per-file options. Per-file profiles (as
well as per-protocol and per-VO/AO options) need the implementation
related mechanisms to backup and restore options when the playback file
changes.

Simplify the save-slot stuff, which is possible because there is no
hierarchical play tree anymore. Now there's a simple backup field.

Add a way to specify per-file options on command line. Example:

    mplayer f1.mkv -o0 --{ -o1 f2.mkv -o2 f3.mkv --} f4.mkv -o3

will have the following options per file set:

    f1.mkv, f4.mkv: -o0 -o3
    f2.mkv, f3.mkv: -o0 -o3 -o1 -o2

The options --{ and --} start and end per-file options. All files inside
the { } will be affected by the options equally (similar to how global
options and multiple files are handled). When playback of a file starts,
the per-file options are set according to the command line. When
playback ends, the per-file options are restored to the values when
playback started.
2012-07-31 21:33:26 +02:00
wm4 6e020e66e0 mp_msg: remove filename_recode
This was intended for translating filenames from filesystem charset to
the terminal charset. Modern sane platforms use UTF-8 for everything,
and on Windows we use unicode APIs, so this is not needed anymore.

Remove filename_recode, all uses of it, options and configure checks
related to terminal output charset, and code that tries to determine
the same.
2012-07-31 01:35:53 +02:00
wm4 97ac824124 Merge remote-tracking branch 'origin/master'
Conflicts:
	bstr.c
	bstr.h
	libvo/cocoa_common.m
	libvo/gl_common.c
	libvo/video_out.c
	mplayer.c
	screenshot.c
	sub/subassconvert.c

Merge of cocoa_common.m done by pigoz.

Picking my version of screenshot.c. The fix in commit aadf1002f8 will
be redone in a follow-up commit, as the original commit causes too many
conflicts with the work done locally in this branch, and other work in
progress.
2012-04-29 10:01:28 +02:00
Stefano Pigozzi 86790494d3 OSX, input: implement wakeup in response to Cocoa events
Add code to wake up the select() call in input.c when an OSX event is
available and a Cocoa OpenGL backend is initialized.

Fixes the slow response to input or other events in Cocoa-based VOs
during long select() sleeps (e.g., when mplayer2 is paused) introduced
by commit 7040968.
2012-04-26 21:03:10 +03:00
wm4 3bb456b14d win32: simplify icon loading
I have no idea why the code used this roundabout method.
Also detab mplayer.rc.
2012-04-14 17:03:11 +02:00
wm4 47371bdb94 Merge remote-tracking branch 'origin/master'
Conflicts:
	libvo/vo_kva.c
2012-04-13 17:45:27 +02:00
wm4 a659429f86 win32: use more unicode functions
Use the *W variants instead of the implicit *A functions. (One could
define the UNICODE macro to switch the functions without suffix from
A to W, but I'm too lazy to figure out how portable that is, etc.)

Also make sure io.h defines a unicode aware printf().
2012-04-06 23:56:30 +02:00
Uoti Urpala e2fc1f640f build: remove OS/2 support 2012-04-06 17:45:56 +03:00
Uoti Urpala b93ed27836 input: stop trying to read terminal input on EOF
Stop trying to read terminal input if a read attempt returns EOF. The
most important case where this matters is when someone runs the player
with stdin redirected from /dev/null and without specifying
--no-consolecontrols. This used to cause 100% CPU load while paused,
as select() would continuously trigger on stdin (the need for
--no-consolecontrols was not apparent to people with older mplayer
versions, as input reading was less efficient and latencies like
hardcoded sleeps kept CPU use well below 100%). Now this will only
cause a "Dead key input" error message.
2012-04-06 14:34:56 +03:00
wm4 1aa2e36122 Merge remote-tracking branch 'origin/master'
Conflicts:
	bstr.c
	bstr.h
	etc/input.conf
	input/input.c
	input/input.h
	libao2/ao_pulse.c
	libmpcodecs/vf_ass.c
	libmpcodecs/vf_vo.c
	libvo/gl_common.c
	libvo/x11_common.c
	mixer.c
	mixer.h
	mplayer.c
2012-04-01 22:52:33 +02:00
Stefano Pigozzi ae0a38ddf8 macosx_finder_args: use a custom logfile instead of system.log
Change the macosx_finder_args function so that when mplayer2 is
invoked from the Finder in a Mac application bundle, it redirects the
output to ~/Library/Logs/mplayer2.log instead of cluttering the global
system.log.

This doesn't affect terminal use which keeps writing to stdout and
stderr.
2012-03-25 22:30:37 +03:00
Stefano Pigozzi 24e08eb5f2 macosx_finder_args: use cocoa instead of carbon
macosx_finder_args was using Carbon and wasn't usable any longer on
modern versions of MacOSX. This is very useful to embed mplayer in a
mac application bundle.

When using application bundles, the operating system will call the
main function with only one argument that identifies the process
serial number (this is some additional process identifier in osx other
than the pid). File open events are then dispatched to the application
through events that must be handled accordingly.
2012-03-25 22:30:37 +03:00
wm4 7ea5c4c26c input: handle UTF-8 terminal input
This assumes the terminal uses UTF-8. If invalid UTF-8 is encountered (for
example because the terminal uses a legacy encoding), the code falls back
to the old method and feeds each byte as key code to the input code.

In theory, UTF-8 input could randomly fail, because the code in getch2.c
doesn't try to fill the input buffer correctly with input sequences
longer than a byte. This is a problem with the design of the existing
code.
2012-03-25 22:30:37 +03:00
wm4 166a7de4cf input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point
(which is 0x10FFFF). All key codes below MP_KEY_BASE now directly map
to unicode (KEY_ENTER is 13, carriage return). Configuration files
(input.conf) can contain unicode characters in UTF-8 to map non-ASCII
characters/keys.

This shouldn't change anything user visible, except that "direct key
codes" (as used in input.conf) will change their meaning.

Parts of the bstr functions taken from libavutil's GET_UTF8 and
slightly modified.
2012-03-25 22:30:37 +03:00
wm4 6de8120822 Merge remote-tracking branch 'origin/master' into my_master
Conflicts:
	command.c
	mp_core.h
	mplayer.c
	screenshot.c
2012-03-16 19:14:44 +01:00
Martin Herkt f891939b4d windows: terminal: unicode, --msgcolor, size change
Make mp_msg() support unicode output, --msgcolor and variable screen
sizes.

Patch reintegrated by wm4.
2012-03-09 20:48:54 +02:00
wm4 a1244111a7 windows support: unicode filenames
Windows uses a legacy codepage for char* / runtime functions accepting
char *. Using UTF-8 as the codepage with setlocale() is explicitly
forbidden.

Work this around by overriding the MSVCRT functions with wrapper
macros, that assume UTF-8 and use "proper" API calls like _wopen etc.
to deal with unicode filenames. All code that uses standard functions
that take or return filenames must now include osdep/io.h. stat()
can't be overridden, because MinGW-w64 itself defines "stat" as a
macro. Change code to use use mp_stat() instead.

This is not perfectly clean, but still somewhat sane, and much better
than littering the rest of the mplayer code with MinGW specific hacks.
It's also a bit fragile, but that's actually little different from the
previous situation. Also, MinGW is unlikely to ever include a nice way
of dealing with this.
2012-03-09 20:48:54 +02:00
wm4 24be34f1e9 cleanup: Silence compilation warnings on MinGW-w64
Some of the code, especially the dshow and windows codec loader parts,
are extremely hacky and likely full of bugs. The goal is merely getting
rid of warnings that could obscure more important warnings and actual
bugs, instead of fixing actual problems. This reduces the number of
warnings from over 500 to almost the same as when compiling on Linux.

Note that many problems stem from using the ancient wine-derived
windows headers. There are some differences to the "proper" windows
header. Changing the code to compile with the proper headers would be
too much trouble, and it still has to work on Unix.

Some of the changes might actually break compilation on legacy MinGW,
but we don't support that anymore. Always use MinGW-w64, even when
compiling to 32 bit.

Fixes some warnings in the win32 loader code on Linux too.
2012-03-01 00:22:30 +02:00
wm4 c8efb6d566 input: restore terminal attributes after resume
Install a signal handler on SIGCONT, and restore the terminal
attributes with tcsetattr() if it happens. This is needed with some
shells (such as tcsh) that don't restore the terminal attributes set
by mplayer. Without this, terminal I/O doesn't work as intended after
resume with these shells.

Fixes #155.
2012-02-25 16:40:14 +01:00
wm4 9371753dc4 Merge remote-tracking branch 'origin/master' into my_master 2012-02-19 17:34:28 +01:00
wm4 3b68a774b9 input: fix "enter" on console
The commit "input: handle UTF-8 terminal input" accidentally messed up
the handling of certain special keys. Apparently only KEY_ENTER was
affected by this, because the code was valid UTF-8, but didn't directly
map to the keycode.
2012-02-19 16:51:52 +01:00
Uoti Urpala 637d6b7c8e Update copyright year 2012-01-28 13:49:13 +02:00
wm4 e722967580 input: handle UTF-8 terminal input
This assumes the terminal uses UTF-8. If invalid UTF-8 is encountered (for
example because the terminal uses a legacy encoding), the code falls back
to the old method and feeds each byte as key code to the input code.

In theory, UTF-8 input could randomly fail, because the code in getch2.c
doesn't try to fill the input buffer correctly with input sequences
longer than a byte. This is a problem with the design of the existing
code.
2012-01-18 04:13:27 +01:00
wm4 a63e880400 input: allow unicode keys and reassign internal key codes
This moves all key codes above the highest valid unicode code point (which
is 0x10FFFF). All key codes below MP_KEY_BASE now directly map to unicode.
Configuration files (input.conf) can contain unicode characters in UTF-8
to map non-ASCII characters/keys.

This shouldn't change anything user visible, except that "direct key codes"
(as used in input.conf) will change their meaning.
2012-01-18 04:11:48 +01:00
Uoti Urpala 318559056f getch2.c: fix negative keycodes returned for non-ascii
getch2.c read data into a "char" array, and returned values other than
escape sequences directly from there. This meant that it could return
negative values (except on platforms where "char" is unsigned) if the
input contained bytes >= 128. This would break later parsing in
input.c as the values would be interpreted as having the MP_KEY_DOWN
flag set, which would make the key binding code think a key is held
down (and never released). Fix by changing the buffer type to unsigned
char.

The bug itself was very old, but started triggering visible breakage
more easily after commit 82b8f89bae ("input: rework event reading and
command queuing"). Before that the key values would be passed through
the input.c "key read function" interface, which (mis)interpreted the
negative values as errors from the function, and in most cases
discarded them without much visible effect.
2011-10-03 04:12:15 +03:00
Martin Herkt 47f5d53d85 osdep/mplayer.rc: change to use "mplayer2" name 2011-08-21 02:18:00 +03:00
Uoti Urpala b33bb28ea3 build: fix --enable-debug, remove some "#ifdef MP_DEBUG"
Recent commit 5d5ca22a6d ("options: commandline: accept --foo=xyz
style options") left some bad code under "#ifdef MP_DEBUG" in
playtree.c, which caused a compilation failure if configured with
"--enable-debug". Fix this. Having the "#ifdef MP_DEBUG" there was
completely unnecessary; it only increased the risk for this kind of
problems for no real benefit - executing the asserts under it would
have no noticeable performance or other penalty in default builds
either. Remove several cases of such harmful "#ifdef MP_DEBUG".
2011-07-30 19:03:20 +03:00
Uoti Urpala e873d703e9 options: change option parsing to use bstr
Using bstr allows simpler parsing code, especially because it avoids
the need to modify or copy strings just to terminate extracted
substrings.
2011-07-29 05:50:38 +03:00
Uoti Urpala 507fa7e2c2 options: indicate ambiguous option parameters explicitly
Command line options like "-foo xyz" are ambiguous: "xyz" may be a
parameter to the option "foo" or an unrelated argument. Instead of
relying on the struct m_config mode field (commandline/file) pass
parameters to specify ambiguous mode explicitly. Meant for "--foo"
options which are never ambiguous on command line either.
2011-07-29 05:02:05 +03:00
Uoti Urpala c3e46833c2 input: don't make fd 0 nonblocking
Setting O_NONBLOCK on a file descriptor also affects all other fds
that share the same underlying open file description, and in case of
stdin such sharing is likely. Making stdin nonblocking can also make
stdout nonblocking (they may be the same connection to a terminal),
and it can also affect other processes (in "program1 | program2", the
shell may give the same terminal connection to program1 as stdin and
to program2 as stdout, thus program1 making its stdin nonblocking also
turns program2's stdout nonblocking).

To avoid these problems stop making fd 0 nonblocking. After the
previous commit this should no longer cause problems as long as
select() does not spuriously report the fd as readable.
2011-07-17 17:05:08 +03:00
Uoti Urpala 618f760866 input: make slave command file descriptors nonblocking
Neither fd 0 slave input (-slave) nor additional opened fds (-input
file=X) were set to nonblocking mode as they should have been. Fix.
Also rename the horribly generic USE_SELECT #define used for a
specific slave input detail.
2011-05-04 18:53:17 +03:00
Uoti Urpala 23cb829072 input: move all key code lists to input/keycodes.h
Move the definitions of all special key codes (those not passed by
ASCII value) to input/keycodes.h. Before they were spread between
osdep/keycodes.h, input/joystick.h, input/mouse.h and input/ar.h, plus
some special values in input.h. This was especially inconvenient as
the codes had to be coordinated to not conflict between the files.

The change requires a bit of ugliness as appleir.c includes
<linux/input.h> which contains various conflicting KEY_* definitions.
Work around this by adding a special preprocessor variable which can
be used to avoid defining these in keycodes.h.
2011-05-02 00:43:31 +03:00
Uoti Urpala 40234b1a3c input: make stdin non-blocking for terminal input
getch2.c did not make stdin non-blocking, and relied on only being
called after select() had shown readability. Stop relying on that
assumption and set stdin to non-blocking mode. Hopefully no relevant
platform has problems with this...
2011-04-28 12:52:00 +03:00
Uoti Urpala 5e0a163886 tl_matroska.c: move the find_files() function here
Move the find_files() function from findfiles.c to tl_matroska.c.
Delete the findfiles.c file. Add a check against opendir() failure in
find_files().
2011-03-03 21:38:52 +02:00
Uoti Urpala 962eec0440 bstr.[ch], path.[ch]: add string and path handling functions
Add some new string and path handling functions to be used in
following commits.

Use new path handling functions to simplify find_files().
2011-02-26 16:40:31 +02:00
diego 359e85c234 osdep: tweak some #includes
Add/remove a few standard header #includes in osdep files.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32762 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-31 16:03:10 +02:00
reimar c46bd9a252 build: cygwin: don't rely on _WIN32 being defined
configure: Compilation fixes for current Cygwin

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32724 b3059339-0415-0410-9bf9-f77b7e298cf2

Do not #define _WIN32 on the command line for Cygwin.

Newer Cygwin versions no longer do this and hopefully we should be able
to survive without this hack as well.  This change necessitates adapting
two #ifdefs in the MPlayer codebase.  It is committed untested as I do
not have access to a Cygwin system.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32763 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-01-29 04:04:53 +02:00
Uoti Urpala 0afb326035 Merge branch 'hr-seek'
* hr-seek:
  input: add default keybindings Shift+[arrow] for small exact seeks
  input: support bindings with modifier keys for X input
  core: audio: make ogg missing audio timing workaround more complex
  core: add support for precise non-keyframe-limited seeks
  core: add struct for queued seek info
  commands: add generic option -> property wrapper
  options: add "choice" option type, use for -pts-association-mode
  core: remove looping in update_video(), modify command handling a bit
  core: seek: use accurate seek mode with audio-only files
  core: avoid using sh_video->pts as "current pts"
  libvo: register X11 connection fd in input event system
  core: timing: add special handling of long frame intervals
  core: move central play loop to a separate function

Conflicts:
	DOCS/tech/slave.txt
2010-12-20 19:17:43 +02:00
Uoti Urpala 67fd58d6f0 input: support bindings with modifier keys for X input
Add support for binding commands to modifier+key combinations like
"Shift+Left" or "Ctrl+Alt+x", and support reading such combinations
from the output window of X VOs.

The recognized modifier names are Shift, Ctrl, Alt and Meta. Any
combination of those and then a non-modifier key name, separated by
'+', is accepted as a key name in input.conf. For non-special keys
that produce characters shift is ignored as a modifier. For example
"A" is handled as a key without modifiers even if you use shift to
write the capital letter; 'a' vs 'A' already distinguishes the
combinations with a normal keymap, and having separate 'a', 'Shift+A'
and 'A' (written with caps lock for example) would bring more
confusion than benefit.

Currently reading the modifier+key combinations is only supported in
the output window of those VOs that use x11_common.c event
handling. It's not possible to input the key combinations in other VOs
or in a terminal window.
2010-12-20 19:02:24 +02:00
Uoti Urpala 2bc2399797 vd_ffmpeg: set thread count to number of cores on machine by default
Make "-lavdopts threads=0" mean an autodetected number of threads, and
make that the default value of the option. Also increase the upper
limit of the option from 8 to 16. Add new file osdep/numcores.c which
tries to determine the number of cores available on the machine.

numcores.c is based (heavily modified) on public domain numcpus.c by
Philip Willoughby <pgw99@doc.ic.ac.uk>, downloaded from
http://csgsoft.doc.ic.ac.uk/numcpus/
2010-12-20 05:53:28 +02:00
cboesch fe3c4810e1 cleanup: remove NULL checks before free() all over the code
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32624 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-14 13:11:20 +02:00
diego 956d11235c osdep/macosx_finder_args.h: include required header m_config.h
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32166 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:46 +02:00
reimar c625cec1f8 osdep: Fix gettimeofday type to match the real one
Avoids issues if the system headers have a declaration for
gettimeofday but there's just no implementation there.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31733 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 95751ea3e4 Windows support: add a manifest file
Add a manifest file to disable file and registry "virtualization" on
Windows.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31630 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:20 +02:00
Uoti Urpala 00323c06e2 Delete things related to old translation system
Remove the help/ subdirectory, configure code to create toplevel
help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
2010-03-10 03:47:14 +02:00
Uoti Urpala 240550bbb9 Merge svn changes up to r30848 2010-03-10 03:00:14 +02:00
Uoti Urpala bc1d0ca37d Merge svn changes up to r30798 2010-03-10 02:35:02 +02:00
Uoti Urpala e74708f619 Merge svn changes up to r30748 2010-03-10 01:50:55 +02:00
Uoti Urpala acdce0176a Merge svn changes up to r30732 2010-03-10 01:25:15 +02:00
komh 66278a55ec 1. Move the macros for priority classes for OS/2 from priority.c to osdep.h
2. Define SetPriorityClass() and GetCurrentProcess() in osdep.h
3. Include osdep.h in priority.c

This removes OS2-platform check in priority.c



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30828 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-03-04 12:55:30 +00:00
komh 35fbd55c0f Add cddb:// support for OS/2
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30788 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 03:26:18 +00:00
reimar 6961b9ef70 Add support for reading key events from MinGW xterm.
Unfortunately keys only arrive after enter was pressed
and SetNamedPipeHandleState does not seem to help.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30784 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-28 00:24:01 +00:00
reimar 490a015043 Make -slave also work with the normal console on Windows.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30780 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 23:12:34 +00:00
reimar 5f25eaf3d2 Do not misuse the stdin name.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30777 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 21:50:59 +00:00
reimar 27306a18db Include getch2.h to get rid of some warnings.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30776 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-27 21:47:45 +00:00
diego b63759b175 Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer,
so there is no need for casts.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-26 15:01:37 +00:00
diego 5405958e34 Add header for macosx_finder_args() instead of forward declaring it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30717 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-23 07:54:10 +00:00
diego 38648cae06 Mark sleep_accurate() as static, it is only used within the file.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30715 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 21:53:06 +00:00
diego 6676504bbe Conditionally declare mp_input_slave_cmd_func().
It does only get compiled on MinGW and OS/2.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30711 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 15:35:53 +00:00
diego 7262f6c9b4 Properly declare get_term_charset() instead of forward declaring it.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30710 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-22 15:34:56 +00:00
diego 8ba6b4eaf9 cosmetics: Remove pointless empty lines at EOF.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30675 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-20 21:02:49 +00:00
diego 465f535c51 #include corresponding .h files in .c files.
This ensures that function declarations in both files always match.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30596 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-16 15:03:03 +00:00
Uoti Urpala 4ebf007580 Merge svn changes up to r30375 2010-01-25 15:36:38 +02:00
reimar 1a5841fbbb Add a proper header for our strsep implementation so strsep will
not be used without a declaration, causing issues on 64 bit systems.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30355 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-17 15:08:31 +00:00
Uoti Urpala 819b8f08a2 Merge svn changes up to r30236 2010-01-08 02:44:37 +02:00
zuxy 0d3adaac4b Happy new year!
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30235 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-07 11:12:58 +00:00
Uoti Urpala a2037a2eff Merge svn changes up to r29412 2009-07-07 02:56:01 +03:00
Uoti Urpala 0eb321bf2c Remove trailing whitespace from most files 2009-07-07 02:34:35 +03:00
Amar Takhar e306174952 Translation system changes part 2: replace macros by strings
Replace all MSGTR_ macros in the source by the corresponding English
string.
2009-07-07 01:38:20 +03:00
Amar Takhar b5972d6f14 Translation system changes part 1: wrap translated strings
Replace mp_msg() calls which have a translated string as the format
argument with mp_tmsg and add _() around all other translated strings.
2009-07-07 01:28:07 +03:00
reimar 71fefd86ac Use a malloced string for the get_term_charset return value.
This is necessary at least on POSIX systems since the buffer returned by
nl_langinfo may change its contents with e.g. each setlocale call.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29332 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-31 13:00:51 +00:00
diego 6e9cbdc104 whitespace cosmetics: Remove all trailing whitespace.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-13 02:58:57 +00:00
Uoti Urpala 1db1773ec2 Merge svn changes up to r29277 2009-05-08 23:50:26 +03:00
diego d9ded9284c Add missing 'void' to parameterless function declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29254 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-04 17:35:26 +00:00
diego fc4f741709 cosmetics: reindent
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29198 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-04-19 22:27:02 +00:00