diff --git a/library/src/androidTest/assets/flv/sample.flv b/library/src/androidTest/assets/flv/sample.flv new file mode 100644 index 0000000000..8256a4e33d Binary files /dev/null and b/library/src/androidTest/assets/flv/sample.flv differ diff --git a/library/src/androidTest/assets/flv/sample.flv.dump b/library/src/androidTest/assets/flv/sample.flv.dump new file mode 100644 index 0000000000..eaefdf24c3 --- /dev/null +++ b/library/src/androidTest/assets/flv/sample.flv.dump @@ -0,0 +1,357 @@ +seekMap: + isSeekable = false + duration = 1136000 + getPosition(0) = 0 +numberOfTracks = 2 +track 8: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = -1 + requiresSecureDecryption = false + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = -1 + pixelWidthHeightRatio = -1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 2, hash 5F7 + sample count = 45 + sample 0: + time = 112000 + flags = 1 + data = length 23, hash 47DE9131 + sample 1: + time = 135000 + flags = 1 + data = length 6, hash 31EC5206 + sample 2: + time = 158000 + flags = 1 + data = length 148, hash 894A176B + sample 3: + time = 181000 + flags = 1 + data = length 189, hash CEF235A1 + sample 4: + time = 205000 + flags = 1 + data = length 205, hash BBF5F7B0 + sample 5: + time = 228000 + flags = 1 + data = length 210, hash F278B193 + sample 6: + time = 251000 + flags = 1 + data = length 210, hash 82DA1589 + sample 7: + time = 274000 + flags = 1 + data = length 207, hash 5BE231DF + sample 8: + time = 298000 + flags = 1 + data = length 225, hash 18819EE1 + sample 9: + time = 321000 + flags = 1 + data = length 215, hash CA7FA67B + sample 10: + time = 344000 + flags = 1 + data = length 211, hash 581A1C18 + sample 11: + time = 367000 + flags = 1 + data = length 216, hash ADB88187 + sample 12: + time = 390000 + flags = 1 + data = length 229, hash 2E8BA4DC + sample 13: + time = 414000 + flags = 1 + data = length 232, hash 22F0C510 + sample 14: + time = 437000 + flags = 1 + data = length 235, hash 867AD0DC + sample 15: + time = 460000 + flags = 1 + data = length 231, hash 84E823A8 + sample 16: + time = 483000 + flags = 1 + data = length 226, hash 1BEF3A95 + sample 17: + time = 507000 + flags = 1 + data = length 216, hash EAA345AE + sample 18: + time = 530000 + flags = 1 + data = length 229, hash 6957411F + sample 19: + time = 553000 + flags = 1 + data = length 219, hash 41275022 + sample 20: + time = 576000 + flags = 1 + data = length 241, hash 6495DF96 + sample 21: + time = 599000 + flags = 1 + data = length 228, hash 63D95906 + sample 22: + time = 623000 + flags = 1 + data = length 238, hash 34F676F9 + sample 23: + time = 646000 + flags = 1 + data = length 234, hash E5CBC045 + sample 24: + time = 669000 + flags = 1 + data = length 231, hash 5FC43661 + sample 25: + time = 692000 + flags = 1 + data = length 217, hash 682708ED + sample 26: + time = 716000 + flags = 1 + data = length 239, hash D43780FC + sample 27: + time = 739000 + flags = 1 + data = length 243, hash C5E17980 + sample 28: + time = 762000 + flags = 1 + data = length 231, hash AC5837BA + sample 29: + time = 785000 + flags = 1 + data = length 230, hash 169EE895 + sample 30: + time = 808000 + flags = 1 + data = length 238, hash C48FF3F1 + sample 31: + time = 832000 + flags = 1 + data = length 225, hash 531E4599 + sample 32: + time = 855000 + flags = 1 + data = length 232, hash CB3C6B8D + sample 33: + time = 878000 + flags = 1 + data = length 243, hash F8C94C7 + sample 34: + time = 901000 + flags = 1 + data = length 232, hash A646A7D0 + sample 35: + time = 925000 + flags = 1 + data = length 237, hash E8B787A5 + sample 36: + time = 948000 + flags = 1 + data = length 228, hash 3FA7A29F + sample 37: + time = 971000 + flags = 1 + data = length 235, hash B9B33B0A + sample 38: + time = 994000 + flags = 1 + data = length 264, hash 71A4869E + sample 39: + time = 1017000 + flags = 1 + data = length 257, hash D049B54C + sample 40: + time = 1041000 + flags = 1 + data = length 227, hash 66757231 + sample 41: + time = 1064000 + flags = 1 + data = length 227, hash BD374F1B + sample 42: + time = 1087000 + flags = 1 + data = length 235, hash 999477F6 + sample 43: + time = 1110000 + flags = 1 + data = length 229, hash FFF98DF0 + sample 44: + time = 1134000 + flags = 1 + data = length 6, hash 31B22286 +track 9: + format: + bitrate = -1 + id = null + containerMimeType = null + sampleMimeType = video/avc + maxInputSize = -1 + requiresSecureDecryption = false + width = 1080 + height = 720 + frameRate = -1.0 + rotationDegrees = -1 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample count = 30 + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +tracksEnded = true diff --git a/library/src/androidTest/assets/mkv/sample.mkv b/library/src/androidTest/assets/mkv/sample.mkv new file mode 100644 index 0000000000..27843561c9 Binary files /dev/null and b/library/src/androidTest/assets/mkv/sample.mkv differ diff --git a/library/src/androidTest/assets/mkv/sample.mkv.dump b/library/src/androidTest/assets/mkv/sample.mkv.dump new file mode 100644 index 0000000000..9e471465cb --- /dev/null +++ b/library/src/androidTest/assets/mkv/sample.mkv.dump @@ -0,0 +1,292 @@ +seekMap: + isSeekable = true + duration = 1145000 + getPosition(0) = 1034 +numberOfTracks = 2 +track 1: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = video/avc + maxInputSize = -1 + requiresSecureDecryption = false + width = 1080 + height = 720 + frameRate = -1.0 + rotationDegrees = -1 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 30, hash F6F3D010 + data = length 10, hash 7A0D0F2B + sample count = 30 + sample 0: + time = 67000 + flags = 1 + data = length 36477, hash F0F36CFE + sample 1: + time = 134000 + flags = 0 + data = length 5341, hash 40B85E2 + sample 2: + time = 100000 + flags = 0 + data = length 596, hash 357B4D92 + sample 3: + time = 267000 + flags = 0 + data = length 7704, hash A39EDA06 + sample 4: + time = 200000 + flags = 0 + data = length 989, hash 2813C72D + sample 5: + time = 167000 + flags = 0 + data = length 721, hash C50D1C73 + sample 6: + time = 234000 + flags = 0 + data = length 519, hash 65FE1911 + sample 7: + time = 400000 + flags = 0 + data = length 6160, hash E1CAC0EC + sample 8: + time = 334000 + flags = 0 + data = length 953, hash 7160C661 + sample 9: + time = 300000 + flags = 0 + data = length 620, hash 7A7AE07C + sample 10: + time = 367000 + flags = 0 + data = length 405, hash 5CC7F4E7 + sample 11: + time = 500000 + flags = 0 + data = length 4852, hash 9DB6979D + sample 12: + time = 467000 + flags = 0 + data = length 547, hash E31A6979 + sample 13: + time = 434000 + flags = 0 + data = length 570, hash FEC40D00 + sample 14: + time = 634000 + flags = 0 + data = length 5525, hash 7C478F7E + sample 15: + time = 567000 + flags = 0 + data = length 1082, hash DA07059A + sample 16: + time = 534000 + flags = 0 + data = length 807, hash 93478E6B + sample 17: + time = 600000 + flags = 0 + data = length 744, hash 9A8E6026 + sample 18: + time = 767000 + flags = 0 + data = length 4732, hash C73B23C0 + sample 19: + time = 700000 + flags = 0 + data = length 1004, hash 8A19A228 + sample 20: + time = 667000 + flags = 0 + data = length 794, hash 8126022C + sample 21: + time = 734000 + flags = 0 + data = length 645, hash F08300E5 + sample 22: + time = 900000 + flags = 0 + data = length 2684, hash 727FE378 + sample 23: + time = 834000 + flags = 0 + data = length 787, hash 419A7821 + sample 24: + time = 800000 + flags = 0 + data = length 649, hash 5C159346 + sample 25: + time = 867000 + flags = 0 + data = length 509, hash F912D655 + sample 26: + time = 1034000 + flags = 0 + data = length 1226, hash 29815C21 + sample 27: + time = 967000 + flags = 0 + data = length 898, hash D997AD0A + sample 28: + time = 934000 + flags = 0 + data = length 476, hash A0423645 + sample 29: + time = 1000000 + flags = 0 + data = length 486, hash DDF32CBB +track 2: + format: + bitrate = -1 + id = 2 + containerMimeType = null + sampleMimeType = audio/ac3 + maxInputSize = -1 + requiresSecureDecryption = false + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = -1 + pixelWidthHeightRatio = -1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 1 + language = und + drmInitData = - + initializationData: + sample count = 29 + sample 0: + time = 129000 + flags = 1 + data = length 416, hash 211F2286 + sample 1: + time = 164000 + flags = 1 + data = length 418, hash 77425A86 + sample 2: + time = 199000 + flags = 1 + data = length 418, hash A0FE5CA1 + sample 3: + time = 234000 + flags = 1 + data = length 418, hash 2309B066 + sample 4: + time = 269000 + flags = 1 + data = length 418, hash 928A653B + sample 5: + time = 303000 + flags = 1 + data = length 418, hash 3422F0CB + sample 6: + time = 338000 + flags = 1 + data = length 418, hash EFF43D5B + sample 7: + time = 373000 + flags = 1 + data = length 418, hash FC8093C7 + sample 8: + time = 408000 + flags = 1 + data = length 418, hash CCC08A16 + sample 9: + time = 443000 + flags = 1 + data = length 418, hash 2A6EE863 + sample 10: + time = 478000 + flags = 1 + data = length 418, hash D69A9251 + sample 11: + time = 512000 + flags = 1 + data = length 418, hash BCFB758D + sample 12: + time = 547000 + flags = 1 + data = length 418, hash 11B66799 + sample 13: + time = 582000 + flags = 1 + data = length 418, hash C824D392 + sample 14: + time = 617000 + flags = 1 + data = length 418, hash C167D872 + sample 15: + time = 652000 + flags = 1 + data = length 418, hash 4221C855 + sample 16: + time = 687000 + flags = 1 + data = length 418, hash 4D4FF934 + sample 17: + time = 721000 + flags = 1 + data = length 418, hash 984AA025 + sample 18: + time = 756000 + flags = 1 + data = length 418, hash BB788B46 + sample 19: + time = 791000 + flags = 1 + data = length 418, hash 9EFBFD97 + sample 20: + time = 826000 + flags = 1 + data = length 418, hash DF1A460C + sample 21: + time = 861000 + flags = 1 + data = length 418, hash 2BDB56A + sample 22: + time = 896000 + flags = 1 + data = length 418, hash CA230060 + sample 23: + time = 930000 + flags = 1 + data = length 418, hash D2F19F41 + sample 24: + time = 965000 + flags = 1 + data = length 418, hash AF392D79 + sample 25: + time = 1000000 + flags = 1 + data = length 418, hash C5D7F2A3 + sample 26: + time = 1035000 + flags = 1 + data = length 418, hash 733A35AE + sample 27: + time = 1070000 + flags = 1 + data = length 418, hash DE46E5D3 + sample 28: + time = 1104000 + flags = 1 + data = length 418, hash 56AB8D37 +tracksEnded = true diff --git a/library/src/androidTest/assets/mp4/sample.mp4 b/library/src/androidTest/assets/mp4/sample.mp4 new file mode 100644 index 0000000000..ea7db760d0 Binary files /dev/null and b/library/src/androidTest/assets/mp4/sample.mp4 differ diff --git a/library/src/androidTest/assets/mp4/sample.mp4.dump b/library/src/androidTest/assets/mp4/sample.mp4.dump new file mode 100644 index 0000000000..fbf3d5649b --- /dev/null +++ b/library/src/androidTest/assets/mp4/sample.mp4.dump @@ -0,0 +1,357 @@ +seekMap: + isSeekable = true + duration = 1024000 + getPosition(0) = 48 +numberOfTracks = 2 +track 0: + format: + bitrate = -1 + id = 1 + containerMimeType = null + sampleMimeType = video/avc + maxInputSize = 36722 + requiresSecureDecryption = false + width = 1080 + height = 720 + frameRate = -1.0 + rotationDegrees = 0 + pixelWidthHeightRatio = 1.0 + channelCount = -1 + sampleRate = -1 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = null + drmInitData = - + initializationData: + data = length 29, hash 4746B5D9 + data = length 10, hash 7A0D0F2B + sample count = 30 + sample 0: + time = 0 + flags = 1 + data = length 36692, hash D216076E + sample 1: + time = 66733 + flags = 0 + data = length 5312, hash D45D3CA0 + sample 2: + time = 33366 + flags = 0 + data = length 599, hash 1BE7812D + sample 3: + time = 200200 + flags = 0 + data = length 7735, hash 4490F110 + sample 4: + time = 133466 + flags = 0 + data = length 987, hash 560B5036 + sample 5: + time = 100100 + flags = 0 + data = length 673, hash ED7CD8C7 + sample 6: + time = 166833 + flags = 0 + data = length 523, hash 3020DF50 + sample 7: + time = 333666 + flags = 0 + data = length 6061, hash 736C72B2 + sample 8: + time = 266933 + flags = 0 + data = length 992, hash FE132F23 + sample 9: + time = 233566 + flags = 0 + data = length 623, hash 5B2C1816 + sample 10: + time = 300300 + flags = 0 + data = length 421, hash 742E69C1 + sample 11: + time = 433766 + flags = 0 + data = length 4899, hash F72F86A1 + sample 12: + time = 400400 + flags = 0 + data = length 568, hash 519A8E50 + sample 13: + time = 367033 + flags = 0 + data = length 620, hash 3990AA39 + sample 14: + time = 567233 + flags = 0 + data = length 5450, hash F06EC4AA + sample 15: + time = 500500 + flags = 0 + data = length 1051, hash 92DFA63A + sample 16: + time = 467133 + flags = 0 + data = length 874, hash 69587FB4 + sample 17: + time = 533866 + flags = 0 + data = length 781, hash 36BE495B + sample 18: + time = 700700 + flags = 0 + data = length 4725, hash AC0C8CD3 + sample 19: + time = 633966 + flags = 0 + data = length 1022, hash 5D8BFF34 + sample 20: + time = 600600 + flags = 0 + data = length 790, hash 99413A99 + sample 21: + time = 667333 + flags = 0 + data = length 610, hash 5E129290 + sample 22: + time = 834166 + flags = 0 + data = length 2751, hash 769974CB + sample 23: + time = 767433 + flags = 0 + data = length 745, hash B78A477A + sample 24: + time = 734066 + flags = 0 + data = length 621, hash CF741E7A + sample 25: + time = 800800 + flags = 0 + data = length 505, hash 1DB4894E + sample 26: + time = 967633 + flags = 0 + data = length 1268, hash C15348DC + sample 27: + time = 900900 + flags = 0 + data = length 880, hash C2DE85D0 + sample 28: + time = 867533 + flags = 0 + data = length 530, hash C98BC6A8 + sample 29: + time = 934266 + flags = 0 + data = length 568, hash 4FE5C8EA +track 1: + format: + bitrate = -1 + id = 2 + containerMimeType = null + sampleMimeType = audio/mp4a-latm + maxInputSize = 294 + requiresSecureDecryption = false + width = -1 + height = -1 + frameRate = -1.0 + rotationDegrees = -1 + pixelWidthHeightRatio = -1.0 + channelCount = 1 + sampleRate = 44100 + pcmEncoding = -1 + encoderDelay = -1 + encoderPadding = -1 + subsampleOffsetUs = 9223372036854775807 + selectionFlags = 0 + language = und + drmInitData = - + initializationData: + data = length 2, hash 5F7 + sample count = 45 + sample 0: + time = 44000 + flags = 1 + data = length 23, hash 47DE9131 + sample 1: + time = 67219 + flags = 1 + data = length 6, hash 31EC5206 + sample 2: + time = 90439 + flags = 1 + data = length 148, hash 894A176B + sample 3: + time = 113659 + flags = 1 + data = length 189, hash CEF235A1 + sample 4: + time = 136879 + flags = 1 + data = length 205, hash BBF5F7B0 + sample 5: + time = 160099 + flags = 1 + data = length 210, hash F278B193 + sample 6: + time = 183319 + flags = 1 + data = length 210, hash 82DA1589 + sample 7: + time = 206539 + flags = 1 + data = length 207, hash 5BE231DF + sample 8: + time = 229759 + flags = 1 + data = length 225, hash 18819EE1 + sample 9: + time = 252979 + flags = 1 + data = length 215, hash CA7FA67B + sample 10: + time = 276199 + flags = 1 + data = length 211, hash 581A1C18 + sample 11: + time = 299419 + flags = 1 + data = length 216, hash ADB88187 + sample 12: + time = 322639 + flags = 1 + data = length 229, hash 2E8BA4DC + sample 13: + time = 345859 + flags = 1 + data = length 232, hash 22F0C510 + sample 14: + time = 369079 + flags = 1 + data = length 235, hash 867AD0DC + sample 15: + time = 392299 + flags = 1 + data = length 231, hash 84E823A8 + sample 16: + time = 415519 + flags = 1 + data = length 226, hash 1BEF3A95 + sample 17: + time = 438739 + flags = 1 + data = length 216, hash EAA345AE + sample 18: + time = 461959 + flags = 1 + data = length 229, hash 6957411F + sample 19: + time = 485179 + flags = 1 + data = length 219, hash 41275022 + sample 20: + time = 508399 + flags = 1 + data = length 241, hash 6495DF96 + sample 21: + time = 531619 + flags = 1 + data = length 228, hash 63D95906 + sample 22: + time = 554839 + flags = 1 + data = length 238, hash 34F676F9 + sample 23: + time = 578058 + flags = 1 + data = length 234, hash E5CBC045 + sample 24: + time = 601278 + flags = 1 + data = length 231, hash 5FC43661 + sample 25: + time = 624498 + flags = 1 + data = length 217, hash 682708ED + sample 26: + time = 647718 + flags = 1 + data = length 239, hash D43780FC + sample 27: + time = 670938 + flags = 1 + data = length 243, hash C5E17980 + sample 28: + time = 694158 + flags = 1 + data = length 231, hash AC5837BA + sample 29: + time = 717378 + flags = 1 + data = length 230, hash 169EE895 + sample 30: + time = 740598 + flags = 1 + data = length 238, hash C48FF3F1 + sample 31: + time = 763818 + flags = 1 + data = length 225, hash 531E4599 + sample 32: + time = 787038 + flags = 1 + data = length 232, hash CB3C6B8D + sample 33: + time = 810258 + flags = 1 + data = length 243, hash F8C94C7 + sample 34: + time = 833478 + flags = 1 + data = length 232, hash A646A7D0 + sample 35: + time = 856698 + flags = 1 + data = length 237, hash E8B787A5 + sample 36: + time = 879918 + flags = 1 + data = length 228, hash 3FA7A29F + sample 37: + time = 903138 + flags = 1 + data = length 235, hash B9B33B0A + sample 38: + time = 926358 + flags = 1 + data = length 264, hash 71A4869E + sample 39: + time = 949578 + flags = 1 + data = length 257, hash D049B54C + sample 40: + time = 972798 + flags = 1 + data = length 227, hash 66757231 + sample 41: + time = 996018 + flags = 1 + data = length 227, hash BD374F1B + sample 42: + time = 1019238 + flags = 1 + data = length 235, hash 999477F6 + sample 43: + time = 1042458 + flags = 1 + data = length 229, hash FFF98DF0 + sample 44: + time = 1065678 + flags = 1 + data = length 6, hash 31B22286 +tracksEnded = true diff --git a/library/src/androidTest/java/com/google/android/exoplayer/extractor/flv/FlvExtractorTest.java b/library/src/androidTest/java/com/google/android/exoplayer/extractor/flv/FlvExtractorTest.java new file mode 100644 index 0000000000..69e617ac0d --- /dev/null +++ b/library/src/androidTest/java/com/google/android/exoplayer/extractor/flv/FlvExtractorTest.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2016 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.android.exoplayer.extractor.flv; + +import com.google.android.exoplayer.extractor.Extractor; +import com.google.android.exoplayer.testutil.TestUtil; + +import android.test.InstrumentationTestCase; + +/** + * Unit test for {@link FlvExtractor}. + */ +public final class FlvExtractorTest extends InstrumentationTestCase { + + public void testSample() throws Exception { + TestUtil.assertOutput(new TestUtil.ExtractorFactory() { + @Override + public Extractor create() { + return new FlvExtractor(); + } + }, "flv/sample.flv", getInstrumentation()); + } + +} diff --git a/library/src/androidTest/java/com/google/android/exoplayer/extractor/mkv/MatroskaExtractorTest.java b/library/src/androidTest/java/com/google/android/exoplayer/extractor/mkv/MatroskaExtractorTest.java index adbf7eb726..9196a32ac6 100644 --- a/library/src/androidTest/java/com/google/android/exoplayer/extractor/mkv/MatroskaExtractorTest.java +++ b/library/src/androidTest/java/com/google/android/exoplayer/extractor/mkv/MatroskaExtractorTest.java @@ -23,6 +23,7 @@ import com.google.android.exoplayer.ParserException; import com.google.android.exoplayer.drm.DrmInitData; import com.google.android.exoplayer.drm.DrmInitData.SchemeData; import com.google.android.exoplayer.extractor.ChunkIndex; +import com.google.android.exoplayer.extractor.Extractor; import com.google.android.exoplayer.extractor.mkv.StreamBuilder.ContentEncodingSettings; import com.google.android.exoplayer.testutil.FakeExtractorOutput; import com.google.android.exoplayer.testutil.FakeTrackOutput; @@ -796,4 +797,12 @@ public final class MatroskaExtractorTest extends InstrumentationTestCase { return data; } + public void testMkvSample() throws Exception { + TestUtil.assertOutput(new TestUtil.ExtractorFactory() { + @Override + public Extractor create() { + return new MatroskaExtractor(); + } + }, "mkv/sample.mkv", getInstrumentation()); + } } diff --git a/library/src/androidTest/java/com/google/android/exoplayer/extractor/mp4/Mp4ExtractorTest.java b/library/src/androidTest/java/com/google/android/exoplayer/extractor/mp4/Mp4ExtractorTest.java index 24255c28ea..820f73bc41 100644 --- a/library/src/androidTest/java/com/google/android/exoplayer/extractor/mp4/Mp4ExtractorTest.java +++ b/library/src/androidTest/java/com/google/android/exoplayer/extractor/mp4/Mp4ExtractorTest.java @@ -17,6 +17,7 @@ package com.google.android.exoplayer.extractor.mp4; import com.google.android.exoplayer.C; import com.google.android.exoplayer.Format; +import com.google.android.exoplayer.extractor.Extractor; import com.google.android.exoplayer.extractor.SeekMap; import com.google.android.exoplayer.testutil.FakeExtractorOutput; import com.google.android.exoplayer.testutil.FakeTrackOutput; @@ -25,7 +26,7 @@ import com.google.android.exoplayer.util.MimeTypes; import com.google.android.exoplayer.util.Util; import android.annotation.TargetApi; -import junit.framework.TestCase; +import android.test.InstrumentationTestCase; import java.io.IOException; import java.nio.ByteBuffer; @@ -36,7 +37,7 @@ import java.util.List; * Tests for {@link Mp4Extractor}. */ @TargetApi(16) -public final class Mp4ExtractorTest extends TestCase { +public final class Mp4ExtractorTest extends InstrumentationTestCase { /** String of hexadecimal bytes containing the video stsd payload from an AVC video. */ private static final byte[] VIDEO_STSD_PAYLOAD = Util.getBytesFromHexString( @@ -496,4 +497,13 @@ public final class Mp4ExtractorTest extends TestCase { } + public void testMp4Sample() throws Exception { + TestUtil.assertOutput(new TestUtil.ExtractorFactory() { + @Override + public Extractor create() { + return new Mp4Extractor(); + } + }, "mp4/sample.mp4", getInstrumentation()); + } + }