gecko-dev/content/media
Ehsan Akhgari 2824b29025 Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
..
dash bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
encoder bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
gstreamer Bug 889699 - Make gstreamer backend return more accurate results for canPlayType() r=alessandro.d 2013-07-20 12:03:08 +12:00
mediasource Bug 887483 - Remove some more useless FORCE_STATIC_LIB and leftover comments from previous removal. r=mshal 2013-07-15 18:48:40 +09:00
ogg Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
omx Bug 894262 - Merge GonkIOSurfaceImage to GrallocImage, r=nical, kanru 2013-07-25 10:13:35 +08:00
plugins Bug 858914 - New texture classes + OGL backend (preffed off). r=bas, nrc 2013-07-30 11:59:51 +02:00
raw bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
test Backed out changesets f2862e93b710, 4fe81f58dbef, and f8f855f0b7dc (bug 896353) for mochitest-1 asserts. 2013-07-26 14:08:29 -04:00
wave Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
webaudio Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
webm Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
webrtc Bug 884061 - Part 3d: Use NS_DECL_THREADSAFE_ISUPPORTS in content/, r=smaug 2013-07-18 21:21:19 -05:00
webspeech Bug 893004 part 2. Remove various no-longer-used XPCOM bits from Navigator, except the ones from nsIDOMNavigator. r=smaug 2013-07-17 23:23:52 -04:00
wmf Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
AbstractMediaDecoder.h Backed out changeset a966aadd9ae3 (bug 856822) for Windows bustage on a CLOSED TREE. 2013-05-29 17:56:10 -04:00
AudioAvailableEventManager.cpp
AudioAvailableEventManager.h
AudioChannelFormat.cpp Bug 875529 - Correctly reserve some extra junk at the end of the down-mixing buffer; r=roc 2013-05-23 23:29:25 -04:00
AudioChannelFormat.h
AudioEventTimeline.h Bug 875596 - Properly handle AudioParam SetCurve automation events with a 0 duration; r=roc 2013-05-24 13:19:47 -04:00
AudioNodeEngine.cpp Bug 890716. Fix race in Reverb::Reverb. r=padenot 2013-07-26 13:35:22 +12:00
AudioNodeEngine.h Bug 890716. Fix race in Reverb::Reverb. r=padenot 2013-07-26 13:35:22 +12:00
AudioNodeStream.cpp Backed out changeset f211d6754796 (bug 856361) 2013-07-29 09:55:12 +01:00
AudioNodeStream.h Backed out changeset f211d6754796 (bug 856361) 2013-07-29 09:55:12 +01:00
AudioSampleFormat.h Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo 2013-07-18 13:59:53 -04:00
AudioSegment.cpp Bug 882956 - Fix WebAudio stack-buffer-overflow crash. r=ehsan. 2013-06-14 15:16:41 +08:00
AudioSegment.h Bug 882956 - Fix WebAudio stack-buffer-overflow crash. r=ehsan. 2013-06-14 15:16:41 +08:00
AudioStream.cpp Bug 859022 - Remove the MSVC exemption for FAIL_ON_WARNINGS in content/media. r=roc 2013-06-27 20:30:41 +09:00
AudioStream.h Bug 865244 - Expose the maximum channel count in the AudioStream. r=kinetik 2013-06-10 19:32:28 +02:00
AudioStreamTrack.cpp Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
AudioStreamTrack.h Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
BufferMediaResource.h Bug 894148 - Implement MediaResource::ReadAt for threadsafe seek+read - r=cpearce 2013-07-17 13:54:52 +12:00
DOMMediaStream.cpp Backed out changeset 3d6f6f06da5e (bug 856361) 2013-07-29 09:55:03 +01:00
DOMMediaStream.h Backed out changeset f211d6754796 (bug 856361) 2013-07-29 09:55:12 +01:00
DecoderTraits.cpp Bug 885371 - Don't create VideoDocument for formats that dont play in content. r=smaug 2013-07-01 09:30:48 -04:00
DecoderTraits.h Bug 834172 - Don't export codec functions from DecoderTraits. r=cpearce 2013-03-05 09:56:35 -05:00
EncodedBufferCache.cpp Bug 803414 - Part 3: Add EncodedBufferCache. r=roc 2013-07-02 11:00:53 +08:00
EncodedBufferCache.h Bug 803414 - Part 3: Add EncodedBufferCache. r=roc 2013-07-02 11:00:53 +08:00
FileBlockCache.cpp
FileBlockCache.h Backed out changeset a966aadd9ae3 (bug 856822) for Windows bustage on a CLOSED TREE. 2013-05-29 17:56:10 -04:00
Makefile.in bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
MediaCache.cpp Bug 891238. Don't resume reading from a paused connection if we still have plenty of data cached. This could save power. r=cpearce 2013-07-19 21:00:19 +12:00
MediaCache.h Bug 894148 - Implement MediaResource::ReadAt for threadsafe seek+read - r=cpearce 2013-07-17 13:54:52 +12:00
MediaDecoder.cpp Backed out changeset 3f2c0edda4c2 (bug 856361) 2013-07-29 09:55:15 +01:00
MediaDecoder.h Backed out changeset 3f2c0edda4c2 (bug 856361) 2013-07-29 09:55:15 +01:00
MediaDecoderOwner.h Backed out changeset 78424c3ea6cb (bug 883731) 2013-06-19 09:51:05 +01:00
MediaDecoderReader.cpp Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
MediaDecoderReader.h Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
MediaDecoderStateMachine.cpp Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
MediaDecoderStateMachine.h Bug 871485 - Share hw codec between applications/tasks. r=mwu, r=doublec, r=roc 2013-06-10 08:22:05 -04:00
MediaMetadataManager.h
MediaRecorder.cpp Backed out changesets f2862e93b710, 4fe81f58dbef, and f8f855f0b7dc (bug 896353) for mochitest-1 asserts. 2013-07-26 14:08:29 -04:00
MediaRecorder.h Backed out changesets f2862e93b710, 4fe81f58dbef, and f8f855f0b7dc (bug 896353) for mochitest-1 asserts. 2013-07-26 14:08:29 -04:00
MediaResource.cpp Bug 894148 - Implement MediaResource::ReadAt for threadsafe seek+read - r=cpearce 2013-07-17 13:54:52 +12:00
MediaResource.h Bug 884061 - Part 1: Use mozilla::Atomic in NS_DECL_INLINE_THREADSAFE_REFCOUNTING, r=jlebar 2013-07-13 20:18:03 -05:00
MediaSegment.h Bug 842243 - Part 0: Modify MediaSegment and AudioSegment for use by MediaEncoder. r=roc 2013-06-03 17:59:50 +08:00
MediaStreamGraph.cpp Backed out changeset f211d6754796 (bug 856361) 2013-07-29 09:55:12 +01:00
MediaStreamGraph.h Backed out changeset 0ad406a69f2c (bug 856361) for mochitest-1 failures in test_mediaElementAudioSourceNode.html on a CLOSED TREE 2013-07-29 09:56:06 +01:00
MediaStreamGraphImpl.h Bug 882543 - Use a linked list for ordering stream instead of an array. r=ehsan 2013-07-19 16:40:58 +02:00
MediaStreamTrack.cpp Bug 868405. Support 'enabled' attribute on MediaStreamTrack. r=jesup 2013-05-30 16:44:43 +12:00
MediaStreamTrack.h Bug 868405. Support 'enabled' attribute on MediaStreamTrack. r=jesup 2013-05-30 16:44:43 +12:00
SharedBuffer.h
StreamBuffer.cpp #include prlog.h inside StreamBuffer.cpp, no bug 2013-03-18 23:29:51 -04:00
StreamBuffer.h Bug 839650: Add debugs to MediaStreamGraph to ease investigation of issues in the future r=roc 2013-03-07 03:53:45 -05:00
TextTrack.cpp Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz 2013-06-10 08:30:00 -07:00
TextTrack.h Bug 882706 - Implement TextTrackList::GetTrackById(). r=rillian 2013-07-09 11:44:35 -04:00
TextTrackCue.cpp Bug 894104 - Part 3: remove TextTrackCue's mGlobal. r=bz 2013-07-18 15:01:48 -07:00
TextTrackCue.h Bug 894104 - Part 3: remove TextTrackCue's mGlobal. r=bz 2013-07-18 15:01:48 -07:00
TextTrackCueList.cpp Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz 2013-06-10 08:30:00 -07:00
TextTrackCueList.h Bug 833382 - Implement WebVTTLoadListener r=cpearce,bz 2013-06-10 08:30:00 -07:00
TextTrackList.cpp Bug 882706 - Implement TextTrackList::GetTrackById(). r=rillian 2013-07-09 11:44:35 -04:00
TextTrackList.h Bug 882706 - Implement TextTrackList::GetTrackById(). r=rillian 2013-07-09 11:44:35 -04:00
TimeVarying.h Bug 852011 - Reserve 5 elements in MediaStream::mBlocked in order to avoid excessive cost when dealing with removals from it; r=roc 2013-03-17 23:27:14 -04:00
TrackUnionStream.h Bug 865257 - Implement MediaStreamAudioDestinationNode. r=ehsan,roc 2013-05-21 15:17:47 -04:00
VideoFrameContainer.cpp Bug 841493 - Rename nsHTMLMediaElement to HTMLMediaElement, r=Ms2ger 2013-03-19 13:23:54 +01:00
VideoFrameContainer.h Bug 841493 - Rename nsHTMLMediaElement to HTMLMediaElement, r=Ms2ger 2013-03-19 13:23:54 +01:00
VideoPlaybackQuality.cpp Bug 895754 - Update VideoPlaybackQuality to current MSE spec (remove playbackJitter, add totalFrameDelay). r=doublec 2013-07-24 11:46:43 +12:00
VideoPlaybackQuality.h Bug 895754 - Update VideoPlaybackQuality to current MSE spec (remove playbackJitter, add totalFrameDelay). r=doublec 2013-07-24 11:46:43 +12:00
VideoSegment.cpp Bug 868405. Support 'enabled' attribute on MediaStreamTrack. r=jesup 2013-05-30 16:44:43 +12:00
VideoSegment.h Bug 868405. Support 'enabled' attribute on MediaStreamTrack. r=jesup 2013-05-30 16:44:43 +12:00
VideoStreamTrack.cpp Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
VideoStreamTrack.h Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
VideoUtils.cpp Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
VideoUtils.h Bug 885879 - Make sure cue times are not rounded r=rillian 2013-06-19 14:35:04 -04:00
VorbisUtils.h
WebVTTLoadListener.cpp Bug 887463 - remove webvtt parser library. r=cpearce. 2013-07-09 17:02:00 -07:00
WebVTTLoadListener.h Bug 887463 - remove webvtt parser library. r=cpearce. 2013-07-09 17:02:00 -07:00
moz.build Backed out changeset 9e90a81b9e37 (bug 856361) 2013-07-29 09:55:06 +01:00