Data streaming method of an electronic device and the electronic device thereof
A data streaming method of an electronic device include receiving an information file of a multimedia content from a server, retrieving time information for a unit of data transmission in the information file, and determining an allowed reception time of the data transmission time for a data transmission. An electronic device includes a communication interface configured to access a server, and a processor configured to communicate with the server accessed through the communication interface, wherein the processor is configured to receive an information file of a multimedia content from the server, retrieve time information of a data transmission unit in the information file, and determine an allowed reception time of the data transmission time based on the time information of the unit of data transmission.
1. A method for operating an electronic device, the method comprising:
receiving an information file of a multimedia content from a server;
identifying a play time for a segment related to the multimedia content based on the information file of the multimedia content;
determining an allowed reception time for the segment based on the play time for the segment, the allowed reception time shorter than the play time for the segment;
receiving the segment from the server;
counting a streaming time of the received segment;
determining whether the counted streaming time of the received segment exceeds the allowed reception time for the segment;
in response to determining that the counted streaming time of the received segment exceeds the allowed reception time for the segment, determining whether a bit rate of the received segment exceeding the allowed reception time is the lowest; and
in response to determining that the bit rate of the received segment exceeding the allowed reception time is not the lowest, stopping a streaming of the received segment and requesting the server to resend the segment in a lowest bit rate.
2. The method of claim 1 , wherein the information file is a Media Presentation Description (MPD) file of a Moving Picture Experts Group (MPEG)-Dynamic Adaptive Streaming over Hypertext Transfer Protocol (HTTP) (DASH).
3. The method of claim 1 , wherein the allowed reception time is proportional to the play time for the segment, and shorter than the play time for the segment.
4. The method of claim 1 , further comprising:
receiving and playing the segment of the multimedia content, and comparing a streaming time of the segment to the allowed reception time.
5. The method of claim 1 , further comprising:
counting a number of consecutive requests for a retransmission; and
aborting a retransmission request and displaying a network error message when the number of consecutive requests for retransmission exceeds a preset count.
6. The method of claim 1 , wherein, in response to determining that the bit rate of the received segment exceeding the allowed reception time is the lowest, a retransmission is not requested.
7. The method of claim 1 , wherein the server partitions the multimedia content into segments of different bit rates, and stores the multimedia content in a storage.
8. An electronic device comprising:
a communication interface configured to access a server; and
a processor configured to communicate with the server accessed through the communication interface,
wherein the processor is configured to:
receive an information file of a multimedia content from the server;
identify play time for a segment related with the multimedia content based on the information file of the multimedia content;
determine allowed reception time for the segment based on the play time for the segment, the allowed reception time shorter than the play time for the segment;
receive the segment from the server;
count a streaming time of the received segment;
determine whether the counted streaming time of the received segment exceeds the allowed reception time for the segment;
in response to determining that the counted streaming time of the received segment exceeds the allowed reception time for the segment, determine whether a bit rate of the received segment exceeding the allowed reception time is the lowest; and
in response to determining that the bit rate of the received segment exceeding the allowed reception time is not the lowest, stop a streaming of the received segment and request to resend the segment in a lowest bit rate.
9. The electronic device of claim 8 , wherein the information file is a Media Presentation Description (MPD) file of a Moving Picture Experts Group (MPEG)-Dynamic Adaptive Streaming over Hypertext Transfer Protocol (HTTP) (DASH).
10. The electronic device of claim 8 , wherein the allowed reception time is proportional to the play time for the segment, and shorter than the play time for the segment.
11. The electronic device of claim 8 , wherein the processor is configured to receive and play the segment of the multimedia content, and compare a streaming time of the segment to the allowed reception time.
12. The electronic device of claim 8 , wherein the processor is configured to count a number of consecutive requests for retransmission, and abort a retransmission request and display a network error message when the number of consecutive requests for retransmission exceeds a preset count.
13. The electronic device of claim 8 , wherein, in response to the bit rate of the received segment exceeding the allowed reception time is the lowest, the processor is configured not to request a retransmission.
14. A non-transitory computer readable recording medium on which a computer program for executing a method is recorded, the method comprising:
receiving an information file of a multimedia content from a server;
identifying play time for a segment related with the multimedia content based on the information file of the multimedia content;
determining allowed reception time for the segment based on the play time for the segment, the allowed reception time shorter than the play time for the segment;
receiving the segment from the server;
counting a streaming time of the received segment;
determining whether the counted streaming time of the received segment exceeds the allowed reception time for the segment;
in response to determining that the counted streaming time of the received segment exceeds the allowed reception time for the segment, determining whether a bit rate of the received segment exceeding the allowed reception time is the lowest; and
in response to determining that the bit rate of the received segment exceeding the allowed reception time is not the lowest, stopping a streaming of the received segment and requesting the server to resend the segment in a lowest bit rate.