summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpegplayer.c (follow)
Commit message (Collapse)AuthorAge
* Missed a couple. Hopefully fix all warnings.Michael Sevakis2007-04-21
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13234 a1c6a512-1295-4272-9138-f99709370657
* General housekeeping: Make plugin buffer functions take size_t * instead of ↵Michael Sevakis2007-04-21
| | | | | | int * to match the parameter type of the buffer functions called in the core. Get rid of unsafe int * <==> size_t * casting. Use ssize_t where int was used and size_t where unsigned int was used in the buffer calls to not alter signedness in the plugins. No API version change since it should only be an issue for 64-bit sim builds. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13233 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Fix jumping past the frame waiting if Limit FPS is on but Skip ↵Michael Sevakis2007-04-21
| | | | | | Frames is not. Fixes FS#7055 though this was just a general mistake and not limited to the sim. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13227 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Better frame dropping code adapted to the using correct ↵Michael Sevakis2007-04-18
| | | | | | timestamps change. Even smoother frames. Higher FPS and smoother when having to drop than before (Around 15fps regulated for Elephants Dream on x5 which is a dismal situation, up from around 12 or so). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13205 a1c6a512-1295-4272-9138-f99709370657
* Oops. Have to do dropping based on future frame type but based upon the ↵Michael Sevakis2007-04-16
| | | | | | current one's lateness otherwise nice screen garbage can result from dropping/drawing the wrong ones. A small amount of refinement will be needed here later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13176 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Better sync, smoother frames - corrected a few minor flaws. Keep ↵Michael Sevakis2007-04-16
| | | | | | timestamps 32-bit in stead of 33 - a 45kHz clock is good enough for humans. Increase pts queue size since the mpeg buffer is now filled when buffering the audio stream. Cleanup frame drop code a little too. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13175 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Get it in better shape for dual core targets. Utilize the newly ↵Michael Sevakis2007-04-14
| | | | | | added cache stuff. Add a mutex to core shared buffer variables. I'd prefer to have a true spinlock there but this will do for the moment and protect the data. Nonetheless I can't seem to crash it on an e200 any longer and the display garbage is gone. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13153 a1c6a512-1295-4272-9138-f99709370657
* Moved archos backlight code to target tree. Changed old mutlivalue ↵Jens Arnold2007-04-12
| | | | | | CONFIG_BACKLIGHT to a simple HAVE_BACKLIGHT. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13136 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Recover from audio stream errors better. Correct some sizes. Add ↵Michael Sevakis2007-04-12
| | | | | | some needed extra guard buffer. Add in an important additional wrap check. Stream demuxer needs work on when it looks ahead in the stream and it should wrap though. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13123 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: oops, added an IRAM init/buffer get order switch that should ↵Michael Sevakis2007-04-12
| | | | | | have been reversed before committing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13120 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: do some reordering, add some needed volatiles, make sure thread ↵Michael Sevakis2007-04-12
| | | | | | creation failure is handled correctly, make sure audio doesn't attempt to finish remaining data if it was asked to stop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13118 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Hopefully help some problems on dual core. Make USB mode exit ↵Michael Sevakis2007-04-11
| | | | | | correctly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13109 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: do a little post commit cleanup.Michael Sevakis2007-04-10
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13095 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer: Get A-V synchronized. Improve frame sync and dropping logic and ↵Michael Sevakis2007-04-10
| | | | | | take advantage of decoder's ability to assist. Straighten out some threading problems. Clean it up a bit. Added some plugin API functions and decided it was a good time to do a good sorting on them so your next update from this build should be a full replacement. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13094 a1c6a512-1295-4272-9138-f99709370657
* just pass the struct to vo_setup instead of multiple argumentsMarcoen Hirschberg2007-04-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13022 a1c6a512-1295-4272-9138-f99709370657
* add support for non 16x16 frame sizesMarcoen Hirschberg2007-04-04
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13016 a1c6a512-1295-4272-9138-f99709370657
* Change file reads from 128KB to 32KB chunks - this prevents audio dropouts ↵Dave Chapman2007-03-31
| | | | | | on targets with slow disk access (Sansa). Also change FPS display line to include the current a/v delay. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12978 a1c6a512-1295-4272-9138-f99709370657
* Another AV sync bugfix - the initial avdelay was being incorrectly ↵Dave Chapman2007-03-30
| | | | | | calculated in some cases git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12975 a1c6a512-1295-4272-9138-f99709370657
* Be less aggressive when dropping frames - mpegplayer was dropping any frame ↵Dave Chapman2007-03-30
| | | | | | which was decoded more than 1/20th of a second late, change that to 3/20th second (150ms), giving noticably smoother video. Also process PTS values when dealing with MPEG-1 program streams git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12967 a1c6a512-1295-4272-9138-f99709370657
* Use the left and right buttons for changing volume in mpegplayer on the ↵Tom Ross2007-03-28
| | | | | | gigabeatsince the screen is rotated. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12953 a1c6a512-1295-4272-9138-f99709370657
* Those pesky 64-bit simulator builds..Dave Chapman2007-03-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12931 a1c6a512-1295-4272-9138-f99709370657
* Improved (I hope) A/V sync. mpegplayer now takes account of the difference ↵Dave Chapman2007-03-26
| | | | | | in the initial audio and video PTS values, and constantly adjusts the av delay to compensate for drift between the audio PTS and the actual duration of the played audio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12930 a1c6a512-1295-4272-9138-f99709370657
* mpegplayer for grayscale targets. Note that performance is slow...Dave Chapman2007-03-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12913 a1c6a512-1295-4272-9138-f99709370657
* Initial attempt at rebufferingDave Chapman2007-03-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12911 a1c6a512-1295-4272-9138-f99709370657
* Clamp output when converting from libmad's s3.28 format to 16-bit integers.Dave Chapman2007-03-22
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12894 a1c6a512-1295-4272-9138-f99709370657
* Some small mpegplayer improvements/bug-fixes, and improved A/V sync. Audio ↵Dave Chapman2007-03-22
| | | | | | is used as the master clock and video is synced to the number of samples played. This doesn't take account of any PTS difference at the start of the stream. Also enable Limit FPS and Skip Frames by default - these options need to be enabled for A/V sync to work. Adds pcm_get_bytes_waiting() to the plugin API git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12884 a1c6a512-1295-4272-9138-f99709370657
* Volume control for mpegplayer - based on FS #6814 by Jacob Gardner and ↵Dave Chapman2007-03-18
| | | | | | Pascal Briehl, modified by me (blame me for any problems). Mapped to the same buttons that are used to control volume in the WPS. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12834 a1c6a512-1295-4272-9138-f99709370657
* Fix simulator builds, and some debugf() format strings.Jens Arnold2007-03-17
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12817 a1c6a512-1295-4272-9138-f99709370657
* Rename some macros to account for the recently added M5 port. No code changes.Jens Arnold2007-03-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12809 a1c6a512-1295-4272-9138-f99709370657
* Get rid of the 'center' parameter for splashes. There were only 2 of almost ↵Jens Arnold2007-03-16
| | | | | | 500 splashes which were not centered. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12807 a1c6a512-1295-4272-9138-f99709370657
* Dual core support for PP502x players (iPod G4 and later, iriver h10, Sansa - ↵Daniel Ankers2007-03-04
| | | | | | iPod G3 will be coming soon.) This allows threads to be run on either core provided that all communications between the cores is done using uncached memory. There should be no significant change in battery life from doing this. Documentation (on the RockboxKernel wiki page) will follow shortly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12601 a1c6a512-1295-4272-9138-f99709370657
* Fix CONFIG_BACKLIGHT warnings.Jens Arnold2007-02-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12393 a1c6a512-1295-4272-9138-f99709370657
* Fix audio for Coldfire targets - the EMAC was being initialised in the main ↵Dave Chapman2007-01-02
| | | | | | thread, not the audio thread. Also fix some comments and kill the video thread if the audio thread can not be created. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11883 a1c6a512-1295-4272-9138-f99709370657
* Initial implementation of audio support (44.1KHz only, mp2 or mp3, ↵Dave Chapman2007-01-01
| | | | | | mono/stereo, any bitrate) and .mpg file (MPEG program stream) parsing for mpegplayer - .m2v files are no longer supported. .mpg parser based on patch #6366 from Mathieu Favreaux. Currently limited to only playing files smaller than the available buffer RAM (it will play longer files, but never refills the buffer when it runs empty). There is also no a/v sync implemented, and still no seeking support. Coldfire (iriver H3x0 and iaudio X5) users can use the optimisations provided in patch #5995 to increase the framerate, and PortalPlayer (ipods and iriver H10) users will want to use kernel_on_cop_6.diff from FS#5755 which enables mpegplayer to run the video thread on the second CPU core - video on the second core with audio on the first core runs at the same speed as the old mpegplayer did with no audio. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11877 a1c6a512-1295-4272-9138-f99709370657
* FS#6357, patch 1: let iramcopy and bss share the same space in codecs andTomasz Malesinski2006-11-26
| | | | | | | | | | plugins. Currently, in case of plugins using IRAM bss is cleared twice, once in the loader, once in PLUGIN_IRAM_INIT. For codecs, bss is cleared only during codec initialization. Also, removed double variables in codecs storing a pointer to codec_api. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11606 a1c6a512-1295-4272-9138-f99709370657
* SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines ↵Michael Sevakis2006-11-18
| | | | | | two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657
* one more for the backdrop stuffKarl Kurbjun2006-11-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11527 a1c6a512-1295-4272-9138-f99709370657
* Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the ↵Barry Wardell2006-10-26
| | | | | | nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11351 a1c6a512-1295-4272-9138-f99709370657
* Move FPS display out of video_out_rockbox.c and into mpegplayer.c. Also add ↵Dave Chapman2006-08-20
| | | | | | frame-rate limiting and frame-skipping (skipping display only, not decoding) to try and achieve real-time playback. Frame-rate limiting and frame skipping (and FPS display) are enabled via options in a new menu and are currently all off by default. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10669 a1c6a512-1295-4272-9138-f99709370657
* Clean up the video output code - remove the final traces of libvo (used by ↵Dave Chapman2006-08-17
| | | | | | mpeg2dec) and remove unused code-paths from the main decoding loop. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10638 a1c6a512-1295-4272-9138-f99709370657
* Allow exiting of plugin whilst pausedDave Chapman2006-08-16
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10621 a1c6a512-1295-4272-9138-f99709370657
* Patch #5731 by Barry Wardell: more iriver h10 work. Thanks!Hristo Kovachev2006-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10521 a1c6a512-1295-4272-9138-f99709370657
* fix button mappings for the gigabeatMarcoen Hirschberg2006-08-09
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10502 a1c6a512-1295-4272-9138-f99709370657
* Add STOP and PAUSE features (mapped to OFF/ON on iriver H300, MENU/PLAY on ↵Dave Chapman2006-08-09
| | | | | | ipods and POWER/PLAY on X5) - patch by Jonathan Gordon. Also adapt the buffering to different available memory sizes - we allow libmpeg2 itself 2MB for buffers, and the rest is used to buffer the compressed video data. Note that using PAUSE will break the FPS display - this will be fixed later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10497 a1c6a512-1295-4272-9138-f99709370657
* Initial commit of work-in-progress MPEG video player plugin based on ↵Dave Chapman2006-08-07
libmpeg2. Works on all targets with colour LCDs, but most optimised for the ipod Color/Photo and Nano. It currently only plays raw MPEG-1 or MPEG-2 video streams (no audio). Also adds a new lcd_yuv_blit() function to the plugin API - currently only implemented for the ipod Color/Photo and Nano. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10479 a1c6a512-1295-4272-9138-f99709370657