Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qiniu/qplayer-sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
jinbangfei committed Jul 31, 2017
2 parents 8ee6f88 + 924b82f commit a634f97
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Binary file modified ios/lib/libqcPlayEng.a
Binary file not shown.
2 changes: 1 addition & 1 deletion ios/sample/TestCode/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>V1.1.0.27</string>
<string>V1.1.0.00</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
15 changes: 14 additions & 1 deletion ios/sample/TestCode/ViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ -(void)setupUI
//Lable version
width = 80;
_labelVersion = [[UILabel alloc] initWithFrame:CGRectMake(_rectSmallScreen.size.width - width, _rectSmallScreen.origin.y+_rectSmallScreen.size.height + 50, width, 20)];
_labelVersion.text = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];//@"V1.0.0.0 B1";
_labelVersion.text = [self getVersion];//[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];//@"V1.0.0.0 B1";
_labelVersion.font = [UIFont systemFontOfSize:8];
_labelVersion.textColor = [UIColor redColor];
[_viewVideo addSubview:_labelVersion];
Expand Down Expand Up @@ -985,6 +985,19 @@ -(void)enableFileCacheMode
_player.SetParam(_player.hPlayer, QCPLAY_PID_Prefer_Protocol, &nProtocol);
}

-(NSString*)getVersion
{
QCM_Player player;
qcCreatePlayer(&player, NULL);
NSString* version = [NSString stringWithFormat:@"%d.%d.%d.%d",
(player.nVersion>>24) & 0xFF,
(player.nVersion>>16) & 0xFF,
(player.nVersion>>8) & 0xFF,
player.nVersion&0xFF];
qcDestroyPlayer(&player);
return version;
}


#pragma mark Other
- (void)didReceiveMemoryWarning
Expand Down

0 comments on commit a634f97

Please sign in to comment.