History log of /haiku/src/apps/mediaconverter/MediaConverterApp.cpp
Revision Date Author Comments
# 37d99b7e 21-Mar-2023 Emir SARI <bitigchi@me.com>

NumberFormat: Fix incorrect fallback logic

We need to assign the fallback value to the temporary variable,
otherwise there is a broken if logic in case the percent is not
formattable.

Change-Id: I90593fdf8ec29b802dff02c2fbe5d7ac40cea2ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6238
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# aa3f526b 20-Mar-2023 Emir SARI <bitigchi@me.com>

MediaConverter: Fix incorrect string break

Change-Id: I00c7b6d4154087e1fdb3cf469ffbf80c2a470ecc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6234
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 30456952 13-Mar-2023 Emir SARI <bitigchi@me.com>

MediaConverter: Use BNumberFormat for percentage value

This provides automatic percentage formatting according to the locale
setting.

Also replaces some occurences of sprintf with SetToFormat.

Change-Id: I330aaebfe4615f4b40b00bd04f83a1a6d8efd6a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6204
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 81f94bfd 22-Dec-2022 PulkoMandy <pulkomandy@pulkomandy.tk>

mediaconverter: fix memory leak

If the file has multiple audio or video tracks, only one is converted.
But in this case there would be memory leaks of various objects for the
other (unused) tracks. Fix this for now by allowing only the first track
of each type to be used. Ideally, MediaConverter should allow converting
all tracks or selecting which ones to keep.

Change-Id: I78c0c31648c80c7760dd68b3b4f64537ad2cee88
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5744
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# ab05d368 17-Mar-2019 sushilhub <sushil.bit.cse@gmail.com>

src/apps: style fixes

* add break statement to the last clause of switch/cases
* fix some other minor issues

Change-Id: I9ac3dac0cda0b14043b975938caea88b79bb749f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1299
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 7457ccb4 13-Aug-2018 Augustin Cavalier <waddlesplash@gmail.com>

BMessageFormat: Rename to BStringFormat.

The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.

OK'ed by PulkoMandy and Humdinger.


# 9f9afda5 18-Jul-2018 Murai Takashi <tmurai01@gmail.com>

Mediaconverter: Suppress warnings

Use media_format.Clear() to suppress -Werror=class-memaccess
pointed out by gcc8.

Change-Id: I810cfac2db78914059bdd4ddb29d2eb0bccd9650


# aa033e34 30-Jun-2018 Augustin Cavalier <waddlesplash@gmail.com>

MediaConverter: Fix some "Looper must be locked" assert failure crashes.

Not sure how these cases were never hit before, but I ran into them
when testing MediaConverter...


# fdd3fd9e 07-Mar-2017 Vivek Roy <vivekroy@outlook.com>

MediaConvert: Added error messages

... when converted file cannot be writen to destination

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12334.


# 974595bc 23-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: let the encoder make changes to the format

If the encoder decides to change the media format, we need to tell the
encoder as well so it uses the same format.


# b65265eb 23-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: fix off-by-one frame limit

This would lead to an attempt to read beyond the track end, making
MediaTrack return an error, and finally causing MediaConverter to not
flush the end of the encoded file to disk properly.


# 03ad73fc 24-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

More uses of BMessageFormat

ZipOMatic, DiskUsage, MediaConverter, MediaPlayer, ShowImage,
WebPositive, Screen preferences, Tracker, string_for_size.

Thanks to KapiX for reporting those!


# 0c90c6d7 18-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: style fixes.


# 7f4d1af4 04-Jan-2013 Sergei Reznikov <diver@gelios.net>

Compilation fixes for x86_64.

Added quite a few missing components to image:

alert arp bc CortexAddOnHost

CDPlayer CharacterMap DeskCalc
Devices DiskUsage Expander LaunchBox MediaConverter NetworkStatus
PoorMan Pulse Screenshot ShowImage SoundRecorder TV Workspaces

DataTranslations Media Printers ScreenSaver

BSnow Cortex FontDemo OverlayImage Pairs

cddb_daemon midi_server power_daemon print_server print_addon_server

Canon LIPS3 Compatible Canon LIPS4 Compatible Gutenprint
PCL5 Compatible PCL6 Compatible PDF Writer PS Compatible

libgame.so libmedia.so

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>


# aed35104 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 5c6b9eb0 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# feacc2de 08-Mar-2011 Stephan Aßmus <superstippi@gmx.de>

Patch by starsseed from ticket #7341: Use correct format strings
in sprintf() invokations, specifically to avoid reading more
bytes than are contained in the passed arguments. Thanks! Small
cleanups of the touced code by myself included.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 007d8a0c 15-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Yet anothert localization patch from Jorma Karvonen. This one fixes #7116.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae0f70fc 29-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Dziadek : localize MediaConverter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40023 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f086ada7 15-Dec-2010 Stephan Aßmus <superstippi@gmx.de>

* Applied patch from Barrett (ticket #6497) which fixes some issues
with the previous patch from him.
* More cleanup by myself in MediaConverterWindow::MessageReceived(),
no functional changes intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd55ed1a 24-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

*Update MediaConverter to use the Layout API
*Replace StatusView class with BStringView
*Rename some variables (fBox1 -> fSourcesBox, for example)
*Create MediaFileInfo struct to cache strings for media files, these were
previously created on each call to MediaFileInfoView::Draw()
*Update MediaFileInfoView class for layout-friendliness and hopefully
better performance.
*Update other classes for layout-friendliness as well (just remove BRect and
resizeFlags params)
*Add keyboard accels for Open and Quit items in menuBar
*closes #4197
*fixes CIDs 1545 and 1455



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38346 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c992a52 03-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed GCC4 build and added handling of allocation failures in
some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ed248f6 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

This should transfer the display aspect ratio correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae8e567a 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Auto white-space cleanup.
* Do not override pixel aspect unnecessarily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6af4da5d 21-Jun-2007 Stephan Aßmus <superstippi@gmx.de>

* added MediaConverter, the improved version by Jun Suzuki, to the source tree
* I completely rearranged the source and fixed a few bugs, one of which
prevented me to use this tool to convert some XViD encoded AVIs that had
sound to PJPEG encoding.
* it is currently agreed to have this in the source, but not on the image yet,
the MediaKit doesn't support writing anyways as of now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21489 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 974595bc4673e6e443ae7b6c775cf9461ff2f23d 23-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: let the encoder make changes to the format

If the encoder decides to change the media format, we need to tell the
encoder as well so it uses the same format.


# b65265eb5c0a888655555fbc1b0144e5a4e90a6a 23-Dec-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: fix off-by-one frame limit

This would lead to an attempt to read beyond the track end, making
MediaTrack return an error, and finally causing MediaConverter to not
flush the end of the encoded file to disk properly.


# 03ad73fc872d7a350989e7bb7dd10b9e2b1e5882 24-Nov-2014 Adrien Destugues <pulkomandy@gmail.com>

More uses of BMessageFormat

ZipOMatic, DiskUsage, MediaConverter, MediaPlayer, ShowImage,
WebPositive, Screen preferences, Tracker, string_for_size.

Thanks to KapiX for reporting those!


# 0c90c6d7e5cf3cf13af036e8ad50d082bc8982eb 18-Oct-2014 Adrien Destugues <pulkomandy@gmail.com>

MediaConverter: style fixes.


# 7f4d1af49dd1d67ecbf1d934eddd92cae7c4c558 04-Jan-2013 Sergei Reznikov <diver@gelios.net>

Compilation fixes for x86_64.

Added quite a few missing components to image:

alert arp bc CortexAddOnHost

CDPlayer CharacterMap DeskCalc
Devices DiskUsage Expander LaunchBox MediaConverter NetworkStatus
PoorMan Pulse Screenshot ShowImage SoundRecorder TV Workspaces

DataTranslations Media Printers ScreenSaver

BSnow Cortex FontDemo OverlayImage Pairs

cddb_daemon midi_server power_daemon print_server print_addon_server

Canon LIPS3 Compatible Canon LIPS4 Compatible Gutenprint
PCL5 Compatible PCL6 Compatible PDF Writer PS Compatible

libgame.so libmedia.so

Signed-off-by: Alex Smith <alex@alex-smith.me.uk>


# aed35104852941f0f6f3d1dcc5338b5f337d0a3c 05-Aug-2012 Humdinger <humdingerb@gmail.com>

Close alerts with ESCAPE key.

Added SetFlags(B_CLOSE_ON_ESCAPE) or SetShortcut(index, B_ESCAPE) to BAlerts
depending if the result gets used later in the code, or if it's a one-button
BAlert.


# 546208a53940a26c6379c48a7854ade1a8250fc5 16-Apr-2012 Oliver Tappe <zooey@hirschkaefer.de>

More catalog-related cleanup.

* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.


# 5c6b9eb00d0d623c12f72eb82a471cb4c71f4f33 23-Feb-2012 Jerome Duval <jerome.duval@gmail.com>

Some fixes for GCC 4.6 warning: variable set but not used


# feacc2de79ad5795fb6d77d591e9fca3b06964b8 08-Mar-2011 Stephan Aßmus <superstippi@gmx.de>

Patch by starsseed from ticket #7341: Use correct format strings
in sprintf() invokations, specifically to avoid reading more
bytes than are contained in the passed arguments. Thanks! Small
cleanups of the touced code by myself included.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40876 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 007d8a0cea3526b534405e1ff8fdc2302f5d15be 15-Feb-2011 Siarzhuk Zharski <zharik@gmx.li>

Yet anothert localization patch from Jorma Karvonen. This one fixes #7116.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40512 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae0f70fc695d90cf25dabb12504c23b3a5fa5c2b 29-Dec-2010 Adrien Destugues <pulkomandy@pulkomandy.ath.cx>

Patch by Dziadek : localize MediaConverter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40023 a95241bf-73f2-0310-859d-f6bbb57e9c96


# f086ada784c0a90b12dfa682eea871fb2106a0a9 15-Dec-2010 Stephan Aßmus <superstippi@gmx.de>

* Applied patch from Barrett (ticket #6497) which fixes some issues
with the previous patch from him.
* More cleanup by myself in MediaConverterWindow::MessageReceived(),
no functional changes intended.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39853 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dd55ed1aefdc5ef51ab24b8783af3dd9ffc7ca31 24-Aug-2010 Alex Wilson <yourpalal2@gmail.com>

*Update MediaConverter to use the Layout API
*Replace StatusView class with BStringView
*Rename some variables (fBox1 -> fSourcesBox, for example)
*Create MediaFileInfo struct to cache strings for media files, these were
previously created on each call to MediaFileInfoView::Draw()
*Update MediaFileInfoView class for layout-friendliness and hopefully
better performance.
*Update other classes for layout-friendliness as well (just remove BRect and
resizeFlags params)
*Add keyboard accels for Open and Quit items in menuBar
*closes #4197
*fixes CIDs 1545 and 1455



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38346 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1c992a5285e0c881abfbba1de9d9de04f85ed790 03-Aug-2009 Stephan Aßmus <superstippi@gmx.de>

Fixed GCC4 build and added handling of allocation failures in
some places.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32068 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0ed248f69d13d9e5003b68314d4d1d862d8a4c94 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

This should transfer the display aspect ratio correctly...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32051 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ae8e567a34a90cd5297934043d7e9a0fc1be781d 31-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

* Auto white-space cleanup.
* Do not override pixel aspect unnecessarily.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 6af4da5dcbc291265146f6cd6b6c7708d7d99a44 21-Jun-2007 Stephan Aßmus <superstippi@gmx.de>

* added MediaConverter, the improved version by Jun Suzuki, to the source tree
* I completely rearranged the source and fixed a few bugs, one of which
prevented me to use this tool to convert some XViD encoded AVIs that had
sound to PJPEG encoding.
* it is currently agreed to have this in the source, but not on the image yet,
the MediaKit doesn't support writing anyways as of now


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21489 a95241bf-73f2-0310-859d-f6bbb57e9c96