|
46 | 46 | import com.aliyun.oss.model.CopyObjectRequest;
|
47 | 47 | import com.aliyun.oss.model.CopyObjectResult;
|
48 | 48 | import com.aliyun.oss.model.CreateBucketRequest;
|
| 49 | +import com.aliyun.oss.model.CreateLiveChannelRequest; |
| 50 | +import com.aliyun.oss.model.CreateLiveChannelResult; |
49 | 51 | import com.aliyun.oss.model.DeleteBucketCnameRequest;
|
50 | 52 | import com.aliyun.oss.model.DeleteBucketReplicationRequest;
|
51 | 53 | import com.aliyun.oss.model.DeleteObjectsRequest;
|
52 | 54 | import com.aliyun.oss.model.DeleteObjectsResult;
|
53 | 55 | import com.aliyun.oss.model.DownloadFileRequest;
|
54 | 56 | import com.aliyun.oss.model.DownloadFileResult;
|
55 | 57 | import com.aliyun.oss.model.GeneratePresignedUrlRequest;
|
| 58 | +import com.aliyun.oss.model.GeneratePushflowUrlRequest; |
| 59 | +import com.aliyun.oss.model.GenerateVodPlaylistRequest; |
56 | 60 | import com.aliyun.oss.model.GenericRequest;
|
57 | 61 | import com.aliyun.oss.model.GetBucketImageResult;
|
58 | 62 | import com.aliyun.oss.model.GetBucketReplicationProgressRequest;
|
| 63 | +import com.aliyun.oss.model.ListLiveChannelsRequest; |
| 64 | +import com.aliyun.oss.model.LiveChannel; |
| 65 | +import com.aliyun.oss.model.LiveChannelGenericRequest; |
| 66 | +import com.aliyun.oss.model.LiveChannelInfo; |
| 67 | +import com.aliyun.oss.model.LiveChannelListing; |
| 68 | +import com.aliyun.oss.model.LiveChannelStat; |
| 69 | +import com.aliyun.oss.model.LiveChannelStatus; |
| 70 | +import com.aliyun.oss.model.LiveRecord; |
59 | 71 | import com.aliyun.oss.model.ReplicationRule;
|
60 | 72 | import com.aliyun.oss.model.GetImageStyleResult;
|
61 | 73 | import com.aliyun.oss.model.GetObjectRequest;
|
|
86 | 98 | import com.aliyun.oss.model.AddBucketReplicationRequest;
|
87 | 99 | import com.aliyun.oss.model.SetBucketStorageCapacityRequest;
|
88 | 100 | import com.aliyun.oss.model.SetBucketTaggingRequest;
|
| 101 | +import com.aliyun.oss.model.SetLiveChannelRequest; |
89 | 102 | import com.aliyun.oss.model.SetObjectAclRequest;
|
90 | 103 | import com.aliyun.oss.model.SimplifiedObjectMeta;
|
91 | 104 | import com.aliyun.oss.model.TagSet;
|
@@ -1419,4 +1432,213 @@ public UserQos getBucketStorageCapacity(GenericRequest genericRequest)
|
1419 | 1432 | */
|
1420 | 1433 | public DownloadFileResult downloadFile(DownloadFileRequest downloadFileRequest) throws Throwable;
|
1421 | 1434 |
|
| 1435 | + /** |
| 1436 | + * 创建Live Channel。 |
| 1437 | + * |
| 1438 | + * OSS通过Live Channel,即“直播频道”,来管理RTMP推流;用户想要推送RTMP流到OSS,必须先通过本接口来创建Live Channel。 |
| 1439 | + * |
| 1440 | + * @param createLiveChannelRequest 请求参数。 |
| 1441 | + * @return 请求结果{@link CreateLiveChannelResult}实例。 |
| 1442 | + * @throws OSSException OSS Server异常信息。 |
| 1443 | + * @throws ClientException OSS Client异常信息。 |
| 1444 | + */ |
| 1445 | + public CreateLiveChannelResult createLiveChannel(CreateLiveChannelRequest createLiveChannelRequest) |
| 1446 | + throws OSSException, ClientException; |
| 1447 | + |
| 1448 | + /** |
| 1449 | + * 设置Live Channel的状态。 |
| 1450 | + * |
| 1451 | + * 通过修改LiveChannel的状态,可实现“禁播”功能。 |
| 1452 | + * |
| 1453 | + * @param bucketName Bucket名称。 |
| 1454 | + * @param liveChannel Live Channel名称。 |
| 1455 | + * @param status Live Channel状态,可选值包括enabled、disabled。 |
| 1456 | + * @throws OSSException OSS Server异常信息。 |
| 1457 | + * @throws ClientException OSS Client异常信息。 |
| 1458 | + */ |
| 1459 | + public void setLiveChannelStatus(String bucketName, String liveChannel, LiveChannelStatus status) |
| 1460 | + throws OSSException, ClientException; |
| 1461 | + |
| 1462 | + /** |
| 1463 | + * 设置Live Channel的状态。 |
| 1464 | + * |
| 1465 | + * 通过修改LiveChannel的状态,可实现“禁播”功能。 |
| 1466 | + * |
| 1467 | + * @param setLiveChannelRequest 请求参数。 |
| 1468 | + * @throws OSSException OSS Server异常信息。 |
| 1469 | + * @throws ClientException OSS Client异常信息。 |
| 1470 | + */ |
| 1471 | + public void setLiveChannelStatus(SetLiveChannelRequest setLiveChannelRequest) |
| 1472 | + throws OSSException, ClientException; |
| 1473 | + |
| 1474 | + /** |
| 1475 | + * 获取Live Channel的配置信息。 |
| 1476 | + * @param bucketName Bucket名称。 |
| 1477 | + * @param liveChannel Live Channel名称。 |
| 1478 | + * @return 请求结果{@link LiveChannelInfo}实例。 |
| 1479 | + * @throws OSSException OSS Server异常信息。 |
| 1480 | + * @throws ClientException OSS Client异常信息。 |
| 1481 | + */ |
| 1482 | + public LiveChannelInfo getLiveChannelInfo(String bucketName, String liveChannel) |
| 1483 | + throws OSSException, ClientException; |
| 1484 | + |
| 1485 | + /** |
| 1486 | + * 获取Live Channel的配置信息。 |
| 1487 | + * @param liveChannelGenericRequest 请求参数。 |
| 1488 | + * @return 请求结果{@link LiveChannelInfo}实例。 |
| 1489 | + * @throws OSSException OSS Server异常信息。 |
| 1490 | + * @throws ClientException OSS Client异常信息。 |
| 1491 | + */ |
| 1492 | + public LiveChannelInfo getLiveChannelInfo(LiveChannelGenericRequest liveChannelGenericRequest) |
| 1493 | + throws OSSException, ClientException; |
| 1494 | + |
| 1495 | + /** |
| 1496 | + * 获取Live Channel的推流状态。 |
| 1497 | + * @param bucketName Bucket名称。 |
| 1498 | + * @param liveChannel Live Channel名称。 |
| 1499 | + * @return 请求结果{@link LiveChannelStat}实例。 |
| 1500 | + * @throws OSSException OSS Server异常信息。 |
| 1501 | + * @throws ClientException OSS Client异常信息。 |
| 1502 | + */ |
| 1503 | + public LiveChannelStat getLiveChannelStat(String bucketName, String liveChannel) |
| 1504 | + throws OSSException, ClientException; |
| 1505 | + |
| 1506 | + /** |
| 1507 | + * 获取Live Channel的推流状态。 |
| 1508 | + * @param liveChannelGenericRequest 请求参数。 |
| 1509 | + * @return 请求结果{@link LiveChannelStat}实例。 |
| 1510 | + * @throws OSSException OSS Server异常信息。 |
| 1511 | + * @throws ClientException OSS Client异常信息。 |
| 1512 | + */ |
| 1513 | + public LiveChannelStat getLiveChannelStat(LiveChannelGenericRequest liveChannelGenericRequest) |
| 1514 | + throws OSSException, ClientException; |
| 1515 | + |
| 1516 | + /** |
| 1517 | + * 删除Live Channel。 |
| 1518 | + * @param bucketName Bucket名称。 |
| 1519 | + * @param liveChannel Live Channel名称。 |
| 1520 | + * @throws OSSException OSS Server异常信息。 |
| 1521 | + * @throws ClientException OSS Client异常信息。 |
| 1522 | + */ |
| 1523 | + public void deleteLiveChannel(String bucketName, String liveChannel) |
| 1524 | + throws OSSException, ClientException; |
| 1525 | + |
| 1526 | + /** |
| 1527 | + * 删除Live Channel。 |
| 1528 | + * |
| 1529 | + * 删除指定的直播频道。删除频道时,该频道历史上直播生成的视频文件仍然保留。 |
| 1530 | + * |
| 1531 | + * @param liveChannelGenericRequest 请求参数。 |
| 1532 | + * @throws OSSException OSS Server异常信息。 |
| 1533 | + * @throws ClientException OSS Client异常信息。 |
| 1534 | + */ |
| 1535 | + public void deleteLiveChannel(LiveChannelGenericRequest liveChannelGenericRequest) |
| 1536 | + throws OSSException, ClientException; |
| 1537 | + |
| 1538 | + /** |
| 1539 | + * 列出指定Bucket下的所有{@link LiveChannel}的列表。 |
| 1540 | + * |
| 1541 | + * @param bucketName Bucket名称。 |
| 1542 | + * @return 所有{@link LiveChannel}的列表。 |
| 1543 | + * @throws OSSException OSS Server异常信息。 |
| 1544 | + * @throws ClientException OSS Client异常信息。 |
| 1545 | + */ |
| 1546 | + public List<LiveChannel> listLiveChannels(String bucketName) throws OSSException, ClientException; |
| 1547 | + |
| 1548 | + /** |
| 1549 | + * 按照请求参数要求返回的{@link LiveChannel}列表。 |
| 1550 | + * @param listLiveChannelRequest 请求参数。 |
| 1551 | + * @return 符合请求参数要求的{@link LiveChannel}列表。 |
| 1552 | + * @throws OSSException OSS Server异常信息。 |
| 1553 | + * @throws ClientException OSS Client异常信息。 |
| 1554 | + */ |
| 1555 | + public LiveChannelListing listLiveChannels(ListLiveChannelsRequest listLiveChannelRequest) |
| 1556 | + throws OSSException, ClientException; |
| 1557 | + |
| 1558 | + /** |
| 1559 | + * 获取指定Live Channel的推流记录。 |
| 1560 | + * |
| 1561 | + * OSS为每个Live Channel保存最近的10次推流记录。 |
| 1562 | + * |
| 1563 | + * @param bucketName Bucket名称。 |
| 1564 | + * @param liveChannel Live Channel名称。 |
| 1565 | + * @return 最近的推流记录。 |
| 1566 | + * @throws OSSException OSS Server异常信息。 |
| 1567 | + * @throws ClientException OSS Client异常信息。 |
| 1568 | + */ |
| 1569 | + public List<LiveRecord> getLiveChannelHistory(String bucketName, String liveChannel) |
| 1570 | + throws OSSException, ClientException; |
| 1571 | + |
| 1572 | + /** |
| 1573 | + * 获取指定Live Channel的推流记录。 |
| 1574 | + * |
| 1575 | + * OSS为每个LiveChannel保存最近的10次推流记录。 |
| 1576 | + * |
| 1577 | + * @param liveChannelGenericRequest 请求参数。 |
| 1578 | + * @return 最近的次推流记录。 |
| 1579 | + * @throws OSSException OSS Server异常信息。 |
| 1580 | + * @throws ClientException OSS Client异常信息。 |
| 1581 | + */ |
| 1582 | + public List<LiveRecord> getLiveChannelHistory(LiveChannelGenericRequest liveChannelGenericRequest) |
| 1583 | + throws OSSException, ClientException; |
| 1584 | + |
| 1585 | + /** |
| 1586 | + * 为指定时间段内的ts文件生成一个点播的播放列表(m3u8文件)。 |
| 1587 | + * @param bucketName Bucket名称。 |
| 1588 | + * @param liveChannel Live Channel名称。 |
| 1589 | + * @param PlaylistName 生成的点播用m3u8文件的basename,例如playlist.m3u8。 |
| 1590 | + * @param startTime 播放列表的开始时间,格式采用epoch time,例如1459922563。 |
| 1591 | + * @param endTime 播放列表的结束时间,格式采用epoch time,例如1459922563。 |
| 1592 | + * @throws OSSException OSS Server异常信息。 |
| 1593 | + * @throws ClientException OSS Client异常信息。 |
| 1594 | + */ |
| 1595 | + public void GenerateVodPlaylist(String bucketName, String liveChannelName, String PlaylistName, |
| 1596 | + long startTime, long endTime) throws OSSException, ClientException; |
| 1597 | + |
| 1598 | + /** |
| 1599 | + * 为指定时间段内的ts文件生成一个点播的播放列表(m3u8文件)。 |
| 1600 | + * @param generateVodPlaylistRequest 请求参数。 |
| 1601 | + * @throws OSSException OSS Server异常信息。 |
| 1602 | + * @throws ClientException OSS Client异常信息。 |
| 1603 | + */ |
| 1604 | + public void GenerateVodPlaylist(GenerateVodPlaylistRequest generateVodPlaylistRequest) |
| 1605 | + throws OSSException, ClientException; |
| 1606 | + |
| 1607 | + /** |
| 1608 | + * 生成Live Channel的RTMP推流地址。 |
| 1609 | + * @param bucketName Bucket名称。 |
| 1610 | + * @param liveChannel Live Channel名称。 |
| 1611 | + * @param PlaylistName 生成的点播用m3u8文件的basename,例如playlist.m3u8。 |
| 1612 | + * @param expires 期望的过期时间,格式采用epoch time,例如1459922563。 |
| 1613 | + * @return Live Channel的RTMP推流地址。 |
| 1614 | + * @throws OSSException OSS Server异常信息。 |
| 1615 | + * @throws ClientException OSS Client异常信息。 |
| 1616 | + */ |
| 1617 | + public String GeneratePushflowUri(String bucketName, String liveChannelName, String PlaylistName, |
| 1618 | + long expires) throws OSSException, ClientException; |
| 1619 | + |
| 1620 | + /** |
| 1621 | + * 生成Live Channel的RTMP推流地址。 |
| 1622 | + * @param bucketName Bucket名称。 |
| 1623 | + * @param liveChannel Live Channel名称。 |
| 1624 | + * @param PlaylistName 生成的点播用m3u8文件的basename,例如playlist.m3u8。 |
| 1625 | + * @param expires 期望的过期时间,格式采用epoch time,例如1459922563。 |
| 1626 | + * @param parameters 用户自定义参数,没有填null。 |
| 1627 | + * @return Live Channel的RTMP推流地址。 |
| 1628 | + * @throws OSSException OSS Server异常信息。 |
| 1629 | + * @throws ClientException OSS Client异常信息。 |
| 1630 | + */ |
| 1631 | + public String GeneratePushflowUri(String bucketName, String liveChannelName, String PlaylistName, |
| 1632 | + long expires, Map<String, String> parameters) throws OSSException, ClientException; |
| 1633 | + |
| 1634 | + /** |
| 1635 | + * 生成Live Channel的RTMP推流地址。 |
| 1636 | + * @param generatePushflowUrlRequest 请求参数。 |
| 1637 | + * @return Live Channel的RTMP推流地址。 |
| 1638 | + * @throws OSSException OSS Server异常信息。 |
| 1639 | + * @throws ClientException OSS Client异常信息。 |
| 1640 | + */ |
| 1641 | + public String GeneratePushflowUri(GeneratePushflowUrlRequest generatePushflowUrlRequest) |
| 1642 | + throws OSSException, ClientException; |
| 1643 | + |
1422 | 1644 | }
|
0 commit comments