Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
ireader committed Jul 4, 2020
1 parent 9188736 commit 0510230
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 16 deletions.
28 changes: 26 additions & 2 deletions libdash/libdash.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,25 @@
/* Begin PBXBuildFile section */
46C5B2AF2183ED6100419E57 /* list.h in Headers */ = {isa = PBXBuildFile; fileRef = 46C5B2AC2183ED6100419E57 /* list.h */; };
46C5B2B02183ED6100419E57 /* dash-mpd.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B2AD2183ED6100419E57 /* dash-mpd.c */; };
46E55E6824A7395F00D8BDBA /* xs-duration.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6224A7395F00D8BDBA /* xs-duration.c */; };
46E55E6924A7395F00D8BDBA /* dash-period.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6324A7395F00D8BDBA /* dash-period.c */; };
46E55E6A24A7395F00D8BDBA /* dash-adaptation.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6424A7395F00D8BDBA /* dash-adaptation.c */; };
46E55E6B24A7395F00D8BDBA /* dash-representation.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6524A7395F00D8BDBA /* dash-representation.c */; };
46E55E6C24A7395F00D8BDBA /* dash-parser.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6624A7395F00D8BDBA /* dash-parser.c */; };
46E55E6D24A7395F00D8BDBA /* dash-segment.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6724A7395F00D8BDBA /* dash-segment.c */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
46C5B22C2183EAAD00419E57 /* libdash.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libdash.a; sourceTree = BUILT_PRODUCTS_DIR; };
46C5B2A92183ED5400419E57 /* include */ = {isa = PBXFileReference; lastKnownFileType = folder; path = include; sourceTree = "<group>"; };
46C5B2AC2183ED6100419E57 /* list.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = list.h; sourceTree = "<group>"; };
46C5B2AD2183ED6100419E57 /* dash-mpd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-mpd.c"; sourceTree = "<group>"; };
46E55E6224A7395F00D8BDBA /* xs-duration.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "xs-duration.c"; sourceTree = "<group>"; };
46E55E6324A7395F00D8BDBA /* dash-period.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-period.c"; sourceTree = "<group>"; };
46E55E6424A7395F00D8BDBA /* dash-adaptation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-adaptation.c"; sourceTree = "<group>"; };
46E55E6524A7395F00D8BDBA /* dash-representation.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-representation.c"; sourceTree = "<group>"; };
46E55E6624A7395F00D8BDBA /* dash-parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-parser.c"; sourceTree = "<group>"; };
46E55E6724A7395F00D8BDBA /* dash-segment.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "dash-segment.c"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -50,6 +62,12 @@
isa = PBXGroup;
children = (
46C5B2AC2183ED6100419E57 /* list.h */,
46E55E6424A7395F00D8BDBA /* dash-adaptation.c */,
46E55E6624A7395F00D8BDBA /* dash-parser.c */,
46E55E6324A7395F00D8BDBA /* dash-period.c */,
46E55E6524A7395F00D8BDBA /* dash-representation.c */,
46E55E6724A7395F00D8BDBA /* dash-segment.c */,
46E55E6224A7395F00D8BDBA /* xs-duration.c */,
46C5B2AD2183ED6100419E57 /* dash-mpd.c */,
);
path = src;
Expand Down Expand Up @@ -123,7 +141,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
46E55E6B24A7395F00D8BDBA /* dash-representation.c in Sources */,
46E55E6A24A7395F00D8BDBA /* dash-adaptation.c in Sources */,
46E55E6C24A7395F00D8BDBA /* dash-parser.c in Sources */,
46E55E6824A7395F00D8BDBA /* xs-duration.c in Sources */,
46C5B2B02183ED6100419E57 /* dash-mpd.c in Sources */,
46E55E6924A7395F00D8BDBA /* dash-period.c in Sources */,
46E55E6D24A7395F00D8BDBA /* dash-segment.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -190,7 +214,7 @@
.,
./include,
../libmov/include,
../../sdk/include,
../libhls/include,
);
};
name = Debug;
Expand Down Expand Up @@ -248,7 +272,7 @@
.,
./include,
../libmov/include,
../../sdk/include,
../libhls/include,
);
};
name = Release;
Expand Down
2 changes: 1 addition & 1 deletion libdash/src/dash-adaptation.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int dash_adaptation_set_best_representation(const struct dash_adaptation_set_t*
|| v->base.selection_priority > set->representations[best].base.selection_priority
|| v->quality_ranking < set->representations[best].quality_ranking
|| v->bandwidth > set->representations[best].bandwidth)
best = i;
best = (int)i;
}

return best;
Expand Down
4 changes: 2 additions & 2 deletions libdash/src/dash-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ static int dash_attr_read(const char* value, size_t n, int cls, void* ptr)
break;

case ATTR_VALUE_TYPE_DURATION:
return xs_duration_read((int64_t*)ptr, value, n);
return xs_duration_read((int64_t*)ptr, value, (int)n);

//case ATTR_VALUE_TYPE_FRAME_RATE:
// // [0-9]*[0-9](/[0-9]*[0-9])?
Expand Down Expand Up @@ -1527,7 +1527,7 @@ void dash_parser_test(const char* xml)
{
static char data[2 * 1024 * 1024];
FILE* fp = fopen(xml, "rb");
int n = fread(data, 1, sizeof(data), fp);
int n = (int)fread(data, 1, sizeof(data), fp);
fclose(fp);

struct dash_mpd_t* mpd;
Expand Down
2 changes: 1 addition & 1 deletion libdash/src/dash-period.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int dash_period_find(const struct dash_mpd_t* mpd, int64_t time)
}

if (time < t)
return i;
return (int)i;
}

return -1; // not found
Expand Down
2 changes: 1 addition & 1 deletion libdash/src/dash-representation.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static int dash_representation_template_replace(const struct dash_representation

if (j < len)
ptr[j] = '\0';
return j < len ? j : -1;
return j < len ? (int)j : -1;
}

int dash_representation_get_initialization(const struct dash_representation_t* representation, char* url, size_t size)
Expand Down
2 changes: 1 addition & 1 deletion libdash/src/dash-segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ int dash_segment_count(const struct dash_segment_t* segment)
return 1;

case DASH_SEGMENT_LIST:
return segment->segment_url_count;
return (int)segment->segment_url_count;

case DASH_SEGMENT_TEMPLATE:
if (segment->segment_timeline.count < 1)
Expand Down
2 changes: 1 addition & 1 deletion libflv/source/webm-vpx.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ int webm_vpx_codec_configuration_record_load(const uint8_t* data, size_t bytes,

int webm_vpx_codec_configuration_record_save(const struct webm_vpx_t* vpx, uint8_t* data, size_t bytes)
{
if (bytes < 8 + (size_t)vpx->codec_intialization_data_size)
if (bytes < 8 + vpx->codec_intialization_data_size)
return 0; // don't have enough memory

data[0] = vpx->profile;
Expand Down
18 changes: 18 additions & 0 deletions libhls/libhls.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
46C5B2F52183EDDB00419E57 /* hls-fmp4.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B2F02183EDDB00419E57 /* hls-fmp4.c */; };
46C5B2F62183EDDB00419E57 /* hls-m3u8.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B2F12183EDDB00419E57 /* hls-m3u8.c */; };
46C5B2F72183EDDB00419E57 /* hls-media.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B2F22183EDDB00419E57 /* hls-media.c */; };
46E55E4D24681D8400D8BDBA /* hls-parser.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E4C24681D8400D8BDBA /* hls-parser.c */; };
46E55E5C247384DE00D8BDBA /* hls-master.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E5A247384DE00D8BDBA /* hls-master.c */; };
46E55E5D247384DF00D8BDBA /* hls-playlist.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E5B247384DE00D8BDBA /* hls-playlist.c */; };
46E55E6124A7393F00D8BDBA /* hls-string.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E6024A7393F00D8BDBA /* hls-string.c */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -22,6 +26,10 @@
46C5B2F02183EDDB00419E57 /* hls-fmp4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-fmp4.c"; sourceTree = "<group>"; };
46C5B2F12183EDDB00419E57 /* hls-m3u8.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-m3u8.c"; sourceTree = "<group>"; };
46C5B2F22183EDDB00419E57 /* hls-media.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-media.c"; sourceTree = "<group>"; };
46E55E4C24681D8400D8BDBA /* hls-parser.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-parser.c"; sourceTree = "<group>"; };
46E55E5A247384DE00D8BDBA /* hls-master.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-master.c"; sourceTree = "<group>"; };
46E55E5B247384DE00D8BDBA /* hls-playlist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-playlist.c"; sourceTree = "<group>"; };
46E55E6024A7393F00D8BDBA /* hls-string.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "hls-string.c"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -55,11 +63,15 @@
46C5B2ED2183EDDB00419E57 /* source */ = {
isa = PBXGroup;
children = (
46E55E6024A7393F00D8BDBA /* hls-string.c */,
46E55E5A247384DE00D8BDBA /* hls-master.c */,
46E55E5B247384DE00D8BDBA /* hls-playlist.c */,
46C5B2EE2183EDDB00419E57 /* list.h */,
46C5B2EF2183EDDB00419E57 /* hls-h264.h */,
46C5B2F02183EDDB00419E57 /* hls-fmp4.c */,
46C5B2F12183EDDB00419E57 /* hls-m3u8.c */,
46C5B2F22183EDDB00419E57 /* hls-media.c */,
46E55E4C24681D8400D8BDBA /* hls-parser.c */,
);
path = source;
sourceTree = "<group>";
Expand Down Expand Up @@ -135,7 +147,11 @@
files = (
46C5B2F62183EDDB00419E57 /* hls-m3u8.c in Sources */,
46C5B2F52183EDDB00419E57 /* hls-fmp4.c in Sources */,
46E55E4D24681D8400D8BDBA /* hls-parser.c in Sources */,
46E55E5D247384DF00D8BDBA /* hls-playlist.c in Sources */,
46C5B2F72183EDDB00419E57 /* hls-media.c in Sources */,
46E55E5C247384DE00D8BDBA /* hls-master.c in Sources */,
46E55E6124A7393F00D8BDBA /* hls-string.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -186,6 +202,7 @@
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
OS_MAC,
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
Expand Down Expand Up @@ -247,6 +264,7 @@
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = OS_MAC;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
8 changes: 4 additions & 4 deletions libhls/source/hls-master.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ int hls_master_rendition(const struct hls_master_t* master, int variant, int typ
if (name)
{
if(m->name && 0 == strcmp(name, m->name))
return i;
return (int)i;
}
else
{
if (m->is_default)
is_default = i;
is_default = (int)i;
else if(m->autoselect)
autoselect = i;
autoselect = (int)i;
}
}

Expand All @@ -71,7 +71,7 @@ int hls_master_best_variant(const struct hls_master_t* master)
{
v = &master->variants[i];
if (-1 == best || v->bandwidth > master->variants[best].bandwidth)
best = i;
best = (int)i;
}

return best;
Expand Down
2 changes: 1 addition & 1 deletion libhls/source/hls-parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ void hls_parser_test(const char* m3u8)
{
static char data[2 * 1024 * 1024];
FILE* fp = fopen(m3u8, "rb");
int n = fread(data, 1, sizeof(data), fp);
int n = (int)fread(data, 1, sizeof(data), fp);
fclose(fp);

int v = hls_parser_probe(data, n);
Expand Down
1 change: 1 addition & 0 deletions librtmp/librtmp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 46C5B2692183ECB600419E57;
productRefGroup = 46C5B2732183ECB600419E57 /* Products */;
Expand Down
5 changes: 5 additions & 0 deletions librtsp/librtsp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
46C5B42C2183EE5D00419E57 /* rtsp-client-record.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B4022183EE5D00419E57 /* rtsp-client-record.c */; };
46C5B42E2183EE5D00419E57 /* rtsp-client-setup.c in Sources */ = {isa = PBXBuildFile; fileRef = 46C5B4042183EE5D00419E57 /* rtsp-client-setup.c */; };
46D4B765219FD3BD0042496F /* rtsp-media.c in Sources */ = {isa = PBXBuildFile; fileRef = 46D4B764219FD3BD0042496F /* rtsp-media.c */; };
46E55E5F24A7388A00D8BDBA /* sdp-fmtp-load.c in Sources */ = {isa = PBXBuildFile; fileRef = 46E55E5E24A7388A00D8BDBA /* sdp-fmtp-load.c */; };
F42351202287B72900D805B4 /* rtsp-server-parameter.c in Sources */ = {isa = PBXBuildFile; fileRef = F423511F2287B72900D805B4 /* rtsp-server-parameter.c */; };
F42351222287B77800D805B4 /* sdp-mpeg4.c in Sources */ = {isa = PBXBuildFile; fileRef = F42351212287B77800D805B4 /* sdp-mpeg4.c */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -94,6 +95,7 @@
46C5B4022183EE5D00419E57 /* rtsp-client-record.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "rtsp-client-record.c"; sourceTree = "<group>"; };
46C5B4042183EE5D00419E57 /* rtsp-client-setup.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "rtsp-client-setup.c"; sourceTree = "<group>"; };
46D4B764219FD3BD0042496F /* rtsp-media.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "rtsp-media.c"; sourceTree = "<group>"; };
46E55E5E24A7388A00D8BDBA /* sdp-fmtp-load.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sdp-fmtp-load.c"; sourceTree = "<group>"; };
F423511F2287B72900D805B4 /* rtsp-server-parameter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "rtsp-server-parameter.c"; sourceTree = "<group>"; };
F42351212287B77800D805B4 /* sdp-mpeg4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = "sdp-mpeg4.c"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -168,6 +170,7 @@
46C5B3EE2183EE5D00419E57 /* sdp */ = {
isa = PBXGroup;
children = (
46E55E5E24A7388A00D8BDBA /* sdp-fmtp-load.c */,
F42351212287B77800D805B4 /* sdp-mpeg4.c */,
46C5B3EF2183EE5D00419E57 /* sdp-opus.c */,
46C5B3F02183EE5D00419E57 /* sdp-h264.c */,
Expand Down Expand Up @@ -251,6 +254,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 46C5B2892183ECF900419E57;
productRefGroup = 46C5B2932183ECF900419E57 /* Products */;
Expand Down Expand Up @@ -298,6 +302,7 @@
46C5B41C2183EE5D00419E57 /* sdp-aac.c in Sources */,
46C5B4122183EE5D00419E57 /* rtsp-server-options.c in Sources */,
46C5B40C2183EE5D00419E57 /* rtsp-server-record.c in Sources */,
46E55E5F24A7388A00D8BDBA /* sdp-fmtp-load.c in Sources */,
46C5B42E2183EE5D00419E57 /* rtsp-client-setup.c in Sources */,
46C5B4142183EE5D00419E57 /* rtsp-server.c in Sources */,
46C5B41E2183EE5D00419E57 /* sdp-h265.c in Sources */,
Expand Down
4 changes: 2 additions & 2 deletions librtsp/source/sdp/sdp-fmtp-load.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int mpeg4_avc_from_fmtp(struct mpeg4_avc_t* avc, const struct sdp_a_fmtp_h264_t*
while (p)
{
next = strchr(p, ',');
n = next ? next - p : (int)strlen(p);
n = next ? (int)(next - p) : (int)strlen(p);
if (off + (n + 3) / 4 * 3 > sizeof(avc->data))
return -1; // don't have enough space

Expand Down Expand Up @@ -79,7 +79,7 @@ int mpeg4_hevc_from_fmtp(struct mpeg4_hevc_t* hevc, const struct sdp_a_fmtp_h265
while (p)
{
next = strchr(p, ',');
n = next ? next - p : (int)strlen(p);
n = next ? (int)(next - p) : (int)strlen(p);
if (off + (n + 3) / 4 * 3 > sizeof(hevc->data))
return -1; // don't have enough space

Expand Down
1 change: 1 addition & 0 deletions libsip/libsip.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 46C5B2992183ED2700419E57;
productRefGroup = 46C5B2A32183ED2700419E57 /* Products */;
Expand Down

0 comments on commit 0510230

Please sign in to comment.