Commit Graph

8694 Commits

Author SHA1 Message Date
Martin Storsjö
d58dd4b5b5 avopt: Store defaults for AV_OPT_TYPE_FLAGS in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:38 +03:00
Martin Storsjö
124134e424 avopt: Store defaults for AV_OPT_TYPE_CONST in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:32 +03:00
Luca Barbato
3093939077 avio: make avio_close NULL the freed buffer 2012-09-04 15:04:46 +02:00
Martin Storsjö
12c8912de2 crypto: Remove a stray double space
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-31 23:27:27 +02:00
Alberto Delmás
ee769c6a7c MSS2 decoder
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
2012-08-31 07:37:16 +02:00
Mans Rullgard
8db73c61a7 build: allow non-standard variations of linker -l/-L flags
This enables replacing the -l and -L flags used to specify the
just-built libraries when linking the tools and shared libs with
non-standard syntaxes.  System library flags are already handled
by the filtering mechanism in configure.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-29 14:16:54 +01:00
Martin Storsjö
d4bba93f4d sdp: Use static const char arrays instead of pointers to strings
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-28 22:35:17 +03:00
Martin Storsjö
06b5246c84 sdp: Include profile-level-id for H264
This is required for playback with the Stagefright RTSP framework
on Android.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-28 19:32:19 +03:00
Samuel Pitoiset
6af2480aa6 rtpdec_h264: Don't set the pixel format
There is no need for this depacketizer to set the pixel format,
the decoder can do that just fine.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-28 18:16:00 +03:00
Martin Storsjö
125c6c0752 rtsp: Free the rtpdec context properly
The condition for calling the rtpdec cleanup was broken in
df8cf076c8.

This fixes a memory leak.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-27 12:29:47 +03:00
Samuel Pitoiset
7011a42b1a rtmp: support strict rtmp servers
In order to send or receive a stream FCPublish, FCSubscribe and _checkbw
are completely optional and often not implemented. releaseStream over a
non-existen stream might report an error instead of being silent.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-08-22 17:55:17 +02:00
Mans Rullgard
edb5238ccb libavformat: add const to AVCodec pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-18 14:20:57 +01:00
Anton Khirnov
15c71dfd03 swf(dec): replace CODEC_ID with AV_CODEC_ID 2012-08-18 08:48:30 +02:00
Anton Khirnov
e0aa5e772b dvenc: don't use deprecated AVCODEC_MAX_AUDIO_FRAME_SIZE 2012-08-18 08:48:30 +02:00
Samuel Pitoiset
8337b5db96 rtmpdh: Do not generate the same private key every time when using libnettle
Replace mpz_random by mpz_urandomb with a random state initialization in
order to improve the randomness.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-17 23:51:53 +03:00
Jordi Ortiz
a2dd4f7780 rtp: remove ff_rtp_get_rtcp_file_handle().
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-17 22:15:56 +03:00
Jordi Ortiz
e7993ece9b rtsp.c: use ffurl_get_multi_file_handle() instead of ff_rtp_get_rtcp_file_handle()
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-17 22:15:46 +03:00
Jordi Ortiz
d6b9da1178 avio: add (ff)url_get_multi_file_handle() for getting more than one fd
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-17 22:14:30 +03:00
Martin Storsjö
cb5ab02a88 rtmp: Use int instead of ssize_t
Not all compilers support ssize_t (MSVC doesn't), and none of these
variables need to be larger than 32 bit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 23:02:26 +03:00
Jordi Ortiz
e5f2731c73 rtmp: Add support for receiving incoming streams
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-16 18:13:41 +03:00
Martin Storsjö
70766c2182 Add some more missing includes after removing the implicit common.h
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 23:48:48 +03:00
Samuel Pitoiset
93f257db6b rtmp: Automatically compute the hash for SWFVerification
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 22:05:36 +03:00
Samuel Pitoiset
635ac8e1be rtmp: Add support for SWFVerification
Specifies how the server verifies client SWF files before allowing the
files to connect to an application. Verifying SWF files is a security
measure that prevents someone from creating their own SWF files that can
attempt to stream your resources.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-15 10:37:34 +03:00
Samuel Pitoiset
fb7e78089b rtmp: Gracefully ignore _checkbw errors by tracking them
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-14 22:36:35 +03:00
Samuel Pitoiset
8b6a5a7923 rtmp: Do not send _checkbw calls as notifications
The _checkbw calls were changed to use transactionId 0 in commit
82613564 so that servers would not return _result/_error about it.
While this is the strict interpretation of the spec, there are
servers that return _error about it, even if transactionId was 0.

The latest version of EvoStream Media Server (the commercial version
of crtmpserver) behaves properly as described, i.e. returning an
_error normally but not returning anything when using transactionId
0. The latest version of crtmpserver (right now at least) doesn't
behave like this though, it returns an error even if transactionId
was 0.

There are also other servers that return errors even if transactionId
is set to 0. Therefore set a proper transaction id so that the invoke
can be tracked and the error properly ignored instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-14 22:31:53 +03:00
Luca Barbato
fb96c1c5fe rtmp: handle bytes read reports
0x03 (bytes read report) is a known type and should be safely ignored
beside in debug situations.
2012-08-13 21:03:59 +02:00
Martin Storsjö
bdefe22b8e lavf: Detect discontinuities in timestamps for framerate/analyzeduration calculation
If the dts difference is more than 1000 times the average dts
difference, restart the analysis.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-12 12:39:49 +03:00
Martin Storsjö
30c26c2442 lavf: Initialize the stream info timestamps in avformat_new_stream
These are normally initialized to AV_NOPTS_VALUE at the start
of avformat_find_stream_info, but if a new stream is found while
this function is running (e.g. like in mpegts), the newly added
AVStreams didn't have these values properly initalized, leading
to avformat_find_stream_info terminating too soon (when the
first timestamps are far from 0).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-12 12:39:47 +03:00
Mohammad Alsaleh
6e9bbc6525 id3v2: Match PIC mimetype/format case-insensitively
Some files' embedded art seems to have the mimetype 'image/JPG' instead
of 'image/jpg'. Libav fails to parse those because it matches
case-sensitively.

Use av_strncasecmp() to fix this behaviour.

Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-08-12 11:00:19 +02:00
Jordi Ortiz
f5ce90f2de rtmp: split chunk_size var into in_chunk_size and out_chunk_size
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-11 15:49:37 +03:00
Samuel Pitoiset
a8103503b3 rtmp: Factorize the code by adding find_tracked_method
Also fix the bytestream reader size parameter to take the
offset into account.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-11 15:15:51 +03:00
Anton Khirnov
885da7b082 lavf: simplify is_intra_only() by using codec descriptors. 2012-08-11 11:34:24 +02:00
Mans Rullgard
987170cb9d dict: add av_dict_count()
This adds a function to retrieve the number of entries in a
dictionary and updates the places directly accessing what should
be an opaque struct to use this new function instead.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-10 15:15:00 +01:00
Samuel Pitoiset
3eebc1e174 rtmp: Factorize the code by adding handle_invoke_error
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-08-09 22:44:30 +02:00
Samuel Pitoiset
71036a3a5e rtmp: Factorize the code by adding handle_invoke_status
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-08-09 22:44:30 +02:00
Samuel Pitoiset
5e6001db8f rtmp: Factorize the code by adding handle_invoke_result
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2012-08-09 22:44:29 +02:00
Mans Rullgard
6d3783d160 ffmenc: replace if/abort with assert()
The condition is trivially true, but keeping the assert() is
sensible to avoid FFM_HEADER_SIZE ever getting out of sync with
the actual code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-09 20:52:39 +01:00
Diego Biurrun
90f7e61769 swf: Move shared table out of the header file 2012-08-09 20:05:54 +02:00
Diego Biurrun
2804ba6a3b swf: Move swf_audio_codec_tags table to the only place it is used 2012-08-09 20:05:53 +02:00
Samuel Pitoiset
f89584ca44 rtmp: Add message tracking
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09 00:32:29 +03:00
Martin Storsjö
1243c72251 rtsp: Support mpegts in raw udp packets
This is basically the same way as mpegts packets are parsed in
rtpdec.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09 00:25:57 +03:00
Martin Storsjö
df8cf076c8 rtsp: Support receiving plain data over UDP without any RTP encapsulation
EvoStream Media Server can serve data in this format, and
VLC/live555 already supports it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09 00:25:15 +03:00
Martin Storsjö
c864e461d2 rtpdec: Remove an unused include
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09 00:25:11 +03:00
Martin Storsjö
bfb82fcddf rtpenc: Remove an av_abort() that depends on user-supplied data
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-09 00:24:41 +03:00
Luca Barbato
82613564cf rtmp: send check_bw as notification
Set the transactionId to 0 to signal the server a return _result/_error
is not expected.

Solves the problems experienced with strict rtmp servers.
2012-08-08 14:22:34 +02:00
Mohammad Alsaleh
385ec296f1 id3v2: Support v2.2 PIC
id3 v2.2 uses image format ("JPG","PNG") instead of mimetypes.

Currently, the attached picture is skipped because the format string
does not match a known picture mimetype.

This patch fixes this behaviour.

Signed-off-by: Mohammad Alsaleh <msal@tormail.org>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-08-08 11:20:45 +02:00
Samuel Pitoiset
00cb52c65c rtmp: Add a new option 'rtmp_subscribe'
This option specifies the name of live stream to subscribe.
Defaults to rtmp_playpath.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-07 23:35:39 +03:00
Samuel Pitoiset
f9e77c1762 rtmp: Add support for subscribing live streams
When streaming live streams using the Akamai, Edgecast or Limelight CDN,
players cannot simply connect to the live stream. Instead, they have to
subscribe to it, by sending an FC Subscribe call to the server.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-07 23:35:39 +03:00
Samuel Pitoiset
12127b65b0 rtmp: Factorize simultaneous URLProtocol / AVClass declarations with a macro
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-08-07 23:35:39 +03:00
Anton Khirnov
36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00