FFmpeg
Data Structures | Functions | Variables
imf.c File Reference

Tests for IMF CPL and ASSETMAP processing. More...

#include "libavformat/imf_cpl.c"
#include "libavformat/imfdec.c"
#include "libavformat/mxf.h"
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  PathTypeTestStruct
 

Functions

static int test_cpl_parsing (void)
 
static int test_cpl_from_doc (FFIMFCPL **cpl, const char *cpl_doc, int should_pass)
 
static int check_asset_locator_attributes (IMFAssetLocator *asset, IMFAssetLocator *expected_asset)
 
static int test_asset_map_parsing (void)
 
static int test_path_type_functions (void)
 
int main (int argc, char *argv[])
 

Variables

const char * cpl_doc
 
const char * cpl_bad_resource_doc
 
const char * cpl_bad_empty_doc = "<Composition></Composition>"
 
const char * asset_map_doc
 
static IMFAssetLocator ASSET_MAP_EXPECTED_LOCATORS [5]
 
static const PathTypeTestStruct PATH_TYPE_TEST_STRUCTS [11]
 

Detailed Description

Tests for IMF CPL and ASSETMAP processing.

Author
Valentin Noel
Pierre-Anthony Lemieux

Definition in file imf.c.

Function Documentation

◆ test_cpl_parsing()

static int test_cpl_parsing ( void  )
static

Definition at line 331 of file imf.c.

Referenced by main().

◆ test_cpl_from_doc()

static int test_cpl_from_doc ( FFIMFCPL **  cpl,
const char *  cpl_doc,
int  should_pass 
)
static

Definition at line 387 of file imf.c.

Referenced by main().

◆ check_asset_locator_attributes()

static int check_asset_locator_attributes ( IMFAssetLocator asset,
IMFAssetLocator expected_asset 
)
static

Definition at line 414 of file imf.c.

Referenced by test_asset_map_parsing().

◆ test_asset_map_parsing()

static int test_asset_map_parsing ( void  )
static

Definition at line 454 of file imf.c.

Referenced by main().

◆ test_path_type_functions()

static int test_path_type_functions ( void  )
static

Definition at line 519 of file imf.c.

Referenced by main().

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 558 of file imf.c.

Variable Documentation

◆ cpl_doc

const char* cpl_doc

Definition at line 60 of file imf.c.

Referenced by test_cpl_from_doc(), and test_cpl_parsing().

◆ cpl_bad_resource_doc

const char* cpl_bad_resource_doc

Definition at line 221 of file imf.c.

Referenced by main().

◆ cpl_bad_empty_doc

const char* cpl_bad_empty_doc = "<Composition></Composition>"

Definition at line 260 of file imf.c.

Referenced by main().

◆ asset_map_doc

const char* asset_map_doc

Definition at line 262 of file imf.c.

Referenced by test_asset_map_parsing().

◆ ASSET_MAP_EXPECTED_LOCATORS

IMFAssetLocator ASSET_MAP_EXPECTED_LOCATORS[5]
static
Initial value:
= {
{.uuid = {0xb5, 0xd6, 0x74, 0xb8, 0xc6, 0xce, 0x4b, 0xce, 0x3b, 0xdf, 0xbe, 0x04, 0x5d, 0xfd, 0xb2, 0xd0},
.absolute_uri = (char *)"IMF_TEST_ASSET_MAP_video.mxf"},
{.uuid = {0xec, 0x34, 0x67, 0xec, 0xab, 0x2a, 0x4f, 0x49, 0xc8, 0xcb, 0x89, 0xca, 0xa3, 0x76, 0x1f, 0x4a},
.absolute_uri = (char *)"IMF_TEST_ASSET_MAP_video_1.mxf"},
{.uuid = {0x5c, 0xf5, 0xb5, 0xa7, 0x8b, 0xb3, 0x4f, 0x08, 0xea, 0xa6, 0x35, 0x33, 0xd4, 0xb7, 0x7f, 0xa6},
.absolute_uri = (char *)"IMF_TEST_ASSET_MAP_audio.mxf"},
{.uuid = {0x55, 0x97, 0x77, 0xd6, 0xec, 0x29, 0x43, 0x75, 0xf9, 0x0d, 0x30, 0x0b, 0x0b, 0xf7, 0x36, 0x86},
.absolute_uri = (char *)"CPL_IMF_TEST_ASSET_MAP.xml"},
{.uuid = {0xdd, 0x04, 0x52, 0x8d, 0x9b, 0x80, 0x45, 0x2a, 0x7a, 0x13, 0x80, 0x5b, 0x08, 0x27, 0x8b, 0x3d},
.absolute_uri = (char *)"PKL_IMF_TEST_ASSET_MAP.xml"},
}

Definition at line 441 of file imf.c.

Referenced by test_asset_map_parsing().

◆ PATH_TYPE_TEST_STRUCTS

const PathTypeTestStruct PATH_TYPE_TEST_STRUCTS[11]
static
Initial value:
= {
{.path = "file://path/to/somewhere", .is_url = 1, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "http://path/to/somewhere", .is_url = 1, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "https://path/to/somewhere", .is_url = 1, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "s3://path/to/somewhere", .is_url = 1, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "ftp://path/to/somewhere", .is_url = 1, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "/path/to/somewhere", .is_url = 0, .is_unix_absolute_path = 1, .is_dos_absolute_path = 0},
{.path = "path/to/somewhere", .is_url = 0, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
{.path = "C:\\path\\to\\somewhere", .is_url = 0, .is_unix_absolute_path = 0, .is_dos_absolute_path = 1},
{.path = "C:/path/to/somewhere", .is_url = 0, .is_unix_absolute_path = 0, .is_dos_absolute_path = 1},
{.path = "\\\\path\\to\\somewhere", .is_url = 0, .is_unix_absolute_path = 0, .is_dos_absolute_path = 1},
{.path = "path\\to\\somewhere", .is_url = 0, .is_unix_absolute_path = 0, .is_dos_absolute_path = 0},
}

Definition at line 505 of file imf.c.

Referenced by test_path_type_functions().