Skip to content

Commit

Permalink
Merge pull request #155 from matmoi/master
Browse files Browse the repository at this point in the history
Add macros to support arch type on MSVC
  • Loading branch information
barbibulle authored Jun 24, 2017
2 parents 52bcd05 + 1f4ecce commit cca50d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Source/C++/Core/Ap4Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
#if !defined(AP4_PLATFORM_BYTE_ORDER)
#if defined(__ppc__)
#define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_BIG_ENDIAN
#elif defined(_MSC_VER)
#if defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64)
#define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_LITTLE_ENDIAN
#endif
#elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__arm64__)
#define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_LITTLE_ENDIAN
#endif
Expand Down
7 changes: 6 additions & 1 deletion Source/Python/utils/mp4-dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,11 @@ def OutputHls(options, set_attributes, audio_sets, video_sets, subtitles_sets, s

OutputHlsTrack(options, video_track, media_subdir, media_playlist_name, media_file_name)

if len(subtitles_files):
master_playlist_file.write('# Subtitles\r\n')
for subtitles_file in subtitles_files:
master_playlist_file.write('''#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",NAME="{0:s}",DEFAULT=NO,AUTOSELECT=YES,FORCED=YES,LANGUAGE="{0:s}",URI="subtitles/{0:s}/{1:s}"\r\n'''.format(subtitles_file.language,subtitles_file.media_name))

#############################################
def OutputSmooth(options, audio_tracks, video_tracks):
# compute the total duration (we take the duration of the video)
Expand Down Expand Up @@ -1389,7 +1394,7 @@ def main():
# for on-demand, we need to first extract tracks into individual media files
if options.on_demand:
(audio_sets, video_sets, subtitles_sets, mp4_files) = SelectTracks(options, media_sources)
media_sources = []
media_sources = filter(lambda x: x.format == "webvtt", media_sources) #Keep subtitles
for track in sum(audio_sets.values()+video_sets.values(), []):
print 'Extracting track', track.id, 'from', GetMappedFileName(track.parent.media_source.filename)
track_file = tempfile.NamedTemporaryFile(dir = options.output_dir, delete=False)
Expand Down

0 comments on commit cca50d6

Please sign in to comment.