- As it is rather hard to find useful documentation, on how to use FFMPEG's API
we cut of some research time by just documenting it at the place where it is
most visible to other FFMPEG plugin developers :)
Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit b0ed15d2196ca45de8ab2d5913d760602aacc5f3)
- This small refactoring is in preparation for implementing decoding of partial
video frame data, where one needs to preserve encoded data between multiple
calls to AVCodecDecoder::_DecodeVideo().
- Note: The names fChunkBuffer and fChunkBufferSize are open for discussion.
I'd rather prefer fEncodedDataChunkBuffer and fEncodedDataChunkBufferSize.
But I'd like to take small refactoring steps, and changing the naming would
also touch the AVCodecDecoder::_DecodeAudio() function. I'd rather focus
on improving the video part for now, leaving the audio part alone.
- No functional change intended.
Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit f2da1e752458b926aebe50642bf6af19e9903f17)
When using the Show Disks icon option, single window navigaton mode,
and starting navigation by the Disks icon, these bugs would occurs
upon entering child poses :
*) The draggable icon at the top right wouldn't appear
*) The file menu wouldn't update properly (for example, the New folder
menu item won't show)
Based in part on dru_ed's patch.
Accidentally renamed these in the header, rename them back to
match the cpp file. These param names might not be very good but
they match the struct variable names. They are private methods
anyway. No functional change intended in either commit.
Besides that this is a nicer interface, it allows us to get a the HPKG
header as a side effect of initializing the reader, thus preventing
seeking backward in the file. This makes "package recompress - <file>"
work.
* Prefix lock functions with __ to mark them as private. Add
forwarding macros to keep existing code working.
* Avoids symbol name clashes with kernel lock APIs, occuring when
using kernellandemu-lib in userlandfs. Thanks to Ingo for the
suggestion.
Until now we always declared in the HPKG header that the package file is
zlib compressed. For uncompressed files we would just store all
individual chunks uncompressed. Now we handle completely uncompressed
files slightly differently: We don't write the redundant chunk size
table anymore. The size savings are minor, but it makes the uncompressed
format read-streamable which may be handy.
* PackageFileHeap{Reader,Writer} as well as Package{Reader,Writer} and
their implementation and super classes do now internally use a
BPositionIO instead of a FD to access the package file. This provides
more flexibility needed for features to come.
* BPackageReader has already grown a new Init() version with a
BPositionIO* parameter.
Simple BPositionIO implementation using the POSIX API on a FD. In effect
similar to BFile, but more easily ported to kernel and boot loader (and
the FD is reusable).
- Reset tooltip when it's no longer needed (i.e. if the file path changes).
Otherwise, we'd erroneously show the old tooltip if the new path was short
enough to no longer be truncated, as would often happen after locating a
missing source file.
* Add support for hubs in AllocateDevice().
* Prevent page fault in FinishTransfers().
* Set fCapabilityLength
* Correct in BIOS ownership code
* Fix context errors in _InsertEndpointForPipe().
* Update constants according to latest Specification (v1.1)
* Fix SMI code (reference
http://lkml.iu.edu/hypermail/linux/kernel/1204.2/02460.html).
* Fix Memory/Device-Slot leaks.
* Fix area allocation for TRBs.
* Fix for Intel Lynx Point and Panther Point chipsets. Also move init
of xhci before ehci, to switch USB 2.0 ports before the ehci module
discovers them.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
* Ingo copied the methods into a shared location, and then obviously
"forgot" to let BFS use them. As a side note for Ingo: the complete
error GCC reported was "std::fssh_size_t" not defined with the macro
wrapper as code location. The actual problem was a "using std::size_t"
in some C++ header that accidentally got included after the wrapper.
* The shared Query code is not yet used. That'll be done another time.
* Renamed BFS_SHELL define to FS_SHELL, such that QueryParserUtils can be
used in any file system shell, not just the bfs_shell.
* When restoring shared attributes, don't affect CDDB:lookup status
* Volume renames should not affect CDDB:lookup status, only file renames should
This fixes some of the "cddb_daemon not updating CD info" problems.
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
* Add ".wav" to the ends of filenames
* Add a track number at the beginning of the filename, e.g. "01"
* Don't hard-fail if the FreeDB response contains an invalid year
Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
The workaround triggers the loading of all media plugins prior to using
methods of class BMediaFormats. Using the function get_next_encoder()
is used because of two facts
1. It is publicly available and thus can be used by 3rd party apps,
too.
2. It is already available by including BMediaFormats.h, so there is
no need to include another header for this workaround.
Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit a89b0a4e69f18b2b3b2c2f5615450a5ddac838af)
The workaround triggers the loading of all media plugins prior to using
methods of class BMediaFormats. Using the function get_next_encoder()
is used because of two facts
1. It is publicly available and thus can be used by 3rd party apps,
too.
2. It is already available by including BMediaFormats.h, so there is
no need to include another header for this workaround.
Signed-off-by: Colin Günther <coling@gmx.de>
(cherry picked from commit 80354716fe8b25c81ec45bd96ae36e171228b8a0)
- Compiling dvb.media_addon with DEBUG on fails with error message:
generated/objects/haiku/x86/debug_1/add-ons/media/media-add-ons/dvb/
MediaFormat.o: In function `av_log2_c': /boot/home/Development/haiku-a4/
generated/build_packages/ffmpeg-0.10.2-r1a4-x86-gcc2-2012-08-30/common/
include/libavutil/common.h:80: undefined reference to `ff_log2_tab'
collect2: ld returned 1 exit status"
- Research done to narrow down the solution space:
- ff_log2_tab is a array that is nowhere needed in the dvb.media_addon
- ff_log2_tab is defined as an extern array in the ffmpeg header file
libavutil/common.h
- ff_log2_tab is used in the inline function av_log2_c (libavutil/common.h)
which doesn't get optimized away when compiling with debug information
- MediaFormat.cpp needs only some Codec-IDs from the ffmpeg header file
avcodec.h
- The following fixes were tried:
- Trying to eliminate unused debug symbols with compilation
flag -feliminate-unused-debug-types (see gcc documentation
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Debugging-Options.html#Debugging-Options)
by adding the following lines to UserBuildConfig
AppendToConfigVar C++FLAGS : HAIKU_TOP src : -feliminate-unused-debug-types : global ;
AppendToConfigVar CCFLAGS : HAIKU_TOP src : -feliminate-unused-debug-types : global ;
-> Failed, because flag -feliminate-unused-debug-types is not supported by GCC 2.95.3
- Trying to eliminate unused debug symbols in the linker stage
-> This worked, by removing the LINKFLAG "-Xlinker --no-undefined" when
linking all objects into the dvb.media_addon we are getting our addon
with debug symbols.
- Final solution:
- Instead of adding/removing flags, we just add the missing implementation
for the ff_log2_tab array in MediaFormat.cpp. This -feels- the seems to
be the cleanest solution as it is more obvious what's goin' on compared
to hiding the solution in the Jamfile.
Signed-off-by: Colin Günther <coling@gmx.de>