summaryrefslogtreecommitdiffstats
path: root/libhb/decmetadata.c
Commit message (Collapse)AuthorAgeFilesLines
* libhb: add experimental avformat muxer for mkv and mp4jstebbins2013-06-301-1/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated all the copyright headers to 2013.sr552013-03-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve management of titles and jobsjstebbins2012-11-121-31/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up several several unavoidable memory leaks caused by old api. Clearly separates titles from jobs. Titles are set during scan and never modified now. Since titles are immutable, this lead to API some changes. For example, We were setting chapter names in the title from the front ends. Now these get set in the job. These new APIs allow us to start moving away from our use of title->job. Eventually, I would like to eliminate title->job completely, but the mac ui is too tightly tied to using this field to allow removing it at this time. So there is temporarily a convenience function used only by the mac ui that allows it to continue using title->job and also use the new APIs. New APIs: typedef struct hb_title_set_s hb_title_set_t; struct hb_title_set_s { hb_list_t * list_title; int feature; // Detected DVD feature title }; hb_title_set_t * hb_get_title_set( hb_handle_t * ); This is just something I added to clean up how "feature title" info is passed. hb_job_t * hb_job_init( hb_title_t * title ); Initializes a new job with default settings from the title. hb_job_t * hb_job_init_by_index( hb_handle_t *h, int title_index ); Same as hb_job_init(). For use by win Interop lib. void hb_job_reset( hb_job_t * job ); Convenience function for the MacUi. Clears audio, subtitle, and filter lists. The macui still uses title->job because it is so intricately tied to it. So I created this convenience function that it can call after adding a job. void hb_job_close( hb_job_t ** job ); Releases the job an all resources it contains. void hb_job_set_advanced_opts( hb_job_t *job, const char *advanced_opts ); Makes a copy of "advanced_opts" and stores in job. Freed by hb_job_close(). void hb_job_set_file( hb_job_t *job, const char *file ); Makes a copy of "file" and stores in job. Freed by hb_job_close(). void hb_chapter_set_title(hb_chapter_t *chapter, const char *title); Makes a copy of "title" and stores in chapter. Freed by hb_chapter_close(). Recommended usage (cli and lingui are updated to do this): job = hb_job_init( title ); // set job settings ... hb_add(h, job); hb_job_close( &job ); I have also added new APIs for managing metadata. These are used to add metadata to a job. void hb_metadata_set_name( hb_metadata_t *metadata, const char *name ); void hb_metadata_set_artist( hb_metadata_t *metadata, const char *artist ); void hb_metadata_set_composer( hb_metadata_t *metadata, const char *composer ); void hb_metadata_set_release_date( hb_metadata_t *metadata, const char *release_date ); void hb_metadata_set_comment( hb_metadata_t *metadata, const char *comment ); void hb_metadata_set_genre( hb_metadata_t *metadata, const char *genre ); void hb_metadata_set_album( hb_metadata_t *metadata, const char *album ); void hb_metadata_set_coverart( hb_metadata_t *metadata, const uint8_t *coverart, int size ); Example: job = hb_job_init( &job ); // set job settings ... hb_metadata_set_artist( job->metadata, "Danny Elfman" ); hb_add(h, job); hb_job_close( &job ); Some APIs have changed in order to avoid using title incorrectly and use the new hb_title_set_t. -void hb_autopassthru_apply_settings( hb_job_t * job, hb_title_t * title ); +void hb_autopassthru_apply_settings( hb_job_t * job ); -void hb_get_preview( hb_handle_t *, hb_title_t *, int, uint8_t * ); +void hb_get_preview( hb_handle_t *, hb_job_t *, int, uint8_t * ); hb_thread_t * hb_scan_init( hb_handle_t *, volatile int * die, const char * path, int title_index, - hb_list_t * list_title, int preview_count, + hb_title_set_t * title_set, int preview_count, int store_previews, uint64_t min_duration ); These APIs have been removed. Win Interop will need some changes. I think what I've provided will be suffecient, but let me know if it's not. -void hb_get_preview_by_index( hb_handle_t *, int, int, uint8_t * ); -void hb_set_anamorphic_size_by_index( hb_handle_t *, int, - int *output_width, int *output_height, - int *output_par_width, int *output_par_height ); git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5058 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: if no source chapter name information is available, set default ↵Rodeo2012-05-031-7/+19
| | | | | | | | | | | | | | chapters names explicitly (rather than leaving it to the interfaces). Standardize calculation of chapter->hours, chapter->minutes and chapter->seconds across all sources. Get rid of an unused variable in libhb/dvd.c Ignore chapter names set by MakeMKV. "Chapter 1" is just as good as, if not better than "Chapter 01" or even "Chapter 00". git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4636 b64f7644-9d1e-0410-96f1-a4d463321fa5
* batch file scanning and scan canceljstebbins2009-11-251-1/+1
| | | | | | | | | | When a directory is specified as the source, first we attempt to open as a dvd, then if that fails, we attempt to open each file in the directory as a stream source. Since opening a large directory of files can take a really long time, you can also now cancel a scan. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2980 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - cleanup gcc format warnings showing up on linux 64-bitkonablend2009-06-251-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2619 b64f7644-9d1e-0410-96f1-a4d463321fa5
* mp4 cleanupskonablend2009-05-291-7/+7
| | | | | | | | | - removed unused ipoutil.cpp; has been incorporated into mp4v2 some time ago. - changed hard-coded buffer sizes to use sizeof. - bump mp4v2 r349 -> r355; has bugfixes which prevents read-in errors. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2462 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libmp4v2 r224 ->r286; chunk duration; tags; cover-artkonablend2009-04-211-94/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | The major changes to libmp4v2 include the new Tags API for iTunes metadata management and new API to set track chunk duration limits. Additionally, the patches for libmp4v2 are no longer required and libmp4v2 should build significantly faster as it now enabled precompiled headers on various platforms. Tags API effects common.h, decmetdata.c and muxmp4.c and replaces the operations in a near 1:1 mapping for functionality except all access happens in between alloc/fetch and store/free pattern. libhb no longer checks the bits of cover-art in order to determine image type. That functionality is now delegated to libmp4v2; and libhb identify_art_type() has been removed accordingly. Chunk duration support has been added which makes use of new API from libmp4v2: MP4SetTrackDurationPerChunk( MP4File, MP4TrackId ); And muxmp4 adds new internal function MP4TuneTrackDurationPerChunk() which is invoked after all video/audio track creation which tunes chunk duration to the equivalent of 4-frames in track timescale; as per van's suggestion. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2347 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This patch adds mingw32 cross-compilation support to HandBrake trunk tokonablend2009-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | produce native win32 binaries. The main benefits are the binary does not have any Cygwin runtime requirements and various host platforms can be leveraged to build HandBrake. Cross-compilation toolchains are complex to setup and recommended for experts only; but once setup it can build at speeds similar to native builds, on Darwin or Linux. BUILD INSTRUCTIONS: Add mingw32 toolchain to beginning of your path and take the toolchain prefix from gcc (eg: i386-mingw32-gcc) and pass to configure: ./configure --cross=i386-ming32 PRODUCTS: - hb.lib (static library) - HandBrakeCLI.exe DOWNLOADS: Contrib downloads need to be seeded with: - pthreads-w32-2-8-0-release.tar.gz (new) - xvidcore-20090311.tar.gz SUMMARY: Specifically, all GUI trees are not impacted. configure - added --cross=PREFIX - reworked search for gcc and cross-compile related tools to use prefix contrib/ - sub-patches added as needed for mingw contrib/xvidcore/ - bumped from 1.1.3 -> 1.2.1+ (daily 20090311) - reconstituted P01-cygwin.patch - created new P00-darwin.patch needed for macho64 asm flag on x86_64 arch libhb/ - uint -> uint32_t - remaining changes guarded by mingw32 macro. test/ - modified to support pthread-compatibility library attach/detach. - all changes guarded by mingw32 macro. BRANCHES: source: https://hbfork.googlecode.com/svn/branches/mingw@28 target: svn://svn.handbrake.fr/HandBrake/trunk@2325 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2326 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add importing of ffmpeg input chapters.ritsuka2009-01-141-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2082 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add metadata support to libhb, add importing of MP4 metadata, add export of ↵eddyg2008-12-021-0/+191
MP4 metadata, add importing of MP4 chapters, add seek to chapter for input files, add new libmp4v2, remove old MP4 chapter muxing - now in libmp4v2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1987 b64f7644-9d1e-0410-96f1-a4d463321fa5