diff options
| author | jhurst <jhurst@cinecert.com> | 2012-03-16 00:28:23 +0000 |
|---|---|---|
| committer | jhurst <> | 2012-03-16 00:28:23 +0000 |
| commit | aac3cfda50b82f7b763b69b9acfcc4d63c81d98b (patch) | |
| tree | 60d819d1c568564e926a34488e69dd574bf11580 /src/AS_DCP_internal.h | |
| parent | e511dc66f4a9c9278964d89a85662fcd9bfb18ac (diff) | |
as-02ooooooooooo!
Diffstat (limited to 'src/AS_DCP_internal.h')
| -rwxr-xr-x | src/AS_DCP_internal.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/AS_DCP_internal.h b/src/AS_DCP_internal.h index dd21f0d..082cd83 100755 --- a/src/AS_DCP_internal.h +++ b/src/AS_DCP_internal.h @@ -55,6 +55,30 @@ namespace ASDCP { void default_md_object_init(); + // + static std::vector<int> + version_split(const char* str) + { + std::vector<int> result; + const char* pstr = str; + const char* r = strchr(pstr, '.'); + + while ( r != 0 ) + { + assert(r >= pstr); + if ( r > pstr ) + result.push_back(atoi(pstr)); + + pstr = r + 1; + r = strchr(pstr, '.'); + } + + if( strlen(pstr) > 0 ) + result.push_back(atoi(pstr)); + + assert(result.size() == 3); + return result; + } // constant values used to calculate KLV and EKLV packet sizes static const ui32_t klv_cryptinfo_size = |
