FFmpeg
|
Implements IMP CPL processing. More...
#include "imf.h"
#include "libavutil/bprint.h"
#include "libavutil/error.h"
#include "libavutil/mem.h"
#include <libxml/parser.h>
Go to the source code of this file.
Functions | |
xmlNodePtr | ff_imf_xml_get_child_element_by_name (xmlNodePtr parent, const char *name_utf8) |
Returns the first child element with the specified local name. More... | |
int | ff_imf_xml_read_uuid (xmlNodePtr element, AVUUID uuid) |
Reads a UUID from an XML element. More... | |
int | ff_imf_xml_read_rational (xmlNodePtr element, AVRational *rational) |
Reads an AVRational from an XML element. More... | |
int | ff_imf_xml_read_uint32 (xmlNodePtr element, uint32_t *number) |
Reads an unsigned 32-bit integer from an XML element. More... | |
static int | ff_imf_xml_read_boolean (xmlNodePtr element, int *value) |
static void | imf_base_virtual_track_init (FFIMFBaseVirtualTrack *track) |
static void | imf_marker_virtual_track_init (FFIMFMarkerVirtualTrack *track) |
static void | imf_trackfile_virtual_track_init (FFIMFTrackFileVirtualTrack *track) |
static void | imf_base_resource_init (FFIMFBaseResource *rsrc) |
static void | imf_marker_resource_init (FFIMFMarkerResource *rsrc) |
static void | imf_marker_init (FFIMFMarker *marker) |
static void | imf_trackfile_resource_init (FFIMFTrackFileResource *rsrc) |
static int | fill_content_title (xmlNodePtr cpl_element, FFIMFCPL *cpl) |
static int | digit_to_int (char digit) |
static int | parse_cpl_tc_type (const char *s, int *tc_comps) |
Parses a string that conform to the TimecodeType used in IMF CPL and defined in SMPTE ST 2067-3. More... | |
static int | fill_timecode (xmlNodePtr cpl_element, FFIMFCPL *cpl) |
static int | fill_edit_rate (xmlNodePtr cpl_element, FFIMFCPL *cpl) |
static int | fill_id (xmlNodePtr cpl_element, FFIMFCPL *cpl) |
static int | fill_marker (xmlNodePtr marker_elem, FFIMFMarker *marker) |
static int | fill_base_resource (void *log_ctx, xmlNodePtr resource_elem, FFIMFBaseResource *resource, FFIMFCPL *cpl) |
static int | fill_trackfile_resource (void *log_ctx, xmlNodePtr tf_resource_elem, FFIMFTrackFileResource *tf_resource, FFIMFCPL *cpl) |
static int | fill_marker_resource (void *log_ctx, xmlNodePtr marker_resource_elem, FFIMFMarkerResource *marker_resource, FFIMFCPL *cpl) |
static int | push_marker_sequence (void *log_ctx, xmlNodePtr marker_sequence_elem, FFIMFCPL *cpl) |
static int | has_stereo_resources (xmlNodePtr element) |
static int | push_main_audio_sequence (void *log_ctx, xmlNodePtr audio_sequence_elem, FFIMFCPL *cpl) |
static int | push_main_image_2d_sequence (void *log_ctx, xmlNodePtr image_sequence_elem, FFIMFCPL *cpl) |
static int | fill_virtual_tracks (void *log_ctx, xmlNodePtr cpl_element, FFIMFCPL *cpl) |
int | ff_imf_parse_cpl_from_xml_dom (void *log_ctx, xmlDocPtr doc, FFIMFCPL **cpl) |
Parse an IMF CompositionPlaylist element into the FFIMFCPL data structure. More... | |
static void | imf_marker_free (FFIMFMarker *marker) |
static void | imf_marker_resource_free (FFIMFMarkerResource *rsrc) |
static void | imf_marker_virtual_track_free (FFIMFMarkerVirtualTrack *vt) |
static void | imf_trackfile_virtual_track_free (FFIMFTrackFileVirtualTrack *vt) |
static void | imf_cpl_init (FFIMFCPL *cpl) |
FFIMFCPL * | ff_imf_cpl_alloc (void) |
Allocates and initializes an FFIMFCPL data structure. More... | |
void | ff_imf_cpl_free (FFIMFCPL *cpl) |
Deletes an FFIMFCPL data structure previously instantiated with ff_imf_cpl_alloc(). More... | |
int | ff_imf_parse_cpl (void *log_ctx, AVIOContext *in, FFIMFCPL **cpl) |
Parse an IMF Composition Playlist document into the FFIMFCPL data structure. More... | |
Implements IMP CPL processing.
Definition in file imf_cpl.c.
xmlNodePtr ff_imf_xml_get_child_element_by_name | ( | xmlNodePtr | parent, |
const char * | name_utf8 | ||
) |
Returns the first child element with the specified local name.
Definition at line 59 of file imf_cpl.c.
Referenced by fill_base_resource(), fill_content_title(), fill_edit_rate(), fill_id(), fill_marker(), fill_timecode(), fill_trackfile_resource(), fill_virtual_tracks(), parse_imf_asset_map_from_xml_dom(), push_main_audio_sequence(), push_main_image_2d_sequence(), and push_marker_sequence().
int ff_imf_xml_read_uuid | ( | xmlNodePtr | element, |
AVUUID | uuid | ||
) |
Reads a UUID from an XML element.
Definition at line 73 of file imf_cpl.c.
Referenced by fill_id(), fill_trackfile_resource(), parse_imf_asset_map_from_xml_dom(), push_main_audio_sequence(), push_main_image_2d_sequence(), and push_marker_sequence().
int ff_imf_xml_read_rational | ( | xmlNodePtr | element, |
AVRational * | rational | ||
) |
Reads an AVRational from an XML element.
Definition at line 88 of file imf_cpl.c.
Referenced by fill_base_resource(), and fill_edit_rate().
int ff_imf_xml_read_uint32 | ( | xmlNodePtr | element, |
uint32_t * | number | ||
) |
Reads an unsigned 32-bit integer from an XML element.
Definition at line 100 of file imf_cpl.c.
Referenced by fill_base_resource(), and fill_marker().
|
static |
Definition at line 112 of file imf_cpl.c.
Referenced by fill_timecode().
|
static |
Definition at line 128 of file imf_cpl.c.
Referenced by imf_marker_virtual_track_init(), and imf_trackfile_virtual_track_init().
|
static |
Definition at line 133 of file imf_cpl.c.
Referenced by push_marker_sequence().
|
static |
Definition at line 140 of file imf_cpl.c.
Referenced by push_main_audio_sequence(), and push_main_image_2d_sequence().
|
static |
Definition at line 148 of file imf_cpl.c.
Referenced by imf_marker_resource_init(), and imf_trackfile_resource_init().
|
static |
Definition at line 156 of file imf_cpl.c.
Referenced by push_marker_sequence().
|
static |
Definition at line 163 of file imf_cpl.c.
Referenced by fill_marker_resource().
|
static |
Definition at line 170 of file imf_cpl.c.
Referenced by push_main_audio_sequence(), and push_main_image_2d_sequence().
|
static |
Definition at line 176 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
|
static |
Definition at line 193 of file imf_cpl.c.
Referenced by parse_cpl_tc_type().
|
static |
Parses a string that conform to the TimecodeType used in IMF CPL and defined in SMPTE ST 2067-3.
[in] | s | string to parse |
[out] | tc_comps | pointer to an array of 4 integers where the parsed HH, MM, SS and FF fields of the timecode are returned. |
Definition at line 208 of file imf_cpl.c.
Referenced by fill_timecode().
|
static |
Definition at line 229 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
|
static |
Definition at line 272 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
|
static |
Definition at line 282 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
|
static |
Definition at line 292 of file imf_cpl.c.
Referenced by fill_marker_resource().
|
static |
Definition at line 323 of file imf_cpl.c.
Referenced by fill_marker_resource(), and fill_trackfile_resource().
|
static |
Definition at line 373 of file imf_cpl.c.
Referenced by push_main_audio_sequence(), and push_main_image_2d_sequence().
|
static |
Definition at line 397 of file imf_cpl.c.
Referenced by push_marker_sequence().
|
static |
Definition at line 438 of file imf_cpl.c.
Referenced by fill_virtual_tracks().
|
static |
Definition at line 509 of file imf_cpl.c.
Referenced by push_main_image_2d_sequence().
|
static |
Definition at line 525 of file imf_cpl.c.
Referenced by fill_virtual_tracks().
|
static |
Definition at line 611 of file imf_cpl.c.
Referenced by fill_virtual_tracks().
|
static |
Definition at line 693 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
int ff_imf_parse_cpl_from_xml_dom | ( | void * | log_ctx, |
xmlDocPtr | doc, | ||
FFIMFCPL ** | cpl | ||
) |
Parse an IMF CompositionPlaylist element into the FFIMFCPL data structure.
[in] | log_ctx | Logging context (points to an instance of AVClass). May be NULL. |
[in] | doc | An XML document from which the CPL is read. |
[out] | cpl | Pointer to a memory area (allocated by the client), where the function writes a pointer to the newly constructed FFIMFCPL structure (or NULL if the CPL could not be parsed). The client is responsible for freeing the FFIMFCPL structure using ff_imf_cpl_free(). |
Definition at line 745 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl(), test_cpl_from_doc(), and test_cpl_parsing().
|
static |
Definition at line 790 of file imf_cpl.c.
Referenced by imf_marker_resource_free().
|
static |
Definition at line 798 of file imf_cpl.c.
Referenced by imf_marker_virtual_track_free().
|
static |
Definition at line 807 of file imf_cpl.c.
Referenced by ff_imf_cpl_free().
|
static |
Definition at line 816 of file imf_cpl.c.
Referenced by ff_imf_cpl_free().
|
static |
Definition at line 823 of file imf_cpl.c.
Referenced by ff_imf_cpl_alloc().
FFIMFCPL* ff_imf_cpl_alloc | ( | void | ) |
Allocates and initializes an FFIMFCPL data structure.
Definition at line 835 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom().
void ff_imf_cpl_free | ( | FFIMFCPL * | cpl | ) |
Deletes an FFIMFCPL data structure previously instantiated with ff_imf_cpl_alloc().
[in] | cpl | The FFIMFCPL structure to delete. |
Definition at line 846 of file imf_cpl.c.
Referenced by ff_imf_parse_cpl_from_xml_dom(), imf_close(), test_cpl_from_doc(), and test_cpl_parsing().
int ff_imf_parse_cpl | ( | void * | log_ctx, |
AVIOContext * | in, | ||
FFIMFCPL ** | cpl | ||
) |
Parse an IMF Composition Playlist document into the FFIMFCPL data structure.
[in] | log_ctx | Logging context (points to an instance of AVClass). May be NULL. |
[in] | in | The context from which the CPL is read. |
[out] | cpl | Pointer to a memory area (allocated by the client), where the function writes a pointer to the newly constructed FFIMFCPL structure (or NULL if the CPL could not be parsed). The client is responsible for freeing the FFIMFCPL structure using ff_imf_cpl_free(). |
Definition at line 875 of file imf_cpl.c.
Referenced by imf_read_header().