Commit Graph

107 Commits

Author SHA1 Message Date
551096d6fd BLI_open: check returned value for -1 instead of < 0 2014-04-22 16:40:17 +10:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
77c1d17940 Fix T39186: Matroska audio support (mka, mkv without video stream)
.mka files were considered image files when adding to sequencer
using drag-n-drop.
2014-03-21 13:52:37 +06:00
5559302369 Cleanup some useless/unneeded #ifdefs for MSVC2013. 2014-03-09 00:25:08 +01:00
20da9353b8 Code cleanup: unused/warnings 2014-02-17 11:34:12 +11:00
b783140ef6 Image/Animation loading, remove user-pref extension check.
don't use extension checking preference for low level loading functions,
otherwise a user preference may impact a script loading a file for example.

looked into making this an argument and passing it in, but theres no
real advantage and its simpler just to remove.
2014-02-03 19:37:40 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
3c86a1932f Code cleanup: add BLI_testextensie_n, replacing multuple calls to BLI_testextensie
also use attributes for BLI path functions
2014-01-31 03:30:05 +11:00
Anton Khirnov
f99e581ae1 libavformat API usage: use avformat_close_input() instead of av_close_input_file() 2014-01-28 14:20:22 +06:00
2742cb6000 Fix [#37290] Movie files filtering does not show *.ts files. 2013-11-01 18:20:21 +00:00
fc0e225a77 FIX: [#37199] .ogg file is not recognized as a movie in File Browser
CHANGE: writing an animation in the ogg movie format now defaults to .ogv (ogg/video) which is recommended by Xiph.org for video
CHANGE: for .ogg files a check is added whether Blender can read it as a movie (is avi or ffmpeg movie), otherwise assume audio
CHANGE: the anim player now filters for the same extensions as the file browser
2013-10-31 21:00:55 +00:00
1a746911d6 Add .webm to the list of extensions recognized as video
(Patch by Philipp Oeser, submitted in [#37199], many thanks)
2013-10-30 21:16:13 +00:00
Dalai Felinto
029f4b9767 adding WITH_IMAGE_OPENIMAGEIO and removing the PSD build option
As per Brecht van Lommel's suggestion.
2013-10-11 16:38:04 +00:00
Dalai Felinto
4abb8fde95 Photoshop PSD support
We now support the combined layer of Photoshop files (stored as layer 0
in the file). This way users can keep their files as multilayer PSD and
Blender always handle them as flat images.

For perfect alpha this requires an OpenImageIO update:
342cc2633f

Photoshop sample files:
https://github.com/OpenImageIO/oiio-images

Brecht has some pending fixes to push for OIIO as well, so we may as
well wait to update our libraries.

What works:
===========
* 8bit images (with or without alpha)
* 16bits images (alpha discarded)
* Photoshop files saved with 'Maximum Compatibility'
* Cycles, Blender internal,  BGE (and player)

Known limitations
(due to OIIO dependency):
=========================
* Images with less than 4 channels show a wrong thumbnail (bug may be in  OIIO)
* Packed images are not supported
* We do not write PSD files.

Note: old Blenders have support for PSD via Quicktime library. But due
to license issues this was discontinued.

Many thanks for Brecht van Lommel for reviewing the patch, suggesting
multiple improvements and to help solving the alpha issue.
2013-10-08 21:17:24 +00:00
62b541faa3 add missing va_end() calls. 2013-07-25 12:37:22 +00:00
0ea078ad03 fix for 2 bugs in animation playback
- reading bmp images was failing (needed to increase the size of the header to 64 bytes)
- the dnd image was being incorrectly checked (was always returning true even when none was used).
2013-07-13 12:58:00 +00:00
40d4dfaba8 Fix #35824: finding missing files not working correct for filepaths with special
characters on Windows.

Replaced some uses of stat() by BLI_stat() to properly handle such filepaths.
2013-06-25 14:48:30 +00:00
1ed6ab2f8c Bug fix #35143
Animplayer treated .tif extensions as movie files, so that didn't work.
Added another hardcoded check for it, like for png tga exr jpg etc.

Why FFmpeg thinks .tif is a movie... that's for another day :)
Quicktime QTKit did same btw.
2013-04-30 11:11:18 +00:00
685e9b83c2 Fix for --debug-ffmpeg not giving enough information 2013-04-29 16:03:21 +00:00
013a176c52 patch [#34103] use booleans for extensions testing.
bli_testextensie.patch - from Lawrence D'Oliveiro (ldo)
2013-03-04 18:36:37 +00:00
aab01c86cf Patch #33837: ffmpeg1.1 and libav9.1 compatibility update
Patch makes it possible to compile blender with recent ffmpeg
and libav libraries, mainly by getting rid of deprecated API.

Original patch by Campbell Barton with own modifications to
support compilation with older ffmpeg versions.

This patch could break compatibility of FFV1 videos playing
back in older players, mainly because of alpha support changes.
Preserving compatibility with such players became a headache
and think it's high time to get rid of workarounds here.
2013-01-12 12:51:10 +00:00
1b32f258e7 ifdef'd gcc diagnostic pragma's to quiet msvc and others. 2012-11-23 10:03:50 +00:00
5280353a51 * Fix Windows compile. #ifdef _MSC_VER was misspelled. 2012-11-19 19:28:06 +00:00
d0a7259837 Improved FFmpeg error reports when audio stream failed to be allocated
Also fixed crash using --debug-ffmpeg caused by BLI_vsnprintf modifies
va_list -- need to create copy of list if this list is gonna to be reused.
2012-11-19 17:22:40 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
aa1e50be94 add option to build without blenders default avi codec. 2012-10-08 02:51:42 +00:00
5807726ca7 quiet invalid warning in ffmpeg_log_callback with -Wmissing-format-attribute. 2012-10-08 01:05:37 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
dde5ccb61f Fix for logging FFmpeg messages 2012-09-03 12:01:00 +00:00
590251f55a File format fixes
- Add check for header field in BMP decoder. This is needed to distinguish
  whether file is indeed BMP image or not.
  Without this check Blender could easily crash when it'll try to load
  non-BMP image.
  Tested with files from own HDD, but all of them has got BM header field,
  more testing would be welcome.

- Made Jpeg2000 aware of J2K codec. Originally was needed to verify .j2c
  files here in the studio, but having support of this codec would be
  nice in general.
  Currently supports only reading in this codec, writing would still
  using jp2 codec.
2012-08-27 11:59:26 +00:00
1b487e9948 Some FFmpeg changes
- Make FFmpeg initialization called from creator, not from functions
  which requires FFmpeg. Makes it easier to follow when initialization
  should happen.

- Enable DNxHD codec. It was commented a while ago due to some strange
  behavior on some platforms. Re-tested it on Linux and Windows and
  it seemd to be working quite nice. Would let it be tested further,
  if it wouldn't be stable enough, easy to comment it again.

- Make non-error messages from writeffmpeg.c printed only if ffmpeg
  debug argument was passed to blender. Reduces console pollution
  with messages which are not useful for general troubleshooting.
  Error messages would still be printed to the console.

- Show FFmpeg error message when video stream failed to allocate.
  makes it easier to understand what exactly is wrong from Blender
  interface, no need to restart blender with FFmpeg debug flag and
  check for console messages.

  Used custom log callback for this which stores last error message
  in static variable. This is not thread safe, but with current
  design FFmpeg routines could not be called form several threads
  anyway, so think it's fine solution/
2012-08-26 11:01:14 +00:00
6324c5fed1 code cleanup: includes for imbuf, also remove double promotion. 2012-08-12 23:28:33 +00:00
0d64e050ea Reduce amount of deprecated symbols used from FFmpeg
This switches some areas of Blender which are related on FFmpeg stuff
from deprecated symbols to currently supported one.

Pretty straightforward changes based on documentation of FFmpeg's
API which symbols should be now used.

This should make Blender compatible with recent FFmpeg 0.11.

Should be no functional changes.
2012-06-18 10:29:11 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
d64fd168c9 style cleanup: imbuf 2012-05-16 07:38:23 +00:00
274d3d2daa Fixes opening video files on Windows. [#30752]
Thanks Lockal for finding faulty stat function which helped a lot. 
Now there BLI_stat. I will replace all other stat later.

*** Please use BLI_xxxx() functions ***
for file operations

Reported by Leon Cheung, Lockal, Believil
2012-05-01 21:46:55 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
b9a2741f68 code cleanup: remove unused defines 2012-04-23 08:05:02 +00:00
b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
785373b03a Added new command-line arguments --debug-ffmpeg and --debug-libmv to
be able to see debug prints coming from FFmpeg or libmv independently
of general blender debug messages.
2012-03-30 10:37:49 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
f11a6d3a84 Adds support for utf paths on Windows.
Not all file formats/calls are supported yet. It will be expended.

Please from now on use BLI_fopen, BLI_* for file manipulations.
For non-windows systems BLI_fopen just calls fopen.
For Windows, the utf-8 string is translated to utf-16 string in order to call UTF version of the function.
2012-03-20 02:17:37 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
c07bd1439a == Sequencer ==
This patch adds:

* support for proxy building again (missing feature from Blender 2.49)
  additionally to the way, Blender 2.49 worked, you can select several
  strips at once and make Blender build proxies in the background (using
  the job system)
  Also a new thing: movie proxies are now build into AVI files, and
  the proxy system is moved into ImBuf-library, so that other parts
  of blender can also benefit from it.
  
* Timecode support: to fix seeking issues with files, that have
  a) varying frame rates
  b) very large GOP lengths
  c) are broken inbetween
  d) use different time code tracks
  
  the proxy builder can now also build timecode indices, which are
  used (optionally) for seeking.
  
  For the first time, it is possible, to do frame exact seeking on
  all file types.
  
* Support for different video-streams in one video file (can be
  selected in sequencer, other parts of blender can also use it,
  but UI has to be added accordingly)

* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
  older versions don't support the pkt_pts field, that is essential
  for building timecode indices.
  
  Windows and Mac libs are already updated, Linux-users have to build
  their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
81ad6fa4e6 Fix small part of #27815: recognize m2ts as video file extension. 2011-07-05 18:54:16 +00:00