Commit Graph

424 Commits

Author SHA1 Message Date
Stefano Sabatini
c2606259de ffplay: move output_picture() code to queue_picture()
Move output_picture() code to queue_picture(), and remove it.
Simplify code path.
2011-04-27 11:31:10 +02:00
Stefano Sabatini
4a22ea4da1 ffplay: rename video_refresh_timer() to video_refresh()
The new name is shorter and less confusing.
2011-04-27 11:26:53 +02:00
Stefano Sabatini
8adf9bb2cb ffplay: rename decode_thread to read_thread, parse_tid to read_tid
The new names are less misleading and more reciprocally consistent.
2011-04-27 11:25:11 +02:00
Stefano Sabatini
1d6c82d405 ffplay: fix logic for selecting the show mode in case of missing video
Also automatically select the show mode only if not specified by the
user.

Fix trac issue #109.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:17 +02:00
Stefano Sabatini
54ad8e06f4 ffplay: name ShowMode enum
Help debugging with GDB, maybe cleaner/safer.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:12 +02:00
Stefano Sabatini
69f58958ce ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when
interactively resizing the SDL window.
This is done by forcing the minimum size to 1x1.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-24 23:10:26 +02:00
Michael Niedermayer
7b376b398a Merge remote branch 'qatar/master'
* qatar/master:
  Handle unicode file names on windows
  rtp: Rename the open/close functions to alloc/free
  Lowercase all ff* program names.
  Refer to ff* tools by their lowercase names.
NOT Pulled  Replace more FFmpeg instances by Libav or ffmpeg.
  Replace `` by $() syntax in shell scripts.
  patcheck: Allow overiding grep program(s) through environment variables.
NOT Pulled  Remove stray libavcore and _g binary references.
  vorbis: Rename decoder/encoder files to follow general file naming scheme.
  aacenc: Fix whitespace after last commit.
  cook: Fix small typo in av_log_ask_for_sample message.
  aacenc: Finish 3GPP psymodel analysis for non mid/side cases.
  Remove RDFT dependency from AAC decoder.
  Add some debug log messages to AAC extradata
  Fix mov debug (u)int64_t format strings.
  bswap: use native types for av_bwap16().
  doc: FLV muxing is supported.
  applehttp: Handle AES-128 encrypted streams
  Add a protocol handler for AES CBC decryption with PKCS7 padding
  doc: Mention that DragonFly BSD requires __BSD_VISIBLE set

Conflicts:
	ffplay.c
	ffprobe.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 03:41:22 +02:00
Diego Biurrun
89b503b55f Lowercase all ff* program names. 2011-04-23 19:12:24 +02:00
Stefano Sabatini
539647c6ff ffplay: factorize code calling output_packet() in video_thread()
Slightly simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:49:04 +02:00
Stefano Sabatini
c632a1c205 ffplay: remove reference to unused QETimer symbol
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:48:55 +02:00
Stefano Sabatini
ab7fdbab00 ffplay: rename stream_pause() to stream_toggle_pause()
The new name is less misleading, since the function will resume the
stream if it is currently paused.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-23 12:48:48 +02:00
Michael Niedermayer
efb5fa79f5 Merge remote branch 'qatar/master'
* qatar/master: (37 commits)
  In avcodec_open(), set return code to an error value only when an error occurs instead of unconditionally at the start of the function.
  lavc: remove reference to opt.h from Makefile.
  prefer avio_check() over url_exist()
  avio: remove AVIO_* access symbols in favor of new AVIO_FLAG_* symbols
  lavu: remove misc disabled cruft
  lavu: remove FF_API_OLD_IMAGE_NAMES cruft
NOT PULLED  lavu: remove FF_API_OLD_EVAL_NAMES cruft
  lavc: remove misc disabled cruft.
  lavc: remove the FF_API_INOFFICIAL cruft.
  lavc: remove the FF_API_SET_STRING_OLD cruft.
  lavc: remove the FF_API_USE_LPC cruft.
  lavc: remove the FF_API_SUBTITLE_OLD cruft.
  lavc: remove the FF_API_VIDEO_OLD cruft.
  lavc: remove the FF_API_AUDIO_OLD cruft.
  lavc: remove the FF_API_OPT_SHOW cruft.
  lavc: remove the FF_API_MM_FLAGS cruft.
  lavf: remove misc disabled cruft.
  lavf: remove FF_API_INDEX_BUILT cruft
  lavf: remove FF_API_URL_CLASS cruft.
  lavf: remove FF_API_SYMVER cruft
  ...

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-20 04:48:23 +02:00
Anton Khirnov
41d0eb1c81 lavc: remove the FF_API_SET_STRING_OLD cruft. 2011-04-19 18:41:00 +02:00
Stefano Sabatini
f521746b83 ffplay: implement -showmode option
The new option allows to select the starting show mode.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
f8b8c694e9 ffplay: use symbolic constant values for show_audio
Also rename VideoState->show_audio to show_mode.
Improve readability.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
8776f3d22e ffplay: remove audio_write_get_buf_size() forward declaration
Move up the definition of audio_write_get_buf_size(), so that it is
defined before it is used. Simplify.
2011-04-13 10:06:27 +02:00
Stefano Sabatini
a6f395d6c5 ffplay: avoid unnecessary intermediary struct in queue_picture()
When CONFIG_AVFILTER, use a AVFrame -> AVPicture cast rather than
explicitely copy the image information from AVFrame to a new
AVPicture.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-13 10:06:27 +02:00
Stefano Sabatini
c1d4bb5731 ffplay: remove unused field VideoState.dtg_active_format
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-13 10:06:27 +02:00
Carl Eugen Hoyos
05d33d8655 Fix compilation with --disable-avfilter. 2011-04-13 09:58:31 +02:00
Stefano Sabatini
df149f6ce8 ffplay: fix weird brace placement in video_image_display()
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
3338be24e8 ffplay: rename output_picture2() to output_picture()
The "2" suffix is confusing.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
1979d3b8a5 ffplay: remove useless intermediary variable dst_pix_fmt in queue_picture()
Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
eef1696628 ffplay: avoid forward declaration for packet_queue_put()
Define the function before it is used. Simplify.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:37:00 +02:00
Stefano Sabatini
91b27e49d6 ffplay: compact expression in compute_mod()
Prefer "return X ? Y : Z" over "if (x) return Y; else return Z",
reduce line count.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-12 01:23:43 +02:00
Oskar Arvidsson
dc172ecc6e Add the notion of pixel size in h264 related functions.
In high bit depth the pixels will not be stored in uint8_t like in the
normal case, but in uint16_t. The pixel size is thus 1 in normal bit
depth and 2 in high bit depth.

Preparatory patch for high bit depth h264 decoding support.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-10 22:33:41 +02:00
Michael Niedermayer
c88caa522c Merge remote branch 'qatar/master'
* qatar/master:
  proto: include os_support.h in network.h
  matroskaenc: don't write an empty Cues element.
  lavc: add a FF_API_REQUEST_CHANNELS deprecation macro
  avio: move extern url_interrupt_cb declaration from avio.h to url.h
  avio: make av_register_protocol2 internal.
  avio: avio_ prefix for url_set_interrupt_cb.
  avio: AVIO_ prefixes for URL_ open flags.
  proto: introduce listen option in tcp
  doc: clarify configure features
  proto: factor ff_network_wait_fd and use it on udp

Conflicts:
	ffmpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 02:50:13 +02:00
Michael Niedermayer
f6d71b3942 ffplay: Set EMU_EDGE if dr1, this is an alternative fix for ticket40.
Idea borrowed from mplayer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-08 00:20:18 +02:00
Anton Khirnov
80c6e238b0 avio: avio_ prefix for url_set_interrupt_cb. 2011-04-07 18:11:24 +02:00
Michael Niedermayer
9f8008a981 move image check down in ffplay.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-07 01:48:47 +02:00
Michael Niedermayer
454fab721a Disable dr1 in ffplay for svq1 (fixes ticket40)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:46:37 +02:00
Michael Niedermayer
8bce71dff5 Check sizes a bit in ffplay, cant hurt.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-06 23:39:57 +02:00
Martin Storsjö
648c79624f ffplay: Don't assume ic->pb is non-null
This fixes crashes on exit when plaing some RealRTSP streams
(among other), e.g.
rtsp://dl.lib.brown.edu:554/areserves/1093545294660883.mp3.
These crashes have been present since 3e68b3ba7b.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-21 15:08:09 -04:00
Stefano Sabatini
c743a5e287 ffplay: add braces around union definition
Fix warning:
ffplay.c: At top level:
ffplay.c:3027: warning: missing braces around initializer
ffplay.c:3027: warning: (near initialization for ‘options[53].u’)
2011-03-19 17:30:35 +01:00
Stefano Sabatini
eb4d1cb90e ffplay: add existence check on ic->pb in decode_thread()
Fix crash if ic->pb is NULL and ic->pb->error is evaluated. This
happens for example with: ffplay photo.jpeg.
2011-03-19 17:30:35 +01:00
Mans Rullgard
2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Michael Niedermayer
6947b0c42e Merge remote-tracking branch 'newdev/master'
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-15 16:48:42 +01:00
Anton Khirnov
3e68b3ba7b avio: deprecate url_ferror
AVIOContext.error should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-15 08:04:28 -04:00
Michael Niedermayer
0b82612d35 ffplay: Continue if the file was appended to.
This is a bit experimental

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-10 19:57:45 +01:00
Benjamin Larsson
76d4c1676f Add a dummy option -i to ffplay so that it is easy to switch between ffmpeg -i "file" and ffplay -i "file".
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-03-08 17:34:02 +01:00
Anton Khirnov
db44ea960d avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 76aa876e69)
2011-03-08 02:09:21 +01:00
Anton Khirnov
66e5b1df36 avio: deprecate url_feof
AVIOContext.eof_reached should be used directly instead.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 17:20:31 -05:00
Anton Khirnov
76aa876e69 avio: avio_ prefix for url_fsize
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-07 11:03:39 -05:00
Anton Khirnov
384c9c2fa7 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a2704c9712)
2011-03-05 02:29:31 +01:00
Anton Khirnov
a2704c9712 avio: add avio_tell macro as a replacement for url_ftell
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-03-04 11:26:57 -05:00
Anton Khirnov
0ebf475494 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit 610219a598)
2011-02-18 19:52:28 +01:00
Anton Khirnov
610219a598 lavf: add av_ prefix to dump_format()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-16 23:39:56 +00:00
Reinhard Tartler
7ffe76e540 Merge libavcore into libavutil
Done to keep ABI compatible. Otherwise this is just silly
2011-02-16 23:00:30 +01:00
Reinhard Tartler
737eb5976f Merge libavcore into libavutil
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.

Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2011-02-15 16:18:21 +01:00
Stefano Sabatini
9d375bf5ec Remove disabled legacy code in ffplay.
The code was setting aspect ratio from the DTG active format, and was
present and disabled since the creation of ffplay.

See thread:
Subject: [FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in
        disabled code.
Date: Sat, 12 Feb 2011 18:46:19 +0100

Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit b7ec5cc401)
2011-02-14 23:58:21 +01:00
Stefano Sabatini
b7ec5cc401 Remove disabled legacy code in ffplay.
The code was setting aspect ratio from the DTG active format, and was
present and disabled since the creation of ffplay.

See thread:
Subject: [FFmpeg-devel] [PATCH] Cosmetics: adopt compact notation in
        disabled code.
Date: Sat, 12 Feb 2011 18:46:19 +0100

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-02-14 12:11:56 +00:00