OSDN Git Service

stop using trunk or dist directory in rec10 project.
[rec10/rec10-git.git] / tstools / DtsEdit / src / gpac / media_tools.h
diff --git a/tstools/DtsEdit/src/gpac/media_tools.h b/tstools/DtsEdit/src/gpac/media_tools.h
deleted file mode 100644 (file)
index 2842137..0000000
+++ /dev/null
@@ -1,335 +0,0 @@
-/*\r
- *                     GPAC - Multimedia Framework C SDK\r
- *\r
- *                     Copyright (c) Jean Le Feuvre 2000-2005 \r
- *                                     All rights reserved\r
- *\r
- *  This file is part of GPAC / Authoring Tools sub-project\r
- *\r
- *  GPAC is free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU Lesser General Public License as published by\r
- *  the Free Software Foundation; either version 2, or (at your option)\r
- *  any later version.\r
- *   \r
- *  GPAC is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU Lesser General Public License for more details.\r
- *   \r
- *  You should have received a copy of the GNU Lesser General Public\r
- *  License along with this library; see the file COPYING.  If not, write to\r
- *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. \r
- *\r
- */\r
-\r
-#ifndef _GF_MEDIA_H_\r
-#define _GF_MEDIA_H_\r
-\r
-\r
-#ifdef __cplusplus\r
-extern "C" {\r
-#endif\r
-\r
-#include <gpac/isomedia.h>\r
-#include <gpac/avparse.h>\r
-\r
-/*                     \r
-                       track importers\r
-\r
-       All these can import a file into a dedicated track. If esd is NULL the track is blindly added \r
-       otherwise it is added with the requested ESID if non-0, otherwise the new trackID is stored in ESID\r
-       if use_data_ref is set, data is only referenced in the file\r
-       if duration is not 0, only the first duration seconds are imported\r
-       NOTE: if an ESD is specified, its decoderSpecificInfo is also updated\r
-*/\r
-/*track importer flags*/\r
-enum\r
-{\r
-       /*references data rather than copy, whenever possible*/\r
-       GF_IMPORT_USE_DATAREF = 1,\r
-       /*for AVI video: imports at constant FPS (eg imports N-Vops due to encoder drops)*/\r
-       GF_IMPORT_NO_FRAME_DROP = 1<<1,\r
-       /*for CMP ASP only: forces treating the input as packed bitsream and discards all n-vops*/\r
-       GF_IMPORT_FORCE_PACKED = 1<<2,\r
-       /*for AAC audio: forces SBR mode with implicit signaling (backward compatible)*/\r
-       GF_IMPORT_SBR_IMPLICIT = 1<<3,\r
-       /*for AAC audio: forces SBR mode with explicit signaling (non-backward compatible). \r
-       Will override GF_IMPORT_SBR_IMPLICIT flag when set*/\r
-       GF_IMPORT_SBR_EXPLICIT = 1<<4,\r
-       /*forces MPEG-4 import - some 3GP2 streams have both native IsoMedia sample description and MPEG-4 one possible*/\r
-       GF_IMPORT_FORCE_MPEG4 = 1<<5,\r
-       /*special flag for text import at run time (never set on probe), indicates to leave the text box empty\r
-       so that we dynamically adapt to display size*/\r
-       GF_IMPORT_SKIP_TXT_BOX = 1<<6,\r
-       /*indicates to keep unknown tracks from .MOV/.IsoMedia files*/\r
-       GF_IMPORT_KEEP_ALL_TRACKS = 1<<7,\r
-       /*uses compact size in .MOV/.IsoMedia files*/\r
-       GF_IMPORT_USE_COMPACT_SIZE = 1<<8,\r
-       \r
-       /*when set, only updates tracks info and return*/\r
-       GF_IMPORT_PROBE_ONLY    = 1<<20,\r
-       /*only set when probing, signals several frames per sample possible*/\r
-       GF_IMPORT_3GPP_AGGREGATION = 1<<21,\r
-       /*only set when probing, signals video FPS overridable*/\r
-       GF_IMPORT_OVERRIDE_FPS = 1<<22,\r
-       /*only set when probing, signals duration not usable*/\r
-       GF_IMPORT_NO_DURATION = 1<<23,\r
-       /*when set by user during import, will abort*/\r
-       GF_IMPORT_DO_ABORT = 1<<31\r
-};\r
-\r
-#define GF_IMPORT_MAX_TRACKS   100\r
-struct __track_video_info\r
-{\r
-       u32 width, height, par;\r
-       Double FPS;\r
-};\r
-struct __track_audio_info\r
-{\r
-       u32 sample_rate, nb_channels;\r
-};\r
-\r
-struct __track_import_info\r
-{\r
-       u32 track_num;\r
-       /*track type (GF_ISOM_MEDIA_****)*/\r
-       u32 type;\r
-       /*media type ('MPG1', 'MPG2', ISO 4CC, AVI 4CC)*/\r
-       u32 media_type;\r
-       /*possible import flags*/\r
-       u32 flags;\r
-       /*media format info*/\r
-       struct __track_video_info video_info;\r
-       struct __track_audio_info audio_info;\r
-\r
-       u32 lang;\r
-       /*for MPEG2 TS: program number*/\r
-       u16 prog_num;\r
-};\r
-\r
-struct __program_import_info\r
-{\r
-       u32 number;\r
-       char name[40];\r
-};\r
-\r
-/*track dumper*/\r
-typedef struct __track_import\r
-{\r
-       GF_ISOFile *dest;\r
-       /*media to import:\r
-               MP4/ISO media: trackID\r
-               AVI files: \r
-                       0: first video and first audio,\r
-                       1: video track\r
-                       2->any: audio track(s)\r
-               MPEG-PS files with N video streams: \r
-                       0: first video and first audio\r
-                       1->N: video track\r
-                       N+1->any: audio track\r
-       TrackNums can be obtain with probing\r
-       */\r
-       u32 trackID;\r
-       /*media source - selects importer type based on extension*/\r
-       char *in_name;\r
-       /*import duration if any*/\r
-       u32 duration;\r
-       /*importer flags*/\r
-       u32 flags;\r
-       /*if non 0, force video FPS (CMP, AVI, OGG, H264) - also used by SUB import*/\r
-       Double video_fps;\r
-       /*optional ESD*/\r
-       GF_ESD *esd;\r
-       /*optional format indication for media source (used in IM1)*/\r
-       char *streamFormat;\r
-       /*frame per sample cumulation (3GP media only) - MAX 15, ignored in data ref*/\r
-       u32 frames_per_sample;\r
-       /*track ID of imported media in destination file*/\r
-       u32 final_trackID;\r
-       \r
-       /*for MP4 import only*/\r
-       GF_ISOFile *orig;\r
-\r
-       /*for text import*/\r
-       u32 fontSize;\r
-       char *fontName;\r
-\r
-       /*number of tracks after probing - may be set to 0, in which case no track \r
-       selection can be performed. It may also be inaccurate if probing doesn't\r
-       detect all available tracks (cf ogg import)*/\r
-       u32 nb_tracks;\r
-       /*track info after probing (GF_IMPORT_PROBE_ONLY set).*/\r
-       struct __track_import_info tk_info[GF_IMPORT_MAX_TRACKS];\r
-\r
-       /*for MPEG-TS and similar: program names*/\r
-       u32 nb_progs;\r
-       struct __program_import_info pg_info[GF_IMPORT_MAX_TRACKS];\r
-\r
-       GF_Err last_error;\r
-} GF_MediaImporter;\r
-\r
-GF_Err gf_media_import(GF_MediaImporter *importer);\r
-\r
-enum\r
-{\r
-       /*track dumper types are formatted as flags for conveniency for \r
-       authoring tools, but never used as a OR'ed set*/\r
-       /*native format (JPG, PNG, MP3, etc) if supported*/\r
-       GF_EXPORT_NATIVE = 1,\r
-       /*raw samples (including hint tracks for rtp)*/\r
-       GF_EXPORT_RAW_SAMPLES = (1<<1),\r
-       /*NHNT format (any MPEG-4 media)*/\r
-       GF_EXPORT_NHNT = (1<<2),\r
-       /*AVI (MPEG4 video and AVC tracks only)*/\r
-       GF_EXPORT_AVI = (1<<3),\r
-       /*MP4 (all except OD)*/\r
-       GF_EXPORT_MP4 = (1<<4),\r
-       /*AVI->RAW to dump video (trackID=1) or audio (trackID>=2)*/\r
-       GF_EXPORT_AVI_NATIVE = (1<<5),\r
-       /*NHML format (any media)*/\r
-       GF_EXPORT_NHML = (1<<6),\r
-       /*SAF format*/\r
-       GF_EXPORT_SAF = (1<<7),\r
-\r
-       /*following ones are real flags*/\r
-       /*\r
-       for MP4 extraction, indicates track should be added to dest file if any\r
-       for raw extraction, indicates data shall be appended at the end of output file if present\r
-       */\r
-       GF_EXPORT_MERGE = (1<<10),\r
-       /*indicates QCP file format possible as well as native (EVRC and SMV audio only)*/\r
-       GF_EXPORT_USE_QCP = (1<<11),\r
-       /*indicates full NHML dump*/\r
-       GF_EXPORT_NHML_FULL = (1<<11),\r
-       /*ony probes extraction format*/\r
-       GF_EXPORT_PROBE_ONLY = (1<<30),\r
-       /*when set by user during export, will abort*/\r
-       GF_EXPORT_DO_ABORT = (1<<31),\r
-};\r
-\r
-/*track dumper*/\r
-typedef struct __track_exporter\r
-{\r
-       GF_ISOFile *file;\r
-       u32 trackID;\r
-       /*sample number to export for GF_EXPORT_RAW_SAMPLES only*/\r
-       u32 sample_num;\r
-       /*out name WITHOUT extension*/\r
-       char *out_name;\r
-       /*dump type*/\r
-       u32 flags;\r
-       /*non-IsoMedia file (AVI)*/\r
-       char *in_name;\r
-} GF_MediaExporter;\r
-\r
-/*if error returns same value as error signaled in message*/\r
-GF_Err gf_media_export(GF_MediaExporter *dump);\r
-\r
-\r
-\r
-/*\r
-       RTP IsoMedia file hinting\r
-*/\r
-typedef struct __tag_isom_hinter GF_RTPHinter;\r
-\r
-GF_RTPHinter *gf_hinter_track_new(GF_ISOFile *file, u32 TrackNum, \r
-                                                       u32 Path_MTU, u32 max_ptime, u32 default_rtp_rate, u32 hint_flags, u8 PayloadID, \r
-                                                       Bool copy_media, u32 InterleaveGroupID, u8 InterleaveGroupPriority, GF_Err *e);\r
-/*delete the track hinter*/\r
-void gf_hinter_track_del(GF_RTPHinter *tkHinter);\r
-/*hints all samples in the media track*/\r
-GF_Err gf_hinter_track_process(GF_RTPHinter *tkHint);\r
-/*returns media bandwidth in kbps*/\r
-u32 gf_hinter_track_get_bandwidth(GF_RTPHinter *tkHinter);\r
-/*retrieves hinter flags*/\r
-u32 gf_hinter_track_get_flags(GF_RTPHinter *tkHinter);\r
-/*retrieves rtp payload name \r
-       @payloadName: static buffer for retrieval, minimum 30 bytes\r
-*/\r
-void gf_hinter_track_get_payload_name(GF_RTPHinter *tkHint, char *payloadName);\r
-\r
-/*finalizes hinting process for the track (setup flags, write SDP for RTP, ...)\r
-       @AddSystemInfo: if non-0, systems info are duplicated in the SDP (decoder cfg, PL IDs ..)\r
-*/\r
-GF_Err gf_hinter_track_finalize(GF_RTPHinter *tkHint, Bool AddSystemInfo);\r
-\r
-/*SDP IOD flag*/\r
-enum\r
-{\r
-       /*no IOD included*/\r
-       GF_SDP_IOD_NONE = 0,\r
-       /*base64 encoding of the regular MPEG-4 IOD*/\r
-       GF_SDP_IOD_REGULAR,\r
-       /*base64 encoding of IOD containing BIFS and OD tracks (one AU only) - this is used for ISMA 1.0 profiles\r
-       note that the "hinted" file will loose all systems info*/\r
-       GF_SDP_IOD_ISMA,\r
-       /*same as ISMA but removes all clock references from IOD*/\r
-       GF_SDP_IOD_ISMA_STRICT,\r
-};\r
-\r
-/*finalizes hinting process for the file (setup flags, write SDP for RTP, ...)\r
-       @IOD_Profile: see above\r
-       @bandwidth: total bandwidth in kbps of all hinted tracks, 0 means no bandwidth info at session level\r
-*/\r
-GF_Err gf_hinter_finalize(GF_ISOFile *file, u32 IOD_Profile, u32 bandwidth);\r
-\r
-\r
-/*returns TRUE if the encoded data fits in an ESD url - streamType is the systems stream type needed to\r
-signal data mime-type (OD, BIFS or any) */\r
-Bool gf_hinter_can_embbed_data(char *data, u32 data_size, u32 streamType);\r
-\r
-/*save file as fragmented movie*/\r
-GF_Err gf_media_fragment_file(GF_ISOFile *input, char *output_file, Double MaxFragmentDuration);\r
-\r
-/*adds chapter info contained in file - import_fps is optional (most formats don't use it), defaults to 25*/\r
-GF_Err gf_media_import_chapters(GF_ISOFile *file, char *chap_file, Double import_fps);\r
-\r
-\r
-/*make the file ISMA compliant: creates ISMA BIFS / OD tracks if needed, and update audio/video IDs\r
-the file should not contain more than one audio and one video track\r
-@keepImage: if set, generates system info if image is found - only used for image imports\r
-*/\r
-GF_Err gf_media_make_isma(GF_ISOFile *mp4file, Bool keepESIDs, Bool keepImage, Bool no_ocr);\r
-\r
-/*make the file 3GP compliant && sets profile\r
-*/\r
-GF_Err gf_media_make_3gpp(GF_ISOFile *mp4file);\r
-\r
-/*make the file playable on a PSP\r
-*/\r
-GF_Err gf_media_make_psp(GF_ISOFile *mp4file);\r
-\r
-/*creates (if needed) a GF_ESD for the given track - THIS IS RESERVED for local playback\r
-only, since the OTI used when emulated is not standard...*/\r
-GF_ESD *gf_media_map_esd(GF_ISOFile *mp4, u32 track);\r
-\r
-/*changes pixel aspect ratio for visual tracks if supported. Negative values remove any PAR info*/\r
-GF_Err gf_media_change_par(GF_ISOFile *file, u32 track, s32 ar_num, s32 ar_den);\r
-\r
-\r
-/*SAF Multiplexer object. The multiplexer supports concurencial (multi-threaded) access*/\r
-typedef struct __saf_muxer GF_SAFMuxer;\r
-/*SAF Multiplexer constructor*/\r
-GF_SAFMuxer *gf_saf_mux_new();\r
-/*SAF Multiplexer destructor*/\r
-void gf_saf_mux_del(GF_SAFMuxer *mux);\r
-/*adds a new stream in the SAF multiplex*/\r
-GF_Err gf_saf_mux_stream_add(GF_SAFMuxer *mux, u32 stream_id, u32 ts_res, u32 buffersize_db, u8 stream_type, u8 object_type, char *mime_type, char *dsi, u32 dsi_len, char *remote_url);\r
-/*removes a stream from the SAF multiplex*/\r
-GF_Err gf_saf_mux_stream_rem(GF_SAFMuxer *mux, u32 stream_id);\r
-/*adds an AU to the given stream. !!AU data will be freed by the multiplexer!! \r
-AUs are not reinterleaved based on their CTS, in order to enable audio interleaving\r
-*/\r
-GF_Err gf_saf_mux_add_au(GF_SAFMuxer *mux, u32 stream_id, u32 CTS, char *data, u32 data_len, Bool is_rap);\r
-/*gets the content of the multiplexer for the given time.\r
-if force_end_of_session is set, this flushes the SAF Session - no more operations will be allowed on the muxer*/\r
-GF_Err gf_saf_mux_for_time(GF_SAFMuxer *mux, u32 time_ms, Bool force_end_of_session, char **out_data, u32 *out_size);\r
-\r
-\r
-#ifdef __cplusplus\r
-}\r
-#endif\r
-\r
-\r
-#endif /*_GF_MEDIA_H_*/\r
-\r