Skip to content

Commit

Permalink
Modified SDK packaging script to use git
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Jan 19, 2015
1 parent 7a13969 commit 8852d83
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
16 changes: 5 additions & 11 deletions Scripts/SdkPackager.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,12 @@ def GetVersion():
return '0-0-0'

#############################################################
# GetSvnRevision
# GetSdkRevision
#############################################################
def GetSvnRevision():
cmd = 'svn info'
def GetSdkRevision():
cmd = 'git rev-list HEAD --count'
revision = 0
lines = os.popen(cmd).readlines()
for line in lines:
if line.startswith('Revision: '):
revision = line[10:]
if revision == 0:
raise "unable to obtain SVN revision"
return revision.strip()
return os.popen(cmd).readlines()[0].strip()

#############################################################
# File Copy
Expand Down Expand Up @@ -155,7 +149,7 @@ def ZipIt(basename, dir) :
BENTO4_VERSION = GetVersion()

# compute paths
SDK_REVISION = GetSvnRevision()
SDK_REVISION = GetSdkRevision()
SDK_NAME='Bento4-SDK-'+BENTO4_VERSION+'-'+SDK_REVISION+'.'+SDK_TARGET
SDK_BUILD_ROOT=BENTO4_HOME+'/SDK'
SDK_ROOT=SDK_BUILD_ROOT+'/'+SDK_NAME
Expand Down
12 changes: 7 additions & 5 deletions Source/Python/utils/mp4-dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,13 @@ def SelectTracks(options, media_sources):
continue

# parse the file
print 'Parsing media file', str(file_list_index)+':', GetMappedFileName(media_file)
if not os.path.exists(media_file):
PrintErrorAndExit('ERROR: media file ' + media_file + ' does not exist')

# get the file info
print 'Parsing media file', str(file_list_index)+':', GetMappedFileName(media_file)
mp4_file = Mp4File(Options, media_source)

# set some metadata properties for this file
mp4_file.file_list_index = file_list_index
file_list_index += 1
Expand Down Expand Up @@ -937,9 +937,11 @@ def main():
prev_track = track

# check that the video segments match
for track in video_tracks:
if track.sample_counts[:-1] != video_tracks[0].sample_counts[:-1]:
PrintErrorAndExit('ERROR: video tracks are not aligned ("'+str(track)+'" differs)')
if len(video_tracks) > 1:
anchor = video_tracks[0]
for track in video_tracks[1:]:
if track.sample_counts[:-1] != anchor.sample_counts[:-1]:
PrintErrorAndExit('ERROR: video tracks are not aligned ("'+str(track)+'" differs from '+str(anchor)+')')

# check that the video segment durations are almost all equal
if not options.use_segment_timeline:
Expand Down

0 comments on commit 8852d83

Please sign in to comment.