Commit Graph

83 Commits

Author SHA1 Message Date
Uoti Urpala fc6a9e4a3e build: switch to libavutil bswap.h and intreadwrite.h
Remove the private bswap and intreadwrite.h implementations and use
libavutil headers instead.

Originally these headers weren't publicly installed by libavutil at
all. That already changed in 2010, but the pure C bswap version in
installed headers was very inefficient. That was recently (2011-12)
improved and now using the public bswap version probably shouldn't
cause noticeable performance problems, at least if using a new enough
compiler.
2012-02-01 22:46:27 +02:00
ib f52b41600d demux_asf: Fix play duration calculation error
Acording to the ASF documentation, the play duration is zero
if the preroll value is greater than the play duration.

The new way of determining it (suggested by reimar) prevents
overflows as well.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33492 b3059339-0415-0410-9bf9-f77b7e298cf2
2011-07-06 07:23:26 +03:00
Clément Bœsch b68f9fef32 cleanup: shut up more warnings 2011-05-06 18:33:16 +03:00
reimar de8ec24998 demux_asf, asfheader.c: cleanup
Move setup of sh_audio->format to a more appropriate place (in asfheader.c).

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

Remove pointless assignments that are already handled in new_sh_audio.

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

Remove useless assignment already done in new_sh_video.

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

Use FFMAX for slightly better readability.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32687 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-12-16 06:22:18 +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
reimar fe6c4fcae2 cleanup: malloc+memset->calloc, sizeof(TYPE)->sizeof(*ptr)
Replace malloc+memset by calloc

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

Replace malloc+memset by calloc.

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

Replace malloc+memset by calloc.

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

Replace some sizeof(type) by sizeof(*pointer)

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

Replace malloc+memset by calloc.

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

Replace malloc+memset by calloc.

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

Replace malloc+memset by calloc

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

Replace sizoef(type) by sizeof(*ptrvar).
Besides being consistent with FFmpeg style,
this reduces the size of a patch to rename these
types to not conflict with the windows.h definitions.

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

Replace malloc+memset by calloc.

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

Replace malloc+memset by calloc.

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

Replace sizeof(type) by sizeof(*ptrvar)

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

Remove a useless cast.

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

Replace sizeof(type)

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

Remove a useless cast.

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

Replace several sizeof(WAVEFORMATEX)

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

Replace one more instance of sizeof(WAVEFORMATEX); fix compilation.
patch by Clément Bœsch, ubitux gmail com

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

Avoid some pointless uses of sizeof() and one related cast.

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

Merge one malloc() + memset() invocation into calloc().

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

Replace malloc+memset by calloc

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

Replace sizeof(WAVEFORMATEX) occurrences.

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

Replace malloc+memset by calloc.

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

Replace sizeof(BITMAPINFOHEADER)

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32207 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:16:46 +02:00
diego 578ad534b3 configure: Rename "network" variable and option to "networking"
This avoids conflicts with the FFmpeg variable of the same name.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar ce19a13986 asfheader, demux_audio: Remove some pointless be2me/le2me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31685 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:43 +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 c37f09693d Merge svn changes up to r30643 2010-03-10 00:00:06 +02:00
diego 0055441774 Add header for AVI print functions; avoids many forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30631 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-18 00:18:50 +00:00
diego 01df6700de Add header for asf_check_header, read_asf_header; avoids forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30629 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-02-17 23:45:01 +00:00
Uoti Urpala 6ece23f1b1 Merge svn changes up to r30437 2010-01-28 00:37:32 +02:00
reimar b1f3c590c7 Enable parsing for ASF audio streams.
This is necessary to use the ffmp2 decoder with dvr-ms files.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30437 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-01-26 18:19:57 +00:00
Uoti Urpala 287b62163e Merge svn changes up to r29912 2009-11-16 07:01:46 +02:00
reimar 5fd17a2c07 Calculate length of ASF files with more than 1 second precision.
Based on patch by On2.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29881 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 16:24:16 +00:00
reimar 48938efe63 Fix length calculation for ASF, preroll is in ms, play time in 100 ns.
Based on patch by On2


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29880 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-11-10 16:19:44 +00:00
Uoti Urpala d6c410b54c Replace libavutil internal header #includes with MPlayer copies
Change #include lines for libavutil/intreadwrite.h, libavutil/bswap.h
and libavutil/x86_cpu.h to use the MPlayer file under ffmpeg_files/
instead.
2009-07-26 06:16:43 +03: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
Uoti Urpala 6d908205fb Merge svn changes up to r29304 2009-07-07 02:07:11 +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 ea47ab2a9f In all demux_info_add calls change "name" to "title".
Currently "name" and "title" are both used at random, this makes it consistent.
"title" was chosen because it is less ambiguous and also the get_meta_title
slave mode command uses that (there is no get_meta_name command).


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29330 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-30 13:18:57 +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
diego f077569dff Add standard license header to all files in libmpdemux.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29280 b3059339-0415-0410-9bf9-f77b7e298cf2
2009-05-08 21:51:13 +00:00
diego 980239fa82 Move find_backwards_asf_guid asfguid.h to asfheader.c, the only place where
it is used.  Fixes the following warning:
./libmpdemux/asfguid.h:94: warning: 'find_backwards_asf_guid' defined but not used


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27723 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-10-05 21:44:42 +00:00
diego e0b1c9a6b7 Give a CONFIG_ prefix to preprocessor directives that lacked one and
change arbitrary prefixes to CONFIG_.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27429 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-08-07 12:20:50 +00:00
reimar 80256aee5e Fix stupid and almost pointless check-after-read code in asfheader.c.
Fixes bug #1133.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27243 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-07-09 18:24:48 +00:00
albeu 64868a36cd Make stream independent of libmpdemux, the asf demuxer and streaming
code share a function and a few definitions.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26357 b3059339-0415-0410-9bf9-f77b7e298cf2
2008-04-09 00:32:35 +00:00
reimar d02f928bc3 Remove some useless "extern" before function prototypes
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23860 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-25 17:29:29 +00:00
nicodvb 72fedc8425 fixed bug introduced with the addition of get_ext_stream_properties()
that should close bug #843, too.
Patch by John Donaghy. Explanation:
The issue is that get_ext_stream_properties shouldnt be returning
false when no extended stream properties are found for the stream in
question because that is not an error condition ... extended stream
properties are optional. The only time this function should return
false is when the buffer overrun checks fail.





git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23823 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-18 22:16:08 +00:00
zuxy bc722a5236 fix unaligned memory access in asfheader.c, courtesy of Balatoni Denes
(dbalatoni AT programozo DOT hu)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23757 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-07-10 02:02:21 +00:00
zuxy 6a5b9c26d0 Use play duration instead of send duration to calculate the length
of an ASF clip.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23417 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-30 08:36:38 +00:00
diego 5edd9af248 Remove some unused variables, patch by timwoj ieee org.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23399 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-28 08:42:35 +00:00
zuxy e5113fdfec Set i_bps for ASF video streams according to extended stream properties
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23375 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-22 13:55:14 +00:00
reimar ea59198921 Make use of new AV_RL64
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23329 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-17 12:56:08 +00:00
nicodvb e4d7bc4396 For DVR-MS:
extract timing information from the payload extension, set key frames,
detect video frame boundaries, interpolate the average video frame time
using the known informations from past frames and timestamps.
Video data before the first video key frame is thrown away.
Patch by John Donaghy johnfdonaghy gmail com



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23257 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-05-07 21:58:42 +00:00
diego 56c96cec50 Declarations and code should not be mixed.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23107 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-25 00:03:27 +00:00
nicodvb dfd0190a6d with -identify show audio and video id; patch by Andrew Savchenko (Bircoph list ru)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23028 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-04-20 21:49:49 +00:00
diego e085bc8dcf Add explicit location for headers from the stream/ directory.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22623 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-15 18:36:36 +00:00
compn 66d4061303 warn users about drm files, patch by zuxy meng
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22427 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-03-03 21:33:40 +00:00
reimar 75282a6a83 Sanity-check sh_video->bih->biSize
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21985 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-21 18:22:07 +00:00
reimar c70d547ea6 Compile fix: LE_* -> AV_RL*
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21963 b3059339-0415-0410-9bf9-f77b7e298cf2
2007-01-19 23:14:57 +00:00
reimar 370c07962b ASF aspect support via metadata reading.
Patch by Zuxy Meng (zuxy meng (at) gmail.com) with some
simplifications by me.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21626 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-15 21:51:20 +00:00
reimar 0639d41ffc Use libavutil LE_* macros instead of pointer casts which can result
in crashes due to missing alignment. Should fix bug #640.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21470 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-03 16:41:55 +00:00
reimar 4a6ad7c674 Unicode support for demuxer info in ASF demuxer.
Patch by Zuxy Meng [zuxy meng <at> gmail com].


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21461 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-12-03 11:35:11 +00:00
reimar 59e83201dd Try to handle oversized asf headers by ignoring anything beyond the first MB
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20894 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-11-13 19:16:39 +00:00
nicodvb bd40e0ea1d interpolate real fps of dvr-ms files using the extended stream properties.
Patch by John Donaghy - johnfdonaghy gmail com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19967 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-09-24 15:19:48 +00:00
uau eb05b22b01 Fix use of uninitialized variable
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19129 b3059339-0415-0410-9bf9-f77b7e298cf2
2006-07-17 22:22:34 +00:00